|
56 | 56 |
|
57 | 57 | table, format = builder.build |
58 | 58 |
|
59 | | - assert_equal ['bench', 'ruby (ms)', 'stddev (%)', 'ruby-yjit (ms)', 'stddev (%)', 'ruby-yjit 1st itr', 'ruby/ruby-yjit', 'p-value', 'sig'], table[0] |
| 59 | + assert_equal ['bench', 'ruby (ms)', 'stddev (%)', 'ruby-yjit (ms)', 'stddev (%)', 'ruby-yjit 1st itr', 'ruby/ruby-yjit'], table[0] |
60 | 60 |
|
61 | | - assert_equal ['%s', '%.1f', '%.1f', '%.1f', '%.1f', '%.3f', '%.3f', '%s', '%s'], format |
| 61 | + assert_equal ['%s', '%.1f', '%.1f', '%.1f', '%.1f', '%.3f', '%.3f'], format |
62 | 62 |
|
63 | 63 | assert_equal 'fib', table[1][0] |
64 | 64 | assert_in_delta 100.0, table[1][1], 1.0 |
65 | 65 | assert_in_delta 50.0, table[1][3], 1.0 |
66 | 66 | assert_in_delta 2.0, table[1][5], 0.1 |
67 | 67 | assert_in_delta 2.0, table[1][6], 0.1 |
68 | | - assert_instance_of String, table[1][7] |
69 | | - assert_instance_of String, table[1][8] |
70 | 68 | end |
71 | 69 |
|
72 | 70 | it 'includes RSS columns when include_rss is true' do |
|
173 | 171 | 'ruby-rjit (ms)', 'stddev (%)', |
174 | 172 | 'ruby-yjit 1st itr', |
175 | 173 | 'ruby-rjit 1st itr', |
176 | | - 'ruby/ruby-yjit', 'p-value', 'sig', |
177 | | - 'ruby/ruby-rjit', 'p-value', 'sig' |
| 174 | + 'ruby/ruby-yjit', |
| 175 | + 'ruby/ruby-rjit' |
178 | 176 | ] |
179 | 177 | assert_equal expected_header, table[0] |
180 | 178 |
|
181 | | - expected_format = ['%s', '%.1f', '%.1f', '%.1f', '%.1f', '%.1f', '%.1f', '%.3f', '%.3f', '%.3f', '%s', '%s', '%.3f', '%s', '%s'] |
| 179 | + expected_format = ['%s', '%.1f', '%.1f', '%.1f', '%.1f', '%.1f', '%.1f', '%.3f', '%.3f', '%.3f', '%.3f'] |
182 | 180 | assert_equal expected_format, format |
183 | 181 | end |
184 | 182 |
|
|
332 | 330 | builder = ResultsTableBuilder.new( |
333 | 331 | executable_names: executable_names, |
334 | 332 | bench_data: bench_data, |
335 | | - include_rss: false |
| 333 | + include_pvalue: true |
336 | 334 | ) |
337 | 335 |
|
338 | 336 | table, _format = builder.build |
|
364 | 362 | builder = ResultsTableBuilder.new( |
365 | 363 | executable_names: executable_names, |
366 | 364 | bench_data: bench_data, |
367 | | - include_rss: false |
| 365 | + include_pvalue: true |
368 | 366 | ) |
369 | 367 |
|
370 | 368 | table, _format = builder.build |
371 | 369 | assert_equal 'N/A', table[1][-2] |
372 | 370 | assert_equal '', table[1].last |
373 | 371 | end |
374 | 372 |
|
| 373 | + it 'omits p-value columns when include_pvalue is false' do |
| 374 | + executable_names = ['ruby', 'ruby-yjit'] |
| 375 | + bench_data = { |
| 376 | + 'ruby' => { |
| 377 | + 'fib' => { |
| 378 | + 'warmup' => [0.1], |
| 379 | + 'bench' => [0.100, 0.101, 0.099], |
| 380 | + 'rss' => 1024 * 1024 * 10 |
| 381 | + } |
| 382 | + }, |
| 383 | + 'ruby-yjit' => { |
| 384 | + 'fib' => { |
| 385 | + 'warmup' => [0.05], |
| 386 | + 'bench' => [0.050, 0.051, 0.049], |
| 387 | + 'rss' => 1024 * 1024 * 12 |
| 388 | + } |
| 389 | + } |
| 390 | + } |
| 391 | + |
| 392 | + builder = ResultsTableBuilder.new( |
| 393 | + executable_names: executable_names, |
| 394 | + bench_data: bench_data |
| 395 | + ) |
| 396 | + |
| 397 | + table, _format = builder.build |
| 398 | + refute_includes table[0], 'p-value' |
| 399 | + refute_includes table[0], 'sig' |
| 400 | + end |
| 401 | + |
375 | 402 | it 'handles only headline benchmarks' do |
376 | 403 | executable_names = ['ruby'] |
377 | 404 | bench_data = { |
|
0 commit comments