circuit_build_times_add_timeout_worker(circuit_build_times_t *cbt,
double quantile_cutoff)
{
- /* We want to stay a bit short of 1.0, because longtail is
- * loooooooooooooooooooooooooooooooooooooooooooooooooooong */
build_time_t gentime = circuit_build_times_generate_sample(cbt,
- quantile_cutoff, 0.98);
+ quantile_cutoff, MAX_SYNTHETIC_QUANTILE);
if (gentime < (build_time_t)cbt->timeout*1000) {
log_warn(LD_CIRC,
* RECENT_CIRCUITS before calculating a new timeout */
#define MAX_RECENT_TIMEOUT_RATE 0.7999999
+/** Maximum quantile to use to generate synthetic timeouts.
+ * We want to stay a bit short of 1.0, because longtail is
+ * loooooooooooooooooooooooooooooooooooooooooooooooooooong. */
+#define MAX_SYNTHETIC_QUANTILE 0.98
+
/** Minimum circuits before estimating a timeout */
#define MIN_CIRCUITS_TO_OBSERVE 500
int n = 0;
for (i=0; i < MIN_CIRCUITS_TO_OBSERVE; i++) {
if (circuit_build_times_add_time(&estimate,
- circuit_build_times_generate_sample(&initial, 0, .98)) == 0) {
+ circuit_build_times_generate_sample(&initial, 0,
+ MAX_SYNTHETIC_QUANTILE)) == 0) {
n++;
}
}