From 78c3f6752108e6c762a31a3e2770d6f1bf448b94 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Tue, 3 Oct 2006 13:00:43 +0000 Subject: [PATCH] Query fixed to handle the cases where 0 tests are failures or successfull. --- matita/scripts/public_html/bench.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/matita/scripts/public_html/bench.php b/matita/scripts/public_html/bench.php index 51d9e6e2d..d04d228bd 100644 --- a/matita/scripts/public_html/bench.php +++ b/matita/scripts/public_html/bench.php @@ -140,18 +140,18 @@ from b1.options = 'gc-on' and b1.compilation = 'byte' group by b1.mark) as bench_times, - (select b1.mark as mark, COUNT(DISTINCT b1.test) as count + (select + b1.mark as mark, + SUM(if(b1.result='fail' and b1.compilation='byte' and b1.options='gc-on',1,0)) + as count from bench as b1 - where - b1.options = 'gc-on' and - b1.compilation = 'byte' and b1.result = 'fail' - group by b1.mark) as bench_fails, - (select b1.mark as mark, COUNT(DISTINCT b1.test) as count + group by b1.mark) as bench_fails, + (select + b1.mark as mark, + SUM(if(b1.result='fail' and b1.compilation='opt' and b1.options='gc-on',1,0)) + as count from bench as b1 - where - b1.options = 'gc-on' and - b1.compilation = 'opt' and b1.result = 'fail' - group by b1.mark) as bench_fails_opt + group by b1.mark) as bench_fails_opt where bench_times.mark = bench_fails.mark and bench_times_opt.mark = bench_fails_opt.mark and -- 2.39.2