Permalink
Browse files

Added new test to table benchmark

  • Loading branch information...
1 parent 4113335 commit 0ab9b91b7b793260986f42a70aed21387d228518 @alexdowad alexdowad committed Aug 19, 2012
Showing with 5 additions and 6 deletions.
  1. +5 −6 bench/table_bench.rb
View
@@ -33,16 +33,15 @@ def benchmark_table_generation(columns,rows,string_size,options={})
end
end
+# Slowest case: styled table, which is very squeezed horizontally,
+# so text has to be wrapped
+benchmark_table_generation(26,50,10, :row_colors => ['FFFFFF','F0F0FF'], :header => true, :cell_style => {:inline_format=>true})
+
# Try building and rendering tables of different sizes
-benchmark_table_generation(10,450,5)
-benchmark_table_generation(10,300,5)
+benchmark_table_generation(10,400,5)
benchmark_table_generation(10,200,5)
benchmark_table_generation(10,100,5)
# Try different optional arguments to Prawn::Document#table
benchmark_table_generation(10,450,5, :cell_style => {:inline_format=>true})
benchmark_table_generation(10,450,5, :row_colors => ['FFFFFF','F0F0FF'], :header => true, :cell_style => {:inline_format=>true})
-
-# Try different "aspect ratios", with same total number of cells
-benchmark_table_generation(20,100,5)
-benchmark_table_generation(25,80,5)

0 comments on commit 0ab9b91

Please sign in to comment.