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
ec31b720
Commit
ec31b720
authored
Aug 20, 2013
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
polish
parent
fb980db0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
47 deletions
+59
-47
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+2
-2
v00020.vtc
bin/varnishtest/tests/v00020.vtc
+1
-1
generate.py
lib/libvcl/generate.py
+56
-44
No files found.
bin/varnishd/cache/cache_req_fsm.c
View file @
ec31b720
...
...
@@ -536,7 +536,7 @@ cnt_lookup(struct worker *wrk, struct req *req)
DOT subgraph xcluster_miss {
DOT miss [
DOT shape=record
DOT label="{cnt_miss:|{vcl_miss\{\}|req.*
, bereq.*
}|{<fetch>fetch?|<err>error?|<rst>restart?|<pass>pass?}}"
DOT label="{cnt_miss:|{vcl_miss\{\}|req.*}|{<fetch>fetch?|<err>error?|<rst>restart?|<pass>pass?}}"
DOT ]
DOT }
DOT miss:fetch:s -> fetch [label="fetch",style=bold,color=blue]
...
...
@@ -597,7 +597,7 @@ cnt_miss(struct worker *wrk, struct req *req)
DOT subgraph xcluster_pass {
DOT pass [
DOT shape=record
DOT label="{cnt_pass:|{vcl_pass\{\}|req.*
, bereq.*
}|{<fetch>fetch?|<err>error?|<rst>restart?}}"
DOT label="{cnt_pass:|{vcl_pass\{\}|req.*}|{<fetch>fetch?|<err>error?|<rst>restart?}}"
DOT ]
DOT }
DOT pass:fetch:s -> fetch:n [style=bold, color=red]
...
...
bin/varnishtest/tests/v00020.vtc
View file @
ec31b720
...
...
@@ -242,7 +242,7 @@ varnish v1 -errvcl {'&&' must be followed by BOOL, found DURATION.} {
varnish v1 -vcl {
backend b { .host = "127.0.0.1"; }
sub vcl_
backend_response
{
sub vcl_
miss
{
if (!req.url) {
}
}
...
...
lib/libvcl/generate.py
View file @
ec31b720
...
...
@@ -101,7 +101,7 @@ returns =(
# 'backend' means all methods tagged "B"
# 'both' means all methods tagged "B" or "C"
sp_variables
=
(
sp_variables
=
[
(
'client.ip'
,
'IP'
,
(
'both'
,),
...
...
@@ -224,58 +224,58 @@ sp_variables = (
),
(
'bereq.backend'
,
'BACKEND'
,
(
'backend'
,
),
(
'backend'
,
),
(
'
pipe'
,
'
backend'
,
),
(
'
pipe'
,
'
backend'
,
),
),
(
'bereq.backend.healthy'
,
'BOOL'
,
(
'backend'
,
),
(
'
pipe'
,
'
backend'
,
),
(
),
),
(
'bereq.method'
,
'STRING'
,
(
'pipe'
,
'backend
_fetch'
,
'miss'
,
'backend_response'
,
),
(
'pipe'
,
'backend
_fetch'
,
'miss'
,
'backend_response'
,
),
(
'pipe'
,
'backend
'
,
),
(
'pipe'
,
'backend
'
,
),
),
(
'bereq.request'
,
'STRING'
,
(
'pipe'
,
'backend
_fetch'
,
'miss'
,
'backend_response'
,
),
(
'pipe'
,
'backend
_fetch'
,
'miss'
,
'backend_response'
,
),
(
'pipe'
,
'backend
'
,
),
(
'pipe'
,
'backend
'
,
),
),
(
'bereq.url'
,
'STRING'
,
(
'pipe'
,
'backend
_fetch'
,
'miss'
,
'backend_response'
,
),
(
'pipe'
,
'backend
_fetch'
,
'miss'
,
'backend_response'
,
),
(
'pipe'
,
'backend
'
,
),
(
'pipe'
,
'backend
'
,
),
),
(
'bereq.proto'
,
'STRING'
,
(
'pipe'
,
'backend
_fetch'
,
'miss'
,
'backend_response'
,
),
(
'pipe'
,
'backend
_fetch'
,
'miss'
,
'backend_response'
,
),
(
'pipe'
,
'backend
'
,
),
(
'pipe'
,
'backend
'
,
),
),
(
'bereq.http.'
,
'HEADER'
,
(
'pipe'
,
'backend
_fetch'
,
'miss'
,
'backend_response'
,
),
(
'pipe'
,
'backend
_fetch'
,
'miss'
,
'backend_response'
,
),
(
'pipe'
,
'backend
'
,
),
(
'pipe'
,
'backend
'
,
),
),
(
'bereq.uncacheable'
,
'BOOL'
,
(
'backend
_fetch'
,
'backend_response'
,
),
(
'backend
_fetch'
,
'backend_response'
,
),
(
'backend
'
,
),
(
'backend
'
,
),
),
(
'bereq.connect_timeout'
,
'DURATION'
,
(
'pipe'
,
'backend
_fetch'
,
'miss'
,
),
(
'pipe'
,
'backend
_fetch'
,
'miss'
,
),
(
'pipe'
,
'backend
'
,
),
(
'pipe'
,
'backend
'
,
),
),
(
'bereq.first_byte_timeout'
,
'DURATION'
,
(
'
backend_fetch'
,
'miss'
,
),
(
'
backend_fetch'
,
'miss'
,
),
(
'
pipe'
,
'backend'
,
),
(
'
pipe'
,
'backend'
,
),
),
(
'bereq.between_bytes_timeout'
,
'DURATION'
,
(
'
backend_fetch'
,
'miss'
,
),
(
'
backend_fetch'
,
'miss'
,
),
(
'
pipe'
,
'backend'
,
),
(
'
pipe'
,
'backend'
,
),
),
(
'beresp.proto'
,
'STRING'
,
...
...
@@ -437,7 +437,7 @@ sp_variables = (
(
'all'
,),
(
),
),
)
]
stv_variables
=
(
(
'free_space'
,
'BYTES'
,
"0."
),
...
...
@@ -770,30 +770,41 @@ fo.close()
#######################################################################
def
restrict
(
fo
,
spec
):
if
len
(
spec
)
==
0
:
fo
.
write
(
"
\t\t
0,
\n
"
)
return
if
spec
[
0
]
==
'all'
:
spec
=
vcls
if
spec
[
0
]
==
'client'
:
spec
=
vcls_client
if
spec
[
0
]
==
'backend'
:
spec
=
vcls_backend
if
spec
[
0
]
==
'both'
:
spec
=
vcls_client
spec
+=
vcls_backend
d
=
dict
()
for
j
in
spec
:
if
j
==
'all'
:
for
i
in
vcls
:
d
[
i
]
=
True
elif
j
==
'backend'
:
for
i
in
vcls_backend
:
d
[
i
]
=
True
elif
j
==
'client'
:
for
i
in
vcls_client
:
d
[
i
]
=
True
elif
j
==
'both'
:
for
i
in
vcls_client
:
d
[
i
]
=
True
for
i
in
vcls_backend
:
d
[
i
]
=
True
else
:
assert
j
in
vcls
d
[
j
]
=
True
p
=
""
n
=
0
for
j
in
spec
:
if
n
==
4
:
fo
.
write
(
"
\n
"
)
n
=
0
if
n
==
0
:
fo
.
write
(
"
\t\t
"
)
n
+=
1
fo
.
write
(
p
+
"VCL_MET_"
+
j
.
upper
())
l
=
list
(
d
.
keys
())
l
.
sort
()
w
=
0
fo
.
write
(
"
\t\t
"
)
for
j
in
l
:
x
=
p
+
"VCL_MET_"
+
j
.
upper
()
if
w
+
len
(
x
)
>
60
:
fo
.
write
(
"
\n\t\t
"
)
w
=
0
fo
.
write
(
x
)
w
+=
len
(
x
)
p
=
" | "
if
len
(
d
)
==
0
:
fo
.
write
(
"0"
)
fo
.
write
(
",
\n
"
)
#######################################################################
...
...
@@ -814,6 +825,7 @@ fo.write("""
const struct var vcc_vars[] = {
"""
)
sp_variables
.
sort
()
for
i
in
sp_variables
:
typ
=
i
[
1
]
cnam
=
i
[
0
]
.
replace
(
"."
,
"_"
)
...
...
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