diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-01-10 14:11:22 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-01-10 14:47:39 -0500 |
commit | 105b94b75b51376128037cab05b930c4e4c15497 (patch) | |
tree | 6e439b3b5d8a716e6c1dff3e9f1eee4ca15fba37 /src/or/config.c | |
parent | 28844c8403f16f184c185798c78dcd6a959450a3 (diff) | |
download | tor-105b94b75b51376128037cab05b930c4e4c15497.tar.gz tor-105b94b75b51376128037cab05b930c4e4c15497.zip |
Add Maxima lists to bandwidth state.
Right now, Tor routers don't save the maxima values from the
bw_history_t between sessions. That's no good, since we use those
values to determine bandwidth. This code adds a new BWHist.*Maximum
set of values to the state file. If they're not present, we estimate
them by taking the observed total bandwidth and dividing it by the
period length, which provides a lower bound.
This should fix bug 1863. I'm calling it a feature.
Diffstat (limited to 'src/or/config.c')
-rw-r--r-- | src/or/config.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/config.c b/src/or/config.c index 17d776e71e..78978dc08c 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -443,15 +443,19 @@ static config_var_t _state_vars[] = { V(BWHistoryReadEnds, ISOTIME, NULL), V(BWHistoryReadInterval, UINT, "900"), V(BWHistoryReadValues, CSV, ""), + V(BWHistoryReadMaxima, CSV, ""), V(BWHistoryWriteEnds, ISOTIME, NULL), V(BWHistoryWriteInterval, UINT, "900"), V(BWHistoryWriteValues, CSV, ""), + V(BWHistoryWriteMaxima, CSV, ""), V(BWHistoryDirReadEnds, ISOTIME, NULL), V(BWHistoryDirReadInterval, UINT, "900"), V(BWHistoryDirReadValues, CSV, ""), + V(BWHistoryDirReadMaxima, CSV, ""), V(BWHistoryDirWriteEnds, ISOTIME, NULL), V(BWHistoryDirWriteInterval, UINT, "900"), V(BWHistoryDirWriteValues, CSV, ""), + V(BWHistoryDirWriteMaxima, CSV, ""), V(TorVersion, STRING, NULL), |