summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-10-21 14:16:58 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-10-21 14:16:58 +0100
commit84a964398cb20007165256a0a23867e88b00ee3d (patch)
treeff435bab24e6b011da3ca0a1c65c48b70580315a /utils
parent0f01129985305de6255f8c2cb3494aa4411cdcd6 (diff)
downloadrspamd-84a964398cb20007165256a0a23867e88b00ee3d.tar.gz
rspamd-84a964398cb20007165256a0a23867e88b00ee3d.zip
Fix csv issues.
Diffstat (limited to 'utils')
-rw-r--r--utils/rspamd_http_bench.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/utils/rspamd_http_bench.c b/utils/rspamd_http_bench.c
index ecc9214ef..2b2c6db61 100644
--- a/utils/rspamd_http_bench.c
+++ b/utils/rspamd_http_bench.c
@@ -316,7 +316,7 @@ main (int argc, char **argv)
struct event_base *ev_base;
rspamd_mempool_t *pool = rspamd_mempool_new (8192, "http-bench");
struct event term_ev, int_ev, cld_ev;
- gdouble total_done;
+ guint64 total_done;
FILE *lat_file;
gdouble mean, std;
guint i;
@@ -374,26 +374,27 @@ main (int argc, char **argv)
total_done += conns_done[i];
}
+ mean = rspamd_http_calculate_mean (latencies, &std);
+
if (!csv_output) {
rspamd_printf (
- "Made %d connections of size %d in %.6fs, %.6f cps, %.6f MB/sec\n",
- (gint) total_done,
+ "Made %L connections of size %d in %.6fs, %.6f cps, %.6f MB/sec\n",
+ total_done,
file_size,
test_time,
total_done / test_time,
total_done * file_size / test_time / (1024.0 * 1024.0));
- mean = rspamd_http_calculate_mean (latencies, &std);
rspamd_printf ("Latency: %.6f ms mean, %.6f dev\n",
mean * 1000.0, std * 1000.0);
}
else {
/* size,connections,time,mean,stddev,conns,workers */
- rspamd_printf ("%ud,%.0f,%.1f,%.6f,%.6f,%ud,%ud\n",
+ rspamd_printf ("%ud,%L,%.1f,%.6f,%.6f,%ud,%ud\n",
file_size,
total_done,
test_time,
- mean,
- std,
+ mean*1000.0,
+ std*1000.0,
pconns,
nworkers);
}