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
bc1d749a
Commit
bc1d749a
authored
Sep 19, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Shave acct_req down to a bodybytes counter, it's all we use it for.
Make pipe mode use the acct_tmp like everybody else.
parent
8faf5870
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
9 deletions
+11
-9
cache.h
bin/varnishd/cache.h
+4
-4
cache_center.c
bin/varnishd/cache_center.c
+3
-2
cache_pipe.c
bin/varnishd/cache_pipe.c
+2
-2
cache_session.c
bin/varnishd/cache_session.c
+2
-1
No files found.
bin/varnishd/cache.h
View file @
bc1d749a
...
...
@@ -218,9 +218,9 @@ struct acct {
/*--------------------------------------------------------------------*/
#define L0(n)
#define L1(
n) uint64_
t n;
#define VSC_F(n, t, l, f, e,d) L##l(n)
#define L0(
t,
n)
#define L1(
t, n)
t n;
#define VSC_F(n, t, l, f, e,d) L##l(
t,
n)
#define VSC_DO_MAIN
struct
dstat
{
#include "vsc_fields.h"
...
...
@@ -615,7 +615,7 @@ struct sess {
struct
sessmem
*
mem
;
VTAILQ_ENTRY
(
sess
)
poollist
;
struct
acct
acct_req
;
uint64_t
req_bodybytes
;
struct
acct
acct_ses
;
#if defined(HAVE_EPOLL_CTL)
...
...
bin/varnishd/cache_center.c
View file @
bc1d749a
...
...
@@ -338,7 +338,8 @@ cnt_done(struct sess *sp)
/* XXX: Add StatReq == StatSess */
/* XXX: Workaround for pipe */
if
(
sp
->
fd
>=
0
)
{
WSP
(
sp
,
SLT_Length
,
"%ju"
,
(
uintmax_t
)
sp
->
acct_req
.
bodybytes
);
WSP
(
sp
,
SLT_Length
,
"%ju"
,
(
uintmax_t
)
sp
->
req_bodybytes
);
}
WSL
(
sp
->
wrk
,
SLT_ReqEnd
,
sp
->
id
,
"%u %.9f %.9f %.9f %.9f %.9f"
,
sp
->
xid
,
sp
->
t_req
,
sp
->
t_end
,
dh
,
dp
,
da
);
...
...
@@ -352,7 +353,7 @@ cnt_done(struct sess *sp)
if
(
sp
->
esi_level
>
0
)
return
(
1
);
memset
(
&
sp
->
acct_req
,
0
,
sizeof
sp
->
acct_req
)
;
sp
->
req_bodybytes
=
0
;
sp
->
t_req
=
NAN
;
sp
->
hash_always_miss
=
0
;
...
...
bin/varnishd/cache_pipe.c
View file @
bc1d749a
...
...
@@ -78,10 +78,10 @@ PipeSession(struct sess *sp)
(
void
)
VTCP_blocking
(
vc
->
fd
);
WRW_Reserve
(
w
,
&
vc
->
fd
);
sp
->
acct_req
.
hdrbytes
+=
http_Write
(
w
,
sp
->
wrk
->
bereq
,
0
);
sp
->
wrk
->
acct_tmp
.
hdrbytes
+=
http_Write
(
w
,
sp
->
wrk
->
bereq
,
0
);
if
(
sp
->
htc
->
pipeline
.
b
!=
NULL
)
sp
->
acct_req
.
bodybytes
+=
sp
->
wrk
->
acct_tmp
.
bodybytes
+=
WRW_Write
(
w
,
sp
->
htc
->
pipeline
.
b
,
Tlen
(
sp
->
htc
->
pipeline
));
i
=
WRW_FlushRelease
(
w
);
...
...
bin/varnishd/cache_session.c
View file @
bc1d749a
...
...
@@ -80,9 +80,10 @@ SES_Charge(struct sess *sp)
{
struct
acct
*
a
=
&
sp
->
wrk
->
acct_tmp
;
sp
->
req_bodybytes
+=
a
->
bodybytes
;
#define ACCT(foo) \
sp->wrk->stats.s_##foo += a->foo; \
sp->acct_req.foo += a->foo; \
sp->acct_ses.foo += a->foo; \
a->foo = 0;
#include "acct_fields.h"
...
...
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