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 1
1
require 'benchmark/ips'
2
+
3
+ $LOAD_PATH. unshift '../lib'
4
+
2
5
require 'json'
3
- require 'zstd'
4
6
require 'objspace'
7
+ require 'zstd-ruby'
5
8
6
9
p "#{ ObjectSpace . memsize_of_all /1000 } #{ ObjectSpace . count_objects } #{ `ps -o rss= -p #{ Process . pid } ` . to_i } "
7
10
14
17
15
18
while true do
16
19
Zstd . compress ( json_string )
17
- if ( ( i % 10000 ) == 0 )
20
+ if ( ( i % 1000 ) == 0 )
18
21
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 } "
19
22
end
20
23
i += 1
Original file line number Diff line number Diff line change 1
1
require 'benchmark/ips'
2
+
3
+ $LOAD_PATH. unshift '../lib'
4
+
2
5
require 'json'
3
- require 'zstd'
6
+ require 'zstd-ruby '
4
7
require 'objspace'
5
8
6
9
p "#{ ObjectSpace . memsize_of_all /1000 } #{ ObjectSpace . count_objects } #{ `ps -o rss= -p #{ Process . pid } ` . to_i } "
12
15
i = 0
13
16
while true do
14
17
Zstd . decompress IO . read ( "./results/#{ sample_file_name } .zstd" )
15
- if ( ( i % 10000 ) == 0 )
18
+ if ( ( i % 1000 ) == 0 )
16
19
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 } "
17
20
end
18
21
i += 1
You can’t perform that action at this time.
0 commit comments