Commit 901af959 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

More stats counters


git-svn-id: http://www.varnish-cache.org/svn/trunk@244 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 9e90d678
......@@ -122,7 +122,7 @@ accept_f(int fd, short event, void *arg)
char port[10];
int i;
VSL_stats->cli_conn++;
VSL_stats->client_conn++;
(void)arg;
sm = calloc(sizeof *sm, 1);
......
......@@ -239,6 +239,7 @@ VBE_GetFd(struct backend *bp, void **ptr)
vp->nconn++;
AZ(pthread_mutex_unlock(&vbemtx));
connect_to_backend(vc, bp);
VSL_stats->backend_conn++;
event_set(&vc->ev, vc->fd, EV_READ | EV_PERSIST, vbe_rdf, vc);
event_base_set(vbe_evb, &vc->ev);
}
......@@ -270,6 +271,7 @@ VBE_RecycleFd(void *ptr)
struct vbe_conn *vc;
int i;
VSL_stats->backend_recycle++;
vc = ptr;
VSL(SLT_BackendReuse, vc->fd, "");
i = write(vbe_pipe[1], &vc, sizeof vc);
......
......@@ -31,10 +31,13 @@ LookupSession(struct worker *w, struct sess *sp)
o = HSH_Lookup(w, sp->http);
sp->obj = o;
if (o->busy)
if (o->busy) {
VSL_stats->cache_miss++;
VCL_miss_method(sp);
else
} else {
VSL_stats->cache_hit++;
VCL_hit_method(sp);
}
return (0);
}
......@@ -133,6 +136,7 @@ DealWithSession(void *arg, int good)
vca_return_session(sp);
return;
}
VSL_stats->client_req++;
AZ(pthread_mutex_lock(&sessmtx));
TAILQ_INSERT_TAIL(&shd, sp, list);
AZ(pthread_mutex_unlock(&sessmtx));
......
/* $Id$ */
MAC_STAT(cli_conn, uint64_t, "u", "Client connections accepted")
MAC_STAT(cli_req, uint64_t, "u", "Client requests received")
MAC_STAT(client_conn, uint64_t, "u", "Client connections accepted")
MAC_STAT(client_req, uint64_t, "u", "Client requests received")
MAC_STAT(cache_hit, uint64_t, "u", "Cache hits")
MAC_STAT(cache_miss, uint64_t, "u", "Cache misses")
MAC_STAT(cache_hit, uint64_t, "u", "Cache hits")
MAC_STAT(cache_miss, uint64_t, "u", "Cache misses")
MAC_STAT(backend_conn, uint64_t, "u", "Backend connections initiated")
MAC_STAT(backend_req, uint64_t, "u", "Backend requests sent")
MAC_STAT(backend_conn, uint64_t, "u", "Backend connections initiated")
MAC_STAT(backend_recycle, uint64_t, "u", "Backend connections recyles")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment