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
f67927b5
Commit
f67927b5
authored
Mar 06, 2017
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Introduce VSC stat cache_hitmiss, to count hits on hit-for-miss.
parent
939e685d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
1 deletion
+14
-1
cache_hash.c
bin/varnishd/cache/cache_hash.c
+2
-1
c00014.vtc
bin/varnishtest/tests/c00014.vtc
+1
-0
c00081.vtc
bin/varnishtest/tests/c00081.vtc
+1
-0
r00425.vtc
bin/varnishtest/tests/r00425.vtc
+1
-0
vsc_f_main.h
include/tbl/vsc_f_main.h
+9
-0
No files found.
bin/varnishd/cache/cache_hash.c
View file @
f67927b5
...
@@ -440,6 +440,7 @@ HSH_Lookup(struct req *req, struct objcore **ocp, struct objcore **bocp,
...
@@ -440,6 +440,7 @@ HSH_Lookup(struct req *req, struct objcore **ocp, struct objcore **bocp,
wrk
->
stats
->
cache_hitpass
++
;
wrk
->
stats
->
cache_hitpass
++
;
oc
=
NULL
;
oc
=
NULL
;
}
else
if
(
oc
->
flags
&
OC_F_PASS
)
{
}
else
if
(
oc
->
flags
&
OC_F_PASS
)
{
wrk
->
stats
->
cache_hitmiss
++
;
oc
=
NULL
;
oc
=
NULL
;
*
bocp
=
hsh_insert_busyobj
(
wrk
,
oh
);
*
bocp
=
hsh_insert_busyobj
(
wrk
,
oh
);
}
else
{
}
else
{
...
@@ -462,7 +463,7 @@ HSH_Lookup(struct req *req, struct objcore **ocp, struct objcore **bocp,
...
@@ -462,7 +463,7 @@ HSH_Lookup(struct req *req, struct objcore **ocp, struct objcore **bocp,
}
}
if
(
exp_oc
!=
NULL
&&
exp_oc
->
flags
&
OC_F_PASS
)
{
if
(
exp_oc
!=
NULL
&&
exp_oc
->
flags
&
OC_F_PASS
)
{
wrk
->
stats
->
cache_hit
pa
ss
++
;
wrk
->
stats
->
cache_hit
mi
ss
++
;
exp_oc
=
NULL
;
exp_oc
=
NULL
;
busy_found
=
0
;
busy_found
=
0
;
}
}
...
...
bin/varnishtest/tests/c00014.vtc
View file @
f67927b5
...
@@ -44,4 +44,5 @@ client c2 {
...
@@ -44,4 +44,5 @@ client c2 {
client c1 -wait
client c1 -wait
varnish v1 -expect cache_hitpass == 0
varnish v1 -expect cache_hitpass == 0
varnish v1 -expect cache_hitmiss == 1
varnish v1 -expect cache_miss == 2
varnish v1 -expect cache_miss == 2
bin/varnishtest/tests/c00081.vtc
View file @
f67927b5
...
@@ -47,3 +47,4 @@ client c1 {
...
@@ -47,3 +47,4 @@ client c1 {
varnish v1 -expect MAIN.cache_hitpass == 1
varnish v1 -expect MAIN.cache_hitpass == 1
varnish v1 -expect MAIN.cache_miss == 2
varnish v1 -expect MAIN.cache_miss == 2
varnish v1 -expect MAIN.cache_hitmiss == 0
bin/varnishtest/tests/r00425.vtc
View file @
f67927b5
...
@@ -30,4 +30,5 @@ client c1 {
...
@@ -30,4 +30,5 @@ client c1 {
} -run
} -run
varnish v1 -expect cache_hitpass == 0
varnish v1 -expect cache_hitpass == 0
varnish v1 -expect cache_hitmiss == 2
varnish v1 -expect cache_miss == 3
varnish v1 -expect cache_miss == 3
include/tbl/vsc_f_main.h
View file @
f67927b5
...
@@ -99,6 +99,15 @@ VSC_FF(cache_hitpass, uint64_t, 1, 'c', 'i', info,
...
@@ -99,6 +99,15 @@ VSC_FF(cache_hitpass, uint64_t, 1, 'c', 'i', info,
" decision is being used."
" decision is being used."
)
)
VSC_FF
(
cache_hitmiss
,
uint64_t
,
1
,
'c'
,
'i'
,
info
,
"Cache hits for miss."
,
"Count of hits for miss."
" A cache hit for miss indicates that Varnish is going to"
" proceed as for a cache miss without request coalescing, and"
" this decision has been cached. This counts how many times the"
" cached decision is being used."
)
VSC_FF
(
cache_miss
,
uint64_t
,
1
,
'c'
,
'i'
,
info
,
VSC_FF
(
cache_miss
,
uint64_t
,
1
,
'c'
,
'i'
,
info
,
"Cache misses"
,
"Cache misses"
,
"Count of misses."
"Count of misses."
...
...
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