Commit 4601ddcd authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Fix some stats-counter issues scoof pointed out yesterday:

n_objsendfile is of course no longer relevant.

That makes n_objwrite pointless.

n_objoverflow was unused.

and threads_failed were not incremented where it should be.
parent b8e04e61
......@@ -340,7 +340,7 @@ pool_breed(struct pool *qp, const pthread_attr_t *tp_attr)
VSL(SLT_Debug, 0, "Create worker thread failed %d %s",
errno, strerror(errno));
Lck_Lock(&pool_mtx);
VSC_C_main->threads_limited++;
VSC_C_main->threads_failed++;
Lck_Unlock(&pool_mtx);
VTIM_sleep(cache_param->wthread_fail_delay * 1e-3);
} else {
......
......@@ -168,8 +168,6 @@ res_WriteGunzipObj(const struct sess *sp)
CHECK_OBJ_NOTNULL(st, STORAGE_MAGIC);
u += st->len;
VSC_C_main->n_objwrite++;
i = VGZ_WrwGunzip(sp->wrk, vg, st->ptr, st->len);
/* XXX: error check */
(void)i;
......@@ -215,7 +213,6 @@ res_WriteDirObj(const struct sess *sp, ssize_t low, ssize_t high)
ptr += len;
sp->wrk->acct_tmp.bodybytes += len;
VSC_C_main->n_objwrite++;
(void)WRW_Write(sp->wrk, st->ptr + off, len);
}
assert(u == sp->req->obj->len);
......
......@@ -304,22 +304,6 @@ VSC_F(losthdr, uint64_t, 0, 'a',
""
)
VSC_F(n_objsendfile, uint64_t, 0, 'a',
"Objects sent with sendfile",
"The number of objects sent with the sendfile system call. If enabled "
"sendfile will be used on object larger than a certain size."
)
VSC_F(n_objwrite, uint64_t, 0, 'a',
"Objects sent with write",
"The number of objects sent with regular write calls."
"Writes are used when the objects are too small for sendfile "
"or if the sendfile call has been disabled"
)
VSC_F(n_objoverflow, uint64_t, 1, 'a',
"Objects overflowing workspace",
""
)
VSC_F(s_sess, uint64_t, 1, 'a',
"Total Sessions",
""
......
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