Commit 34f4b96a authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

Remove struct sess acct_bit and bit fields from SessClose log record

We want to remove the req->acct_req dup counters that was feeding this
data to reduce the size of struct req. The statistics value of the
boolean flags was also small. So it's going away.
parent 5b17fb21
......@@ -234,12 +234,6 @@ struct acct {
#undef ACCT
};
struct acct_bit {
#define ACCT(foo) unsigned int foo : 1;
#include "tbl/acct_fields.h"
#undef ACCT
};
/*--------------------------------------------------------------------*/
#define L0(t, n)
......@@ -748,8 +742,6 @@ struct sess {
enum sess_close reason;
uint32_t vxid;
struct acct_bit acct_bit;
/* Cross references ------------------------------------------*/
struct sesspool *sesspool;
......
......@@ -81,7 +81,6 @@ SES_Charge(struct worker *wrk, struct req *req)
#define ACCT(foo) \
wrk->stats.s_##foo += a->foo; \
if (a->foo) sp->acct_bit.foo =1; \
a->foo = 0;
#include "tbl/acct_fields.h"
#undef ACCT
......@@ -316,7 +315,6 @@ SES_Close(struct sess *sp, enum sess_close reason)
void
SES_Delete(struct sess *sp, enum sess_close reason, double now)
{
struct acct_bit *b;
struct sesspool *pp;
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
......@@ -332,10 +330,8 @@ SES_Delete(struct sess *sp, enum sess_close reason, double now)
now = VTIM_real();
assert(!isnan(sp->t_open));
b = &sp->acct_bit;
VSL(SLT_SessClose, sp->vxid, "%s %.3f %u %u %u %u %u %u",
sess_close_2str(sp->reason, 0), now - sp->t_open, b->req,
b->pipe, b->pass, b->fetch, b->hdrbytes, b->bodybytes);
VSL(SLT_SessClose, sp->vxid, "%s %.3f",
sess_close_2str(sp->reason, 0), now - sp->t_open);
VSL(SLT_End, sp->vxid, "%s", "");
Lck_Delete(&sp->mtx);
......
......@@ -102,16 +102,10 @@ SLTM(SessOpen, 0, "Client connection opened",
SLTM(SessClose, 0, "Client connection closed",
"SessionClose is the last record for any client connection.\n\n"
"The format is::\n\n"
"\t%s %f %u %u %u %u %u %u\n"
"\t| | | | | | | |\n"
"\t| | | | | | | +- Bool: Body bytes were sent\n"
"\t| | | | | | +---- Bool: Resp.Header bytes sent\n"
"\t| | | | | +------- Bool: Backend fetches initiated\n"
"\t| | | | +---------- Bool: 'pass' used\n"
"\t| | | +------------- Bool: 'pipe' used\n"
"\t| | +---------------- Bool: good requests completed\n"
"\t| +------------------- How long the session was open\n"
"\t+---------------------- Why the connection closed\n"
"\t%s %f\n"
"\t| |\n"
"\t| +- How long the session was open\n"
"\t+---- Why the connection closed\n"
"\n"
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment