Skip to content

Commit 2de307f

Browse files
committed
fix: add GC.start
1 parent e327026 commit 2de307f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

benchmarks/zstd_streaming_decompress_memory.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
result << stream.decompress(cstr[10..-1])
2020

2121
if ((i % 1000) == 0 )
22-
puts "count:#{i}\truby_memory:#{ObjectSpace.memsize_of_all/1000}\tobject_count:#{ObjectSpace.count_objects}\trss:#{`ps -o rss= -p #{Process.pid}`.to_i}"
22+
GC.start
23+
puts "count:#{i}\truby_memory:#{ObjectSpace.memsize_of_all/1000}\tobject_count:#{ObjectSpace.count_objects}\trss:#{`ps -o rss= -p #{Process.pid}`.to_i}"
2324
end
2425
i += 1
2526
end

0 commit comments

Comments
 (0)