[master] 59c5e3d Update varnishncsa to read timing data from SLT_Timestamp records.

Dag Haavi Finstad daghf at varnish-software.com
Wed Mar 26 14:26:57 CET 2014


commit 59c5e3d38ebc117b8799cd1818f7cdc634df77ce
Author: Dag Haavi Finstad <daghf at varnish-software.com>
Date:   Wed Mar 26 14:26:43 2014 +0100

    Update varnishncsa to read timing data from SLT_Timestamp records.

diff --git a/bin/varnishncsa/varnishncsa.c b/bin/varnishncsa/varnishncsa.c
index 7434070..d03f91c 100644
--- a/bin/varnishncsa/varnishncsa.c
+++ b/bin/varnishncsa/varnishncsa.c
@@ -777,10 +777,16 @@ dispatch_f(struct VSL_data *vsl, struct VSL_transaction * const pt[],
 			case SLT_Length:
 				frag_line(b, e, &CTX.frag[F_b]);
 				break;
-			case SLT_ReqEnd:
-				frag_fields(b, e, 1, &CTX.frag[F_tstart],
-				    2, &CTX.frag[F_tend], 3, &CTX.frag[F_ttfb],
-				    0, NULL);
+			case SLT_Timestamp:
+				if (isprefix(b, "Start:", e, &p)) {
+					frag_fields(p, e, 1, &CTX.frag[F_tstart], 0, NULL);
+
+				} else if (isprefix(b, "Resp:", e, &p)) {
+					frag_fields(p, e, 1, &CTX.frag[F_tend], 0, NULL);
+
+				} else if (isprefix(b, "Process:", e, &p)) {
+					frag_fields(p, e, 2, &CTX.frag[F_ttfb], 0, NULL);
+				}
 				break;
 			case SLT_ReqHeader:
 				if (isprefix(b, "Host:", e, &p))



More information about the varnish-commit mailing list