txresp -body {Man is distinguished, not only by his reason, but by this singular passion from other animals, which is a lust of the mind, that by a perseverance of delight in the continued and indefatigable generation of knowledge, exceeds the short vehemence of any carnal pleasure.}
txresp -body {Man is distinguished, not only by his reason, but by this singular passion from other animals, which is a lust of the mind, that by a perseverance of delight in the continued and indefatigable generation of knowledge, exceeds the short vehemence of any carnal pleasure.}
}
}
} -start
} -start
client c1 {
client c1 {
loop 100 {
loop 10 {
txreq
txreq
rxresp
rxresp
expect resp.status == 200
expect resp.status == 200
...
@@ -19,7 +19,10 @@ client c1 {
...
@@ -19,7 +19,10 @@ client c1 {
}
}
}
}
varnish v1 -vcl+backend {
# Debug param vclrel causes VCLs to be released without delay. This
# makes it possible to check the effects of temperature changes (stats
# are hidden and revealed as VCLs go cold and warm).
varnish v1 -arg "-p debug=+vclrel" -vcl+backend {
import ${vmod_brotli};
import ${vmod_brotli};
sub vcl_backend_response {
sub vcl_backend_response {
...
@@ -32,5 +35,60 @@ client c1 -run
...
@@ -32,5 +35,60 @@ client c1 -run
varnish v1 -vsc BROTLI.*
varnish v1 -vsc BROTLI.*
varnish v1 -expect BROTLI.br.ops == 100
varnish v1 -expect BROTLI.br.ops == 10
varnish v1 -expect BROTLI.unbr.ops == 100
varnish v1 -expect BROTLI.unbr.ops == 10
varnish v1 -vcl+backend {
import ${vmod_brotli};
sub vcl_init {
new mybr = brotli.encoder("mybr");
mybr.create_stats();
}
sub vcl_backend_response {
set beresp.filters = "mybr unbr";
set beresp.uncacheable = true;
}
}
varnish v1 -cliok "vcl.discard vcl1"
varnish v1 -cliok "vcl.list"
varnish v1 -vsc BROTLI.*
varnish v1 -expect BROTLI.br.ops == 10
varnish v1 -expect BROTLI.unbr.ops == 10
server s1 -wait
server s1 -start
client c1 -run
varnish v1 -vsc BROTLI.*
varnish v1 -expect BROTLI.br.ops == 10
varnish v1 -expect BROTLI.unbr.ops == 20
varnish v1 -expect BROTLI.vcl2.mybr.ops == 10
varnish v1 -vcl+backend {}
varnish v1 -cliok "vcl.state vcl2 cold"
# With vcl2 in the cold state, stats for vcl2.mybr do not appear.
# 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.unbr.ops == 20
varnish v1 -cliok "vcl.state vcl2 warm"
# With vcl2 back in the warm state, stats for vcl2.mybr appear again.