Commit 3dbbcaf0 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Move VBE stats to New World Order

parent c122a396
......@@ -236,3 +236,14 @@ $(varnishd_OBJECTS): VSC_lck.h
EXTRA_DIST += lck.vsc
DISTCLEANFILES += VSC_lck.c VSC_lck.h
nodist_varnishd_SOURCES += VSC_lck.c
#######################################################################
VSC_vbe.c VSC_vbe.h: $(srcdir)/vbe.vsc $(top_builddir)/lib/libvcc/vsctool.py
$(PYTHON) $(top_srcdir)/lib/libvcc/vsctool.py $(srcdir)/vbe.vsc
$(varnishd_OBJECTS): VSC_vbe.h
EXTRA_DIST += vbe.vsc
DISTCLEANFILES += VSC_vbe.c VSC_vbe.h
nodist_varnishd_SOURCES += VSC_vbe.c
......@@ -45,6 +45,8 @@
#include "cache_transport.h"
#include "http1/cache_http1.h"
#include "VSC_vbe.h"
#define FIND_TMO(tmx, dst, bo, be) \
do { \
CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC); \
......
......@@ -67,7 +67,7 @@ struct backend {
const char *admin_health;
double health_changed;
struct VSC_C_vbe *vsc;
struct VSC_vbe *vsc;
struct tcp_pool *tcp_pool;
......
......@@ -46,6 +46,8 @@
#include "cache_director.h"
#include "cache_backend.h"
#include "VSC_vbe.h"
static VTAILQ_HEAD(, backend) backends = VTAILQ_HEAD_INITIALIZER(backends);
static VTAILQ_HEAD(, backend) cool_backends =
VTAILQ_HEAD_INITIALIZER(cool_backends);
......@@ -174,8 +176,7 @@ VBE_Event(struct backend *be, enum vcl_event_e ev)
CHECK_OBJ_NOTNULL(be, BACKEND_MAGIC);
if (ev == VCL_EVENT_WARM) {
be->vsc = VSM_Alloc(sizeof *be->vsc,
VSC_CLASS, VSC_type_vbe, be->display_name);
be->vsc = VSC_vbe_New(be->display_name);
AN(be->vsc);
}
......
......@@ -53,6 +53,8 @@
#include "cache_director.h"
#include "cache_backend.h"
#include "VSC_vbe.h"
/* Default averaging rate, we want something pretty responsive */
#define AVG_RATE 4
......
......@@ -27,6 +27,8 @@
*
*/
struct VSC_vbe;
/* cache_http1_fetch.c [V1F] */
int V1F_SendReq(struct worker *, struct busyobj *, uint64_t *ctr,
int onlycached);
......@@ -49,7 +51,7 @@ struct v1p_acct {
};
void V1P_Process(struct req *, int fd, struct v1p_acct *);
void V1P_Charge(struct req *, const struct v1p_acct *, struct VSC_C_vbe *);
void V1P_Charge(struct req *, const struct v1p_acct *, struct VSC_vbe *);
/* cache_http1_line.c */
void V1L_Chunked(const struct worker *w);
......
......@@ -38,6 +38,8 @@
#include "cache_http1.h"
#include "VSC_vbe.h"
static struct lock pipestat_mtx;
static int
......@@ -61,7 +63,7 @@ rdf(int fd0, int fd1, uint64_t *pcnt)
}
void
V1P_Charge(struct req *req, const struct v1p_acct *a, struct VSC_C_vbe *b)
V1P_Charge(struct req *req, const struct v1p_acct *a, struct VSC_vbe *b)
{
AN(b);
......
..
This is *NOT* a RST file but the syntax has been chosen so
that it may become an RST file at some later date.
XXX: For now this file must be kept in 100% agreement with
XXX: include/tbl/vsc_fields.h
.. varnish_vsc_begin:: vbe
:oneliner: BACKEND COUNTERS (VBE.*)
.. varnish_vsc:: happy
:type: bitmap
:level: info
:oneliner: Happy health probes
.. varnish_vsc:: bereq_hdrbytes
:type: counter
:level: info
:oneliner: Request header bytes
Total backend request header bytes sent
.. varnish_vsc:: bereq_bodybytes
:type: counter
:level: info
:oneliner: Request body bytes
Total backend request body bytes sent
.. varnish_vsc:: beresp_hdrbytes
:type: counter
:level: info
:oneliner: Response header bytes
Total backend response header bytes received
.. varnish_vsc:: beresp_bodybytes
:type: counter
:level: info
:oneliner: Response body bytes
Total backend response body bytes received
.. varnish_vsc:: pipe_hdrbytes
:type: counter
:level: info
:oneliner: Pipe request header bytes
Total request bytes sent for piped sessions
.. varnish_vsc:: pipe_out
:type: counter
:level: info
:oneliner: Piped bytes to backend
Total number of bytes forwarded to backend in pipe sessions
.. varnish_vsc:: pipe_in
:type: counter
:level: info
:oneliner: Piped bytes from backend
Total number of bytes forwarded from backend in pipe sessions
.. varnish_vsc:: conn
:type: gauge
:level: info
:oneliner: Concurrent connections to backend
.. varnish_vsc:: req
:type: counter
:level: info
:oneliner: Backend requests sent
.. varnish_vsc_end:: vbe
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