Skip to content

Commit 31f8c4c

Browse files
committed
Use the shortand Symbol Hash syntax
1 parent 691d34b commit 31f8c4c

File tree

1 file changed

+32
-32
lines changed
  • src/main/ruby/truffleruby/core

1 file changed

+32
-32
lines changed

src/main/ruby/truffleruby/core/gc.rb

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -80,44 +80,44 @@ def self.stat(option = nil)
8080

8181
# Initialize stat for statistics that come from memory pools, and populate it with some final stats
8282
stat = {
83-
:count => count,
84-
:time => time,
85-
:minor_gc_count => minor_count,
86-
:major_gc_count => major_count,
87-
:unknown_count => unknown_count, # if nonzero, major or minor count needs to be updated for this GC case
88-
:committed => 0,
89-
:init => 0,
90-
:max => 0,
91-
:used => 0,
92-
:peak_committed => 0,
93-
:peak_init => 0,
94-
:peak_max => 0,
95-
:peak_used => 0,
96-
:last_committed => 0,
97-
:last_init => 0,
98-
:last_max => 0,
99-
:last_used => 0,
100-
:heap_available_slots => committed, # should be the same as the calculated committed
101-
:heap_live_slots => used, # should be the same as the calculated used
102-
:heap_free_slots => committed - used,
83+
count: count,
84+
time: time,
85+
minor_gc_count: minor_count,
86+
major_gc_count: major_count,
87+
unknown_count: unknown_count, # if nonzero, major or minor count needs to be updated for this GC case
88+
committed: 0,
89+
init: 0,
90+
max: 0,
91+
used: 0,
92+
peak_committed: 0,
93+
peak_init: 0,
94+
peak_max: 0,
95+
peak_used: 0,
96+
last_committed: 0,
97+
last_init: 0,
98+
last_max: 0,
99+
last_used: 0,
100+
heap_available_slots: committed, # should be the same as the calculated committed
101+
heap_live_slots: used, # should be the same as the calculated used
102+
heap_free_slots: committed - used,
103103
}
104104

105105
(0...memory_pool_names.length).each do |i|
106106
# Populate memory pool specific stats
107107
info = memory_pool_info[i]
108108
stat[memory_pool_names[i]] = {
109-
:committed => info[0],
110-
:init => info[1],
111-
:max => info[2],
112-
:used => info[3],
113-
:peak_committed => info[4],
114-
:peak_init => info[5],
115-
:peak_max => info[6],
116-
:peak_used => info[7],
117-
:last_committed => info[8],
118-
:last_init => info[9],
119-
:last_max => info[10],
120-
:last_used => info[11],
109+
committed: info[0],
110+
init: info[1],
111+
max: info[2],
112+
used: info[3],
113+
peak_committed: info[4],
114+
peak_init: info[5],
115+
peak_max: info[6],
116+
peak_used: info[7],
117+
last_committed: info[8],
118+
last_init: info[9],
119+
last_max: info[10],
120+
last_used: info[11],
121121
}
122122

123123
# Calculate stats across memory pools

0 commit comments

Comments
 (0)