[master] 53db0bd28 FlexeLinting
Poul-Henning Kamp
phk at FreeBSD.org
Mon Nov 5 07:37:16 UTC 2018
commit 53db0bd28d0f4fb25aedbb1d452d0585b10afbe3
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Nov 5 07:36:27 2018 +0000
FlexeLinting
diff --git a/lib/libvmod_debug/vmod_debug.c b/lib/libvmod_debug/vmod_debug.c
index 6816451aa..61029ad94 100644
--- a/lib/libvmod_debug/vmod_debug.c
+++ b/lib/libvmod_debug/vmod_debug.c
@@ -577,16 +577,17 @@ xyzzy_priv_perf(VRT_CTX, VCL_INT size, VCL_INT rounds)
for (r = 0; r < rounds; r++) {
for (s = 1; s <= size; s++) {
p = VRT_priv_task(ctx, (void *)(uintptr_t)s);
+ AN(p);
check += (uintptr_t)p->priv;
p->priv = (void *)(uintptr_t)(s * rounds + r);
}
}
t1 = VTIM_mono();
- d = (t1 - t0) * 1e9 / size / rounds;
+ d = (t1 - t0) * 1e9 / ((double)size * (double)rounds);
VSLb(ctx->vsl, SLT_Debug,
- "perf size %jd rounds %jd time %.9fns check %jd",
+ "perf size %jd rounds %jd time %.1fns check %jd",
(intmax_t)size, (intmax_t)rounds, d, (uintmax_t)check);
return (d);
More information about the varnish-commit
mailing list