Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-ece
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-ece
Commits
d778ddf5
Commit
d778ddf5
authored
Sep 19, 2019
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the calls counter.
parent
19c7cb4a
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
44 additions
and
2 deletions
+44
-2
ece.vsc
src/ece.vsc
+13
-1
decrypt.vtc
src/tests/decrypt.vtc
+11
-0
decrypter.vtc
src/tests/decrypter.vtc
+3
-0
encrypt.vtc
src/tests/encrypt.vtc
+2
-0
encrypt_err.vtc
src/tests/encrypt_err.vtc
+3
-0
encrypter.vtc
src/tests/encrypter.vtc
+3
-0
roundtrip.vtc
src/tests/roundtrip.vtc
+6
-0
vfp_common.c
src/vfp_common.c
+3
-1
No files found.
src/ece.vsc
View file @
d778ddf5
...
...
@@ -10,7 +10,19 @@
:type: counter
:oneliner: Operations
Total number of en-/decryption operations
Total number of en-/decryption operations. Not incremented
when the processor declines the operation, for example due
to the Content-Encoding header.
.. varnish_vsc:: calls
:type: counter
:oneliner: Processor calls
Total number of times the processor was called. May be greater
than ops due to multiple fetches per operation. Not incremented
when the processor is never used for a fetch, for example due
to an empty response body (in which case calls may be less than
ops).
.. varnish_vsc:: out
:type: counter
...
...
src/tests/decrypt.vtc
View file @
d778ddf5
...
...
@@ -71,6 +71,7 @@ logexpect l1 -v v1 -d 1 -g vxid -q "VfpAcct" {
} -run
varnish v1 -expect ECE.vfp.ece_decrypt.ops == 2
varnish v1 -expect ECE.vfp.ece_decrypt.calls >= 2
varnish v1 -expect ECE.vfp.ece_decrypt.in == 126
varnish v1 -expect ECE.vfp.ece_decrypt.out == 30
...
...
@@ -132,6 +133,7 @@ client c1 {
logexpect l1 -wait
varnish v1 -expect ECE.vfp.ece_decrypt.ops == 3
varnish v1 -expect ECE.vfp.ece_decrypt.calls >= 3
## Errors
...
...
@@ -176,6 +178,7 @@ client c1 {
logexpect l1 -wait
varnish v1 -expect ECE.vfp.ece_decrypt.ops == 4
varnish v1 -expect ECE.vfp.ece_decrypt.calls >= 4
server s1 -wait
server s1 {
...
...
@@ -193,6 +196,7 @@ client c1 {
} -run
varnish v1 -expect ECE.vfp.ece_decrypt.ops == 5
varnish v1 -expect ECE.vfp.ece_decrypt.calls >= 5
server s1 -wait
server s1 {
...
...
@@ -220,6 +224,7 @@ client c1 {
logexpect l1 -wait
varnish v1 -expect ECE.vfp.ece_decrypt.ops == 6
varnish v1 -expect ECE.vfp.ece_decrypt.calls >= 6
server s1 -wait
server s1 {
...
...
@@ -239,6 +244,7 @@ client c1 {
} -run
varnish v1 -expect ECE.vfp.ece_decrypt.ops == 7
varnish v1 -expect ECE.vfp.ece_decrypt.calls >= 7
server s1 -wait
server s1 {
...
...
@@ -266,6 +272,7 @@ client c1 {
logexpect l1 -wait
varnish v1 -expect ECE.vfp.ece_decrypt.ops == 8
varnish v1 -expect ECE.vfp.ece_decrypt.calls >= 8
server s1 -wait
server s1 {
...
...
@@ -293,6 +300,7 @@ client c1 {
logexpect l1 -wait
varnish v1 -expect ECE.vfp.ece_decrypt.ops == 9
varnish v1 -expect ECE.vfp.ece_decrypt.calls >= 9
server s1 -wait
server s1 {
...
...
@@ -320,6 +328,7 @@ client c1 {
logexpect l1 -wait
varnish v1 -expect ECE.vfp.ece_decrypt.ops == 10
varnish v1 -expect ECE.vfp.ece_decrypt.calls >= 10
server s1 -wait
server s1 {
...
...
@@ -349,6 +358,7 @@ client c1 {
logexpect l1 -wait
varnish v1 -expect ECE.vfp.ece_decrypt.ops == 11
varnish v1 -expect ECE.vfp.ece_decrypt.calls >= 11
server s1 -wait
server s1 -start
...
...
@@ -385,3 +395,4 @@ client c1 {
logexpect l1 -wait
varnish v1 -expect ECE.vfp.ece_decrypt.ops == 12
varnish v1 -expect ECE.vfp.ece_decrypt.calls >= 12
src/tests/decrypter.vtc
View file @
d778ddf5
...
...
@@ -78,6 +78,7 @@ logexpect l1 -v v1 -d 1 -g vxid -q "VfpAcct" {
} -run
varnish v1 -expect ECE.vfp.vcl1.default_dup.ops == 2
varnish v1 -expect ECE.vfp.vcl1.default_dup.calls >= 2
varnish v1 -expect ECE.vfp.vcl1.default_dup.in == 126
varnish v1 -expect ECE.vfp.vcl1.default_dup.out == 30
...
...
@@ -121,6 +122,7 @@ client c1 -run
logexpect l1 -wait
varnish v1 -expect ECE.vfp.vcl2.chunk4k.ops == 2
varnish v1 -expect ECE.vfp.vcl2.chunk4k.calls >= 2
varnish v1 -expect ECE.vfp.vcl2.chunk4k.in == 126
varnish v1 -expect ECE.vfp.vcl2.chunk4k.out == 30
...
...
@@ -164,6 +166,7 @@ client c1 -run
logexpect l1 -wait
varnish v1 -expect ECE.vfp.vcl3.maxrs0.ops == 2
varnish v1 -expect ECE.vfp.vcl3.maxrs0.calls >= 2
varnish v1 -expect ECE.vfp.vcl3.maxrs0.in == 126
varnish v1 -expect ECE.vfp.vcl3.maxrs0.out == 30
...
...
src/tests/encrypt.vtc
View file @
d778ddf5
...
...
@@ -61,6 +61,7 @@ logexpect l1 -v v1 -d 1 -g vxid -q "VfpAcct" {
} -run
varnish v1 -expect ECE.vfp.ece_encrypt.ops == 1
varnish v1 -expect ECE.vfp.ece_encrypt.calls >= 1
varnish v1 -expect ECE.vfp.ece_encrypt.in == 15
varnish v1 -expect ECE.vfp.ece_encrypt.out == 53
...
...
@@ -91,3 +92,4 @@ client c1 {
logexpect l1 -wait
varnish v1 -expect ECE.vfp.ece_encrypt.ops == 2
varnish v1 -expect ECE.vfp.ece_encrypt.calls >= 2
src/tests/encrypt_err.vtc
View file @
d778ddf5
...
...
@@ -72,6 +72,7 @@ logexpect l1 -v v1 -d 1 -g vxid -q "VfpAcct" {
# ops not incremented when bypassed due to the empty body, or when the
# VFP declines due to Content-Encoding
varnish v1 -expect ECE.vfp.ece_encrypt.ops == 1
varnish v1 -expect ECE.vfp.ece_encrypt.calls == 0
server s1 -wait
server s1 {
...
...
@@ -95,6 +96,7 @@ client c1 {
logexpect l1 -wait
varnish v1 -expect ECE.vfp.ece_encrypt.ops == 2
varnish v1 -expect ECE.vfp.ece_encrypt.calls == 0
server s1 -wait
server s1 {
...
...
@@ -112,6 +114,7 @@ client c1 {
} -run
varnish v1 -expect ECE.vfp.ece_encrypt.ops == 2
varnish v1 -expect ECE.vfp.ece_encrypt.calls == 0
# Errors for custom VFPs
...
...
src/tests/encrypter.vtc
View file @
d778ddf5
...
...
@@ -46,6 +46,7 @@ client c1 {
} -run
varnish v1 -expect ECE.vfp.vcl1.default_dup.ops == 1
varnish v1 -expect ECE.vfp.vcl1.default_dup.calls >= 1
varnish v1 -expect ECE.vfp.vcl1.default_dup.in == 15
varnish v1 -expect ECE.vfp.vcl1.default_dup.out == 53
...
...
@@ -93,6 +94,7 @@ client c1 {
logexpect l1 -wait
varnish v1 -expect ECE.vfp.vcl2.hdr.ops == 1
varnish v1 -expect ECE.vfp.vcl2.hdr.calls >= 1
varnish v1 -expect ECE.vfp.vcl2.hdr.in == 15
varnish v1 -expect ECE.vfp.vcl2.hdr.out == 53
...
...
@@ -113,6 +115,7 @@ client c1 {
logexpect l1 -wait
varnish v1 -expect ECE.vfp.vcl2.hdr.ops == 2
varnish v1 -expect ECE.vfp.vcl2.hdr.calls >= 2
varnish v1 -expect ECE.vfp.vcl2.hdr.in == 15
varnish v1 -expect ECE.vfp.vcl2.hdr.out == 53
...
...
src/tests/roundtrip.vtc
View file @
d778ddf5
...
...
@@ -153,10 +153,12 @@ logexpect l1 -v v1 -d 1 -g vxid -q "VfpAcct" {
# encrypt.out == decrypt.in, confirm in the log
varnish v1 -expect ECE.vfp.ece_encrypt.ops == 6
varnish v1 -expect ECE.vfp.ece_encrypt.calls >= 6
varnish v1 -expect ECE.vfp.ece_encrypt.in == 199975
varnish v1 -expect ECE.vfp.ece_encrypt.out > 199975
varnish v1 -expect ECE.vfp.ece_decrypt.ops == 6
varnish v1 -expect ECE.vfp.ece_decrypt.calls >= 6
varnish v1 -expect ECE.vfp.ece_decrypt.in > 199975
varnish v1 -expect ECE.vfp.ece_decrypt.out == 199975
...
...
@@ -229,10 +231,12 @@ logexpect l1 -wait
# Verify in the logs for the custom VFPs that encrypter.out == decrypter.in
varnish v1 -expect ECE.vfp.vcl2.rs128.ops == 6
varnish v1 -expect ECE.vfp.vcl2.rs128.calls >= 6
varnish v1 -expect ECE.vfp.vcl2.rs128.in == 199975
varnish v1 -expect ECE.vfp.vcl2.rs128.out > 199975
varnish v1 -expect ECE.vfp.vcl2.chunk8k.ops == 6
varnish v1 -expect ECE.vfp.vcl2.chunk8k.calls >= 6
varnish v1 -expect ECE.vfp.vcl2.chunk8k.in > 199975
varnish v1 -expect ECE.vfp.vcl2.chunk8k.out == 199975
...
...
@@ -301,10 +305,12 @@ client c1 -run
logexpect l1 -wait
varnish v1 -expect ECE.vfp.vcl3.rs815.ops == 6
varnish v1 -expect ECE.vfp.vcl3.rs815.calls >= 6
varnish v1 -expect ECE.vfp.vcl3.rs815.in == 199975
varnish v1 -expect ECE.vfp.vcl3.rs815.out > 199975
varnish v1 -expect ECE.vfp.vcl3.chunk4711.ops == 6
varnish v1 -expect ECE.vfp.vcl3.chunk4711.calls >= 6
varnish v1 -expect ECE.vfp.vcl3.chunk4711.in > 199975
varnish v1 -expect ECE.vfp.vcl3.chunk4711.out == 199975
...
...
src/vfp_common.c
View file @
d778ddf5
...
...
@@ -166,8 +166,10 @@ vfp_common_fini(struct vfp_ctx *ctx, struct vfp_entry *ent)
AN
(
ent
->
vfp
);
CAST_OBJ_NOTNULL
(
cfg
,
ent
->
vfp
->
priv1
,
VFP_CFG_MAGIC
);
if
(
cfg
->
stats
!=
NULL
)
if
(
cfg
->
stats
!=
NULL
)
{
cfg
->
stats
->
out
+=
ent
->
bytes_out
;
cfg
->
stats
->
calls
+=
ent
->
calls
;
}
if
(
ent
->
priv1
==
NULL
)
return
;
...
...
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