diff options
author | Nick Mathewson <nickm@torproject.org> | 2008-04-10 15:12:24 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2008-04-10 15:12:24 +0000 |
commit | b927ede48c3785a14e15b855061aaffe8dc42810 (patch) | |
tree | 522111c11d630f0dce21b37e819bd3628ae0aa2a /src/or | |
parent | c776da9537147d138e22785ca2564696b0439287 (diff) | |
download | tor-b927ede48c3785a14e15b855061aaffe8dc42810.tar tor-b927ede48c3785a14e15b855061aaffe8dc42810.tar.gz |
r15161@31-33-107: nickm | 2008-04-10 11:11:58 -0400
Make dumpstats() log the size and fullness of openssl-internal buffers, so I can test my hypothesis that many of them are empty, and my alternative hypothesis that many of them are mostly empty, against the null hypothesis that we really need to be burning 32K per open OR connection on this.
svn:r14350
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/main.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c index 36c87df8d..55803ae15 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -1611,6 +1611,7 @@ dumpstats(int severity) { time_t now = time(NULL); time_t elapsed; + int rbuf_cap, wbuf_cap, rbuf_len, wbuf_len; log(severity, LD_GENERAL, "Dumping stats:"); @@ -1638,6 +1639,17 @@ dumpstats(int severity) (int)buf_datalen(conn->outbuf), (int)buf_allocation(conn->outbuf), (int)(now - conn->timestamp_lastwritten)); + if (conn->type == CONN_TYPE_OR) { + or_connection_t *or_conn = TO_OR_CONN(conn); + if (or_conn->tls) { + tor_tls_get_buffer_sizes(or_conn->tls, &rbuf_cap, &rbuf_len, + &wbuf_cap, &wbuf_len); + log(severity, LD_GENERAL, + "Conn %d: %d/%d bytes used on openssl read buffer; " + "%d/%d bytes used on write buffer.", + i, rbuf_len, rbuf_cap, wbuf_len, wbuf_cap); + } + } } circuit_dump_by_conn(conn, severity); /* dump info about all the circuits * using this conn */ |