diff options
author | Mike Perry <mikeperry-git@fscked.org> | 2009-08-25 17:13:12 -0700 |
---|---|---|
committer | Mike Perry <mikeperry-git@fscked.org> | 2009-09-16 15:48:51 -0700 |
commit | 7750bee21dda817611afd936558834bb21411301 (patch) | |
tree | 69da7d45f0b5d42f220c35f284bf2aafdf18a096 /src/or/or.h | |
parent | 2dbf5b77417cf774f0bb783efd7856b53ab09077 (diff) | |
download | tor-7750bee21dda817611afd936558834bb21411301.tar.gz tor-7750bee21dda817611afd936558834bb21411301.zip |
Clean up Fallon's partially complete GSoC project.
The code actually isn't that bad. It's a shame she didn't finish.
Using it as the base for this feature.
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/or/or.h b/src/or/or.h index 8587ea61fc..be54ab4bf7 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -1884,6 +1884,13 @@ typedef struct crypt_path_t { DH_KEY_LEN) #define ONIONSKIN_REPLY_LEN (DH_KEY_LEN+DIGEST_LEN) +// XXX: Do we want to artifically tweak CircuitIdleTimeout and +// the number of circuits we build at a time if < MIN here? +#define MIN_CIRCUITS_TO_OBSERVE 1000 +#define NCIRCUITS_TO_OBSERVE 10000 /* approx 3 weeks worth of circuits */ +#define BUILDTIME_BIN_WIDTH 50 + + /** Information used to build a circuit. */ typedef struct { /** Intended length of the final circuit. */ @@ -1977,6 +1984,7 @@ typedef struct circuit_t { time_t timestamp_created; /**< When was this circuit created? */ time_t timestamp_dirty; /**< When the circuit was first used, or 0 if the * circuit is clean. */ + struct timeval highres_created; /**< When exactly was this circuit created? */ uint16_t marked_for_close; /**< Should we close this circuit at the end of * the main loop? (If true, holds the line number @@ -2683,6 +2691,11 @@ typedef struct { int BWHistoryWriteInterval; smartlist_t *BWHistoryWriteValues; + /** Build time histogram */ + config_line_t * BuildtimeHistogram; + uint16_t TotalBuildTimes; + + /** What version of Tor wrote this state file? */ char *TorVersion; @@ -2852,6 +2865,11 @@ void bridges_retry_all(void); void entry_guards_free_all(void); +void circuit_build_times_update_state(or_state_t *state); +int circuit_build_times_parse_state(or_state_t *state, char **msg); + + + /********************************* circuitlist.c ***********************/ circuit_t * _circuit_get_global_list(void); |