diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-09-03 14:29:17 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-09-03 14:29:17 -0400 |
commit | 2920d8866767e46d6d6999d12fc6acd3547f22f1 (patch) | |
tree | 60fe1d67cfdad5b565cb0776bfe9e386e8b3464a /src/or/or.h | |
parent | d0acaac781f766a51c869f503af5a431748b55b9 (diff) | |
download | tor-2920d8866767e46d6d6999d12fc6acd3547f22f1.tar.gz tor-2920d8866767e46d6d6999d12fc6acd3547f22f1.zip |
Base our expected bw accounting usage on time before soft limit
Previously, we were also considering the time spent in
soft-hibernation. If this was a long time, we would wind up
underestimating our bandwidth by a lot, and skewing our wakeup time
towards the start of the accounting interval.
This patch also makes us store a few more fields in the state file,
including the time at which we entered soft hibernation.
Fixes bug 1789. Bugfix on 0.0.9pre5.
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/or.h b/src/or/or.h index 48641c8115..2c72bc2bf7 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -2828,6 +2828,9 @@ typedef struct { uint64_t AccountingBytesReadInInterval; uint64_t AccountingBytesWrittenInInterval; int AccountingSecondsActive; + int AccountingSecondsToReachSoftLimit; + time_t AccountingSoftLimitHitAt; + uint64_t AccountingBytesAtSoftLimit; uint64_t AccountingExpectedUsage; /** A list of Entry Guard-related configuration lines. */ |