Skip to content

Commit 772a5dc

Browse files
committed
Updated script so that we generate a small and a large file.
1 parent 3e39a99 commit 772a5dc

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

scripts/ruby/kostya_large.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
#!/usr/bin/env ruby
22
require 'json'
33

4+
y = []
5+
6+
10000.times do
7+
h = {
8+
'x' => rand,
9+
'y' => rand,
10+
'z' => rand,
11+
'name' => ('a'..'z').to_a.shuffle[0..5].join + ' ' + rand(10000).to_s,
12+
'opts' => {'1' => [1, true]},
13+
}
14+
y << h
15+
end
16+
17+
File.open("2.json", 'w') { |f| f.write JSON.pretty_generate('coordinates' => y, 'info' => "some info") }
18+
419
x = []
520

621
524288.times do

0 commit comments

Comments
 (0)