r2911 - trunk/varnish-cache/bin/varnishtest
phk at projects.linpro.no
phk at projects.linpro.no
Thu Jul 10 09:32:07 CEST 2008
Author: phk
Date: 2008-07-10 09:32:07 +0200 (Thu, 10 Jul 2008)
New Revision: 2911
Modified:
trunk/varnish-cache/bin/varnishtest/Makefile.am
trunk/varnish-cache/bin/varnishtest/vtc_varnish.c
Log:
Open the shm statistics when we launch a varnish
Modified: trunk/varnish-cache/bin/varnishtest/Makefile.am
===================================================================
--- trunk/varnish-cache/bin/varnishtest/Makefile.am 2008-07-10 07:27:56 UTC (rev 2910)
+++ trunk/varnish-cache/bin/varnishtest/Makefile.am 2008-07-10 07:32:07 UTC (rev 2911)
@@ -16,6 +16,7 @@
varnishtest_LDADD = \
$(top_builddir)/lib/libvarnish/libvarnish.la \
$(top_builddir)/lib/libvarnishcompat/libvarnishcompat.la \
+ $(top_builddir)/lib/libvarnishapi/libvarnishapi.la \
${PTHREAD_LIBS}
EXTRA_DIST = $(top_srcdir)/bin/varnishtest/tests/*.vtc \
Modified: trunk/varnish-cache/bin/varnishtest/vtc_varnish.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc_varnish.c 2008-07-10 07:27:56 UTC (rev 2910)
+++ trunk/varnish-cache/bin/varnishtest/vtc_varnish.c 2008-07-10 07:32:07 UTC (rev 2911)
@@ -43,6 +43,7 @@
#include "vqueue.h"
#include "miniobj.h"
#include "libvarnish.h"
+#include "varnishapi.h"
#include "cli.h"
#include "cli_common.h"
#include "vss.h"
@@ -58,6 +59,8 @@
struct vtclog *vl1;
VTAILQ_ENTRY(varnish) list;
+ struct varnish_stats *stats;
+
const char *args;
int fds[4];
pid_t pid;
@@ -217,6 +220,8 @@
vsb_delete(vsb);
AZ(pthread_create(&v->tp, NULL, varnish_thread, v));
+ v->stats = VSL_OpenStats(v->name);
+
vtc_log(v->vl, 3, "opening CLI connection");
for (i = 0; i < 10; i++) {
(void)usleep(200000);
More information about the varnish-commit
mailing list