[tor-commits] [metrics-web/master] Fix "requests" column in torperf-1.1.csv.
karsten at torproject.org
karsten at torproject.org
Wed Jan 31 13:07:59 UTC 2018
commit 7dce6a5f6bd36927c0875d2b5f5d02e67698b64a
Author: Karsten Loesing <karsten.loesing at gmx.net>
Date: Wed Jan 24 17:45:56 2018 +0100
Fix "requests" column in torperf-1.1.csv.
It looks like we implemented the database query for filling the
"requests" column as completed requests. What we really should have
implemented is total requests made, which is what we're doing here.
Fixes #24996.
---
src/main/sql/onionperf/init-onionperf.sql | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/main/sql/onionperf/init-onionperf.sql b/src/main/sql/onionperf/init-onionperf.sql
index eddfe0f..9207bcf 100644
--- a/src/main/sql/onionperf/init-onionperf.sql
+++ b/src/main/sql/onionperf/init-onionperf.sql
@@ -67,8 +67,7 @@ SELECT DATE(start) AS date,
AS timeouts,
COUNT(CASE WHEN NOT didtimeout AND datacomplete >= 1
AND readbytes < filesize THEN 1 ELSE NULL END) AS failures,
- COUNT(CASE WHEN NOT didtimeout AND datacomplete >= 1
- AND readbytes >= filesize then 1 else null end) AS requests
+ COUNT(*) AS requests
FROM measurements
GROUP BY date, filesize, source, server
UNION
@@ -82,8 +81,7 @@ SELECT DATE(start) AS date,
AS timeouts,
COUNT(CASE WHEN NOT didtimeout AND datacomplete >= 1
AND readbytes < filesize THEN 1 ELSE NULL END) AS failures,
- COUNT(CASE WHEN NOT didtimeout AND datacomplete >= 1
- AND readbytes >= filesize then 1 else null end) AS requests
+ COUNT(*) AS requests
FROM measurements
GROUP BY date, filesize, 3, server) sub
ORDER BY date, filesize, source, server;
More information about the tor-commits
mailing list