File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 11require 'benchmark/ips'
2+
3+ $LOAD_PATH. unshift '../lib'
4+
25require 'json'
3- require 'zstd'
46require 'objspace'
7+ require 'zstd-ruby'
58
69p "#{ ObjectSpace . memsize_of_all /1000 } #{ ObjectSpace . count_objects } #{ `ps -o rss= -p #{ Process . pid } ` . to_i } "
710
1417
1518while true do
1619 Zstd . compress ( json_string )
17- if ( ( i % 10000 ) == 0 )
20+ if ( ( i % 1000 ) == 0 )
1821 puts "count:#{ i } \t ruby_memory:#{ ObjectSpace . memsize_of_all /1000 } \t object_count:#{ ObjectSpace . count_objects } \t rss:#{ `ps -o rss= -p #{ Process . pid } ` . to_i } "
1922 end
2023 i += 1
Original file line number Diff line number Diff line change 11require 'benchmark/ips'
2+
3+ $LOAD_PATH. unshift '../lib'
4+
25require 'json'
3- require 'zstd'
6+ require 'zstd-ruby '
47require 'objspace'
58
69p "#{ ObjectSpace . memsize_of_all /1000 } #{ ObjectSpace . count_objects } #{ `ps -o rss= -p #{ Process . pid } ` . to_i } "
1215i = 0
1316while true do
1417 Zstd . decompress IO . read ( "./results/#{ sample_file_name } .zstd" )
15- if ( ( i % 10000 ) == 0 )
18+ if ( ( i % 1000 ) == 0 )
1619 puts "count:#{ i } \t ruby_memory:#{ ObjectSpace . memsize_of_all /1000 } \t object_count:#{ ObjectSpace . count_objects } \t rss:#{ `ps -o rss= -p #{ Process . pid } ` . to_i } "
1720 end
1821 i += 1
You can’t perform that action at this time.
0 commit comments