Commit 2b85b01b authored by Geoff Simmons's avatar Geoff Simmons

varnishevent: monitoring stats for writer threads include bytes written

parent 367e8492
......@@ -76,10 +76,11 @@ static char *obuf = NULL;
static pthread_mutex_t reopen_lock = PTHREAD_MUTEX_INITIALIZER;
/* stats */
static unsigned deqs = 0;
static unsigned waits = 0;
static unsigned writes = 0;
static unsigned errors = 0;
static unsigned long deqs = 0;
static unsigned long bytes = 0;
static unsigned long waits = 0;
static unsigned long writes = 0;
static unsigned long errors = 0;
typedef struct writer_data_s {
unsigned magic;
......@@ -166,6 +167,7 @@ wrt_write(logline_t *ll)
}
writes++;
bytes += VSB_len(os);
MON_StatsUpdate(STATS_WRITTEN);
/* clean up */
......@@ -276,8 +278,10 @@ WRT_Stats(void)
if (!run) return;
LOG_Log(LOG_INFO,
"Writer (%s): seen=%u writes=%u errors=%u waits=%u free=%u",
statename[wrt_data.state], deqs, writes, errors, waits, wrt_nfree);
"Writer (%s): seen=%lu writes=%lu bytes=%lu errors=%lu waits=%lu"
" free=%u",
statename[wrt_data.state], deqs, writes, bytes, errors, waits,
wrt_nfree);
}
int
......
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