Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvfp-brotli
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
libvfp-brotli
Commits
8a5c0740
Commit
8a5c0740
authored
Feb 15, 2019
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the out statistic -- total output bytes for the de-/compressor.
parent
e3c28439
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
1 deletion
+28
-1
brotli.vsc
src/brotli.vsc
+6
-0
stats.vtc
src/tests/stats.vtc
+17
-1
vfp_brotli.c
src/vfp_brotli.c
+5
-0
No files found.
src/brotli.vsc
View file @
8a5c0740
...
...
@@ -12,4 +12,10 @@
Total number of de-/compression operations
.. varnish_vsc:: out
:type: counter
:oneliner: Output bytes
Total number of bytes output by the de-/compressor
.. varnish_vsc_end:: brotli
src/tests/stats.vtc
View file @
8a5c0740
...
...
@@ -36,7 +36,9 @@ client c1 -run
varnish v1 -vsc BROTLI.*
varnish v1 -expect BROTLI.br.ops == 10
varnish v1 -expect BROTLI.br.out > 0
varnish v1 -expect BROTLI.unbr.ops == 10
varnish v1 -expect BROTLI.unbr.out > 0
varnish v1 -vcl+backend {
import ${vmod_brotli};
...
...
@@ -59,7 +61,9 @@ varnish v1 -cliok "vcl.list"
varnish v1 -vsc BROTLI.*
varnish v1 -expect BROTLI.br.ops == 10
varnish v1 -expect BROTLI.br.out > 0
varnish v1 -expect BROTLI.unbr.ops == 10
varnish v1 -expect BROTLI.unbr.out > 0
server s1 -wait
server s1 -start
...
...
@@ -67,9 +71,13 @@ client c1 -run
varnish v1 -vsc BROTLI.*
varnish v1 -expect BROTLI.br.ops == 10
varnish v1 -expect BROTLI.br.out > 0
varnish v1 -expect BROTLI.unbr.ops == 10
varnish v1 -expect BROTLI.unbr.out > 0
varnish v1 -expect BROTLI.vcl2.mybr.ops == 10
varnish v1 -expect BROTLI.vcl2.mybr.out > 0
varnish v1 -expect BROTLI.vcl2.myunbr.ops == 10
varnish v1 -expect BROTLI.vcl2.myunbr.out > 0
varnish v1 -vcl+backend {}
...
...
@@ -79,20 +87,28 @@ varnish v1 -cliok "vcl.state vcl2 cold"
# This has to be checked manually in the log.
varnish v1 -vsc BROTLI.vcl2.*
varnish v1 -expect BROTLI.br.ops == 10
varnish v1 -expect BROTLI.br.out > 0
varnish v1 -expect BROTLI.unbr.ops == 10
varnish v1 -expect BROTLI.unbr.out > 0
varnish v1 -cliok "vcl.state vcl2 warm"
# With vcl2 back in the warm state, stats for vcl2.* appear again.
varnish v1 -expect BROTLI.br.ops == 10
varnish v1 -expect BROTLI.br.out > 0
varnish v1 -expect BROTLI.unbr.ops == 10
varnish v1 -expect BROTLI.unbr.out > 0
varnish v1 -expect BROTLI.vcl2.mybr.ops == 10
varnish v1 -expect BROTLI.vcl2.mybr.out > 0
varnish v1 -expect BROTLI.vcl2.myunbr.ops == 10
varnish v1 -expect BROTLI.vcl2.myunbr.out > 0
varnish v1 -cliok "vcl.state vcl2 cold"
varnish v1 -cliok "vcl.discard vcl2"
varnish v1 -cliok "vcl.list"
varnish v1 -vsc BROTLI.*
varnish v1 -vsc BROTLI.
vcl2.
*
varnish v1 -expect BROTLI.br.ops == 10
varnish v1 -expect BROTLI.br.out > 0
varnish v1 -expect BROTLI.unbr.ops == 10
varnish v1 -expect BROTLI.unbr.out > 0
src/vfp_brotli.c
View file @
8a5c0740
...
...
@@ -353,12 +353,17 @@ static void v_matchproto_(vfp_fini_f)
vfp_br_fini
(
struct
vfp_ctx
*
ctx
,
struct
vfp_entry
*
ent
)
{
struct
vbr
*
vbr
;
const
struct
vfp_priv
*
priv
;
CHECK_OBJ_NOTNULL
(
ctx
,
VFP_CTX_MAGIC
);
CHECK_OBJ_NOTNULL
(
ent
,
VFP_ENTRY_MAGIC
);
AN
(
ent
->
vfp
);
CAST_OBJ_NOTNULL
(
priv
,
ent
->
vfp
->
priv1
,
VFP_PRIV_MAGIC
);
if
(
ent
->
priv1
!=
NULL
)
{
CAST_OBJ
(
vbr
,
ent
->
priv1
,
VBR_MAGIC
);
if
(
priv
->
stats
!=
NULL
)
priv
->
stats
->
out
+=
vbr
->
stream
.
total_out
;
ent
->
priv1
=
NULL
;
destroy
(
&
vbr
);
}
...
...
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