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
389d7ba2
Commit
389d7ba2
authored
Dec 16, 2021
by
Dridi Boukelmoune
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pipe: Add missing Start and Process timestamps
And expose bereq.time in vcl_pipe now that we have some. Refs #3562
parent
3404553b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
1 deletion
+26
-1
cache_req_fsm.c
bin/varnishd/cache/cache_req_fsm.c
+3
-0
b00030.vtc
bin/varnishtest/tests/b00030.vtc
+14
-0
v00051.vtc
bin/varnishtest/tests/v00051.vtc
+1
-0
vcl_var.rst
doc/sphinx/reference/vcl_var.rst
+1
-1
vsl.rst
doc/sphinx/reference/vsl.rst
+7
-0
No files found.
bin/varnishd/cache/cache_req_fsm.c
View file @
389d7ba2
...
...
@@ -766,6 +766,7 @@ cnt_pipe(struct worker *wrk, struct req *req)
CHECK_OBJ_NOTNULL
(
bo
,
BUSYOBJ_MAGIC
);
VSLb
(
bo
->
vsl
,
SLT_Begin
,
"bereq %u pipe"
,
VXID
(
req
->
vsl
->
wid
));
VSLb
(
req
->
vsl
,
SLT_Link
,
"bereq %u pipe"
,
VXID
(
bo
->
vsl
->
wid
));
VSLb_ts_busyobj
(
bo
,
"Start"
,
W_TIM_real
(
wrk
));
THR_SetBusyobj
(
bo
);
bo
->
sp
=
req
->
sp
;
SES_Ref
(
bo
->
sp
);
...
...
@@ -792,6 +793,8 @@ cnt_pipe(struct worker *wrk, struct req *req)
nxt
=
REQ_FSM_MORE
;
break
;
case
VCL_RET_PIPE
:
VSLb_ts_req
(
req
,
"Process"
,
W_TIM_real
(
wrk
));
VSLb_ts_busyobj
(
bo
,
"Process"
,
wrk
->
lastused
);
if
(
V1P_Enter
()
==
0
)
{
AZ
(
bo
->
req
);
bo
->
req
=
req
;
...
...
bin/varnishtest/tests/b00030.vtc
View file @
389d7ba2
...
...
@@ -7,7 +7,14 @@ varnishtest "Test timestamps"
server s1 {
rxreq
txresp
rxreq
txresp
rxreq
expect req.method == PIPE
expect req.http.req-time != <undef>
expect req.http.bereq-time != <undef>
txresp
} -start
...
...
@@ -31,6 +38,10 @@ varnish v1 -vcl+backend {
return (fail);
}
}
sub vcl_pipe {
set bereq.http.req-time = req.time;
set bereq.http.bereq-time = bereq.time;
}
sub vcl_synth {
set resp.http.now-synth = now;
if (req.http.req-time != "" + req.time) {
...
...
@@ -110,4 +121,7 @@ client c1 {
rxresp
expect resp.status == 200
expect resp.http.now-synth ~ "^..., .. ... .... ..:..:.. GMT"
txreq -method PIPE
rxresp
} -run
bin/varnishtest/tests/v00051.vtc
View file @
389d7ba2
...
...
@@ -182,6 +182,7 @@ varnish v1 -expect sc_vcl_failure == 4
logexpect l1012 -v v1 -g vxid -q "vxid == 1012" {
expect 0 1012 Begin {^bereq 1011 pipe}
expect 0 = Timestamp {^Start:}
expect 0 = BereqMethod {^GET}
expect 0 = BereqURL {^/}
expect 0 = BereqProtocol {^HTTP/1.1}
...
...
doc/sphinx/reference/vcl_var.rst
View file @
389d7ba2
...
...
@@ -690,7 +690,7 @@ bereq.time
Type: TIME
Readable from: backend
Readable from:
vcl_pipe,
backend
The time when we started preparing the first backend request,
remains constant across retries.
...
...
doc/sphinx/reference/vsl.rst
View file @
389d7ba2
...
...
@@ -79,12 +79,19 @@ Restart
Pipe handling timestamps
~~~~~~~~~~~~~~~~~~~~~~~~
The following timestamps are client timestamps specific to pipe transactions:
Pipe
Opened a pipe to the backend and forwarded the request.
PipeSess
The pipe session has finished.
The following timestamps change meaning in a pipe transaction:
Process
Processing finished, ready to begin the pipe delivery.
Backend fetch timestamps
~~~~~~~~~~~~~~~~~~~~~~~~
...
...
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