double cc_stats_vegas_exit_ss_cwnd_ma = 0;
double cc_stats_vegas_gamma_drop_ma = 0;
double cc_stats_vegas_delta_drop_ma = 0;
+double cc_stats_vegas_ss_csig_blocked_ma = 0;
+double cc_stats_vegas_csig_blocked_ma = 0;
/* Running count of this moving average. Needed so we can update it. */
static double stats_cwnd_exit_ss_ma_count = 0;
static double stats_cwnd_gamma_drop_ma_count = 0;
static double stats_cwnd_delta_drop_ma_count = 0;
+static double stats_ss_csig_blocked_ma_count = 0;
+static double stats_csig_blocked_ma_count = 0;
/** Stats on how many times we reached "delta" param. */
uint64_t cc_stats_vegas_above_delta = 0;
stats_update_running_avg(cc_stats_vegas_gamma_drop_ma,
cwnd_diff, stats_cwnd_gamma_drop_ma_count);
+ stats_ss_csig_blocked_ma_count++;
+ /* Compute the percentage we experience a blocked csig vs RTT sig */
+ if (cc->blocked_chan) {
+ cc_stats_vegas_ss_csig_blocked_ma =
+ stats_update_running_avg(cc_stats_vegas_ss_csig_blocked_ma,
+ 100, stats_ss_csig_blocked_ma_count);
+ } else {
+ cc_stats_vegas_ss_csig_blocked_ma =
+ stats_update_running_avg(cc_stats_vegas_ss_csig_blocked_ma,
+ 0, stats_ss_csig_blocked_ma_count);
+ }
+
congestion_control_vegas_exit_slow_start(circ, cc);
}
cc_stats_vegas_above_delta++;
} else if (queue_use > cc->vegas_params.beta || cc->blocked_chan) {
+ stats_csig_blocked_ma_count++;
+ /* Compute the percentage we experience a blocked csig vs RTT sig */
+ if (cc->blocked_chan) {
+ cc_stats_vegas_csig_blocked_ma =
+ stats_update_running_avg(cc_stats_vegas_csig_blocked_ma,
+ 100, stats_csig_blocked_ma_count);
+ } else {
+ cc_stats_vegas_csig_blocked_ma =
+ stats_update_running_avg(cc_stats_vegas_csig_blocked_ma,
+ 0, stats_csig_blocked_ma_count);
+ }
+
cc->cwnd -= CWND_INC(cc);
} else if (queue_use < cc->vegas_params.alpha) {
cc->cwnd += CWND_INC(cc);
metrics_store_entry_update(sentry,
tor_llround(cc_stats_vegas_gamma_drop_ma));
+ sentry = metrics_store_add(the_store, rentry->type, rentry->name,
+ rentry->help);
+ metrics_store_entry_add_label(sentry,
+ metrics_format_label("state", "slow_start_exit"));
+ metrics_store_entry_add_label(sentry,
+ metrics_format_label("action", "chan_blocked_pct"));
+ metrics_store_entry_update(sentry,
+ tor_llround(cc_stats_vegas_ss_csig_blocked_ma));
+
sentry = metrics_store_add(the_store, rentry->type, rentry->name,
rentry->help);
metrics_store_entry_add_label(sentry,
metrics_format_label("action", "delta_drop"));
metrics_store_entry_update(sentry,
tor_llround(cc_stats_vegas_delta_drop_ma));
+
+ sentry = metrics_store_add(the_store, rentry->type, rentry->name,
+ rentry->help);
+ metrics_store_entry_add_label(sentry,
+ metrics_format_label("state", "process_sendme"));
+ metrics_store_entry_add_label(sentry,
+ metrics_format_label("action", "chan_blocked_pct"));
+ metrics_store_entry_update(sentry,
+ tor_llround(cc_stats_vegas_csig_blocked_ma));
}
/** Helper: Fill in single stream metrics output. */