benchmarks/memory.rb in fast_excel-0.2.5 vs benchmarks/memory.rb in fast_excel-0.2.6
- old
+ new
@@ -9,10 +9,11 @@
puts "warm up..."
write_fast_excel_20k
write_axlsx_20k
write_xlsx_20k
+write_xlsxtream_20k
DATA.clear
50_000.times do |n|
DATA << [n, "String string #{n}" * 5, (n * rand * 10).round, Time.at(n * 1000 + 1492922688), n * 100]
end
@@ -44,6 +45,13 @@
GC.start
sleep 5
measure_memory("write_xlsx") do
write_xlsx_20k
+end
+
+GC.start
+sleep 5
+
+measure_memory("xlsxtream") do
+ write_xlsxtream_20k
end