[6.0] df59de4b3 change nanoseconds precision timestamps into microseconds

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Wed Oct 31 13:08:31 UTC 2018


commit df59de4b3d48efe0cc2bc932067034eae336c86f
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Mon Oct 15 14:39:53 2018 +0200

    change nanoseconds precision timestamps into microseconds
    
    Ref #2792
    
    Conflicts:
            doc/changes.rst

diff --git a/bin/varnishd/cache/cache_expire.c b/bin/varnishd/cache/cache_expire.c
index 6aa1ae07c..3f2a11caf 100644
--- a/bin/varnishd/cache/cache_expire.c
+++ b/bin/varnishd/cache/cache_expire.c
@@ -179,7 +179,7 @@ EXP_Rearm(struct objcore *oc, double now, double ttl, double grace, double keep)
 
 	when = EXP_WHEN(oc);
 
-	VSL(SLT_ExpKill, 0, "EXP_Rearm p=%p E=%.9f e=%.9f f=0x%x", oc,
+	VSL(SLT_ExpKill, 0, "EXP_Rearm p=%p E=%.6f e=%.6f f=0x%x", oc,
 	    oc->timer_when, when, oc->flags);
 
 	if (when < oc->t_origin || when < oc->timer_when)
@@ -198,7 +198,7 @@ exp_inbox(struct exp_priv *ep, struct objcore *oc, unsigned flags)
 	CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC);
 	assert(oc->refcnt > 0);
 
-	VSLb(&ep->vsl, SLT_ExpKill, "EXP_Inbox flg=%x p=%p e=%.9f f=0x%x",
+	VSLb(&ep->vsl, SLT_ExpKill, "EXP_Inbox flg=%x p=%p e=%.6f f=0x%x",
 	    flags, oc, oc->timer_when, oc->flags);
 
 	if (flags & OC_EF_REMOVE) {
@@ -219,7 +219,7 @@ exp_inbox(struct exp_priv *ep, struct objcore *oc, unsigned flags)
 		ObjSendEvent(ep->wrk, oc, OEV_TTLCHG);
 	}
 
-	VSLb(&ep->vsl, SLT_ExpKill, "EXP_When p=%p e=%.9f f=0x%x", oc,
+	VSLb(&ep->vsl, SLT_ExpKill, "EXP_When p=%p e=%.6f f=0x%x", oc,
 	    oc->timer_when, flags);
 
 	/*
@@ -255,7 +255,7 @@ exp_expire(struct exp_priv *ep, double now)
 	oc = binheap_root(ep->heap);
 	if (oc == NULL)
 		return (now + 355./113.);
-	VSLb(&ep->vsl, SLT_ExpKill, "EXP_expire p=%p e=%.9f f=0x%x", oc,
+	VSLb(&ep->vsl, SLT_ExpKill, "EXP_expire p=%p e=%.6f f=0x%x", oc,
 	    oc->timer_when - now, oc->flags);
 
 	CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC);
diff --git a/bin/varnishd/mgt/mgt_vcc.c b/bin/varnishd/mgt/mgt_vcc.c
index d2d94aab3..9777584f8 100644
--- a/bin/varnishd/mgt/mgt_vcc.c
+++ b/bin/varnishd/mgt/mgt_vcc.c
@@ -312,7 +312,7 @@ mgt_VccCompile(struct cli *cli, struct vclprog *vcl, const char *vclname,
 	 *
 	 * The Best way to reproduce this is to have regexps in the VCL.
 	 */
-	VSB_printf(sb, "vcl_%s.%.9f", vclname, VTIM_real());
+	VSB_printf(sb, "vcl_%s.%.6f", vclname, VTIM_real());
 	AZ(VSB_finish(sb));
 	vp.dir = strdup(VSB_data(sb));
 	AN(vp.dir);


More information about the varnish-commit mailing list