Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
2f057a32
Commit
2f057a32
authored
Sep 15, 2014
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Report VFP statistics in their own suppressed SLT_VfpAcct until we know
what we really want with them.
parent
dfc78bfa
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
3 deletions
+22
-3
cache_fetch_proc.c
bin/varnishd/cache/cache_fetch_proc.c
+8
-3
mgt_param_bits.c
bin/varnishd/mgt/mgt_param_bits.c
+1
-0
g00002.vtc
bin/varnishtest/tests/g00002.vtc
+1
-0
vsl_tags.h
include/tbl/vsl_tags.h
+12
-0
No files found.
bin/varnishd/cache/cache_fetch_proc.c
View file @
2f057a32
...
...
@@ -118,9 +118,12 @@ VFP_Close(struct vfp_ctx *vc)
{
struct
vfp_entry
*
vfe
;
VTAILQ_FOREACH
(
vfe
,
&
vc
->
vfp
,
list
)
VTAILQ_FOREACH
(
vfe
,
&
vc
->
vfp
,
list
)
{
if
(
vfe
->
vfp
->
fini
!=
NULL
)
vfe
->
vfp
->
fini
(
vc
,
vfe
);
VSLb
(
vc
->
vsl
,
SLT_VfpAcct
,
"%s %ju %ju"
,
vfe
->
vfp
->
name
,
vfe
->
calls
,
vfe
->
bytes_out
);
}
}
int
...
...
@@ -131,6 +134,7 @@ VFP_Open(struct vfp_ctx *vc)
CHECK_OBJ_NOTNULL
(
vc
,
VFP_CTX_MAGIC
);
CHECK_OBJ_NOTNULL
(
vc
->
http
,
HTTP_MAGIC
);
AN
(
vc
->
vsl
);
VTAILQ_FOREACH_REVERSE
(
vfe
,
&
vc
->
vfp
,
vfp_entry_s
,
list
)
{
if
(
vfe
->
vfp
->
init
==
NULL
)
continue
;
...
...
@@ -142,6 +146,7 @@ VFP_Open(struct vfp_ctx *vc)
return
(
-
1
);
}
}
return
(
0
);
}
...
...
@@ -175,13 +180,13 @@ VFP_Suck(struct vfp_ctx *vc, void *p, ssize_t *lp)
vp
=
VFP_ERROR
;
}
vfe
->
closed
=
vp
;
vfe
->
calls
++
;
vfe
->
bytes_out
+=
*
lp
;
}
else
{
/* Already closed filter */
*
lp
=
0
;
vp
=
vfe
->
closed
;
}
vfe
->
calls
++
;
vfe
->
bytes_out
=
*
lp
;
vc
->
vfp_nxt
=
vfe
;
return
(
vp
);
}
...
...
bin/varnishd/mgt/mgt_param_bits.c
View file @
2f057a32
...
...
@@ -130,6 +130,7 @@ tweak_vsl_mask(struct vsb *vsb, const struct parspec *par, const char *arg)
(
void
)
bit
(
mgt_param
.
vsl_mask
,
SLT_VCL_trace
,
BSET
);
(
void
)
bit
(
mgt_param
.
vsl_mask
,
SLT_WorkThread
,
BSET
);
(
void
)
bit
(
mgt_param
.
vsl_mask
,
SLT_Hash
,
BSET
);
(
void
)
bit
(
mgt_param
.
vsl_mask
,
SLT_VfpAcct
,
BSET
);
}
else
{
return
(
bit_tweak
(
vsb
,
mgt_param
.
vsl_mask
,
SLT__Reserved
,
arg
,
VSL_tags
,
...
...
bin/varnishtest/tests/g00002.vtc
View file @
2f057a32
...
...
@@ -23,6 +23,7 @@ varnish v1 \
} -start
varnish v1 -cliok "param.set fetch_chunksize 4k"
varnish v1 -cliok "param.set vsl_mask +VfpAcct"
client c1 {
txreq -url /foo -hdr "Accept-Encoding: gzip"
...
...
include/tbl/vsl_tags.h
View file @
2f057a32
...
...
@@ -499,4 +499,16 @@ SLTM(BereqAcct, 0, "Backend request accounting",
"
\n
"
)
SLTM
(
VfpAcct
,
0
,
"Fetch filter accounting"
,
"Contains name of VFP and statistics.
\n\n
"
"The format is::
\n\n
"
"
\t
%s %d %d
\n
"
"
\t
| | |
\n
"
"
\t
| | +- Total bytes produced
\n
"
"
\t
| +---- Number of calls made
\n
"
"
\t
+------- Name of filter
\n
"
"
\n
"
NODEF_NOTICE
)
#undef NODEF_NOTICE
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment