diff options
author | Mike Perry <mikeperry-git@torproject.org> | 2022-11-08 20:59:36 +0000 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2022-11-09 11:48:42 -0500 |
commit | 04fafeb2ddb6f6231f961e19ef91867460b1ece4 (patch) | |
tree | 03d8ee467ee9432c3fbe1ae7b34915a749be7d0c | |
parent | 09d32ac667b947da838c2645df1180d8b7ecc36e (diff) | |
download | tor-04fafeb2ddb6f6231f961e19ef91867460b1ece4.tar.gz tor-04fafeb2ddb6f6231f961e19ef91867460b1ece4.zip |
metrics: Reorganize state labels so rate() can be applied
Part of #40708.
-rw-r--r-- | src/feature/relay/relay_metrics.c | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/src/feature/relay/relay_metrics.c b/src/feature/relay/relay_metrics.c index ca8fbe706d..1c8c54d3a8 100644 --- a/src/feature/relay/relay_metrics.c +++ b/src/feature/relay/relay_metrics.c @@ -395,24 +395,6 @@ fill_cc_values(void) 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", "gamma_drop")); - 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("state", "on_circ_close")); metrics_store_entry_add_label(sentry, metrics_format_label("action", "cwnd")); @@ -431,43 +413,43 @@ fill_cc_values(void) sentry = metrics_store_add(the_store, rentry->type, rentry->name, rentry->help); metrics_store_entry_add_label(sentry, - metrics_format_label("state", "xoff")); + metrics_format_label("state", "flow_control")); metrics_store_entry_add_label(sentry, - metrics_format_label("action", "outbuf")); + metrics_format_label("action", "xoff_num_sent")); metrics_store_entry_update(sentry, - tor_llround(cc_stats_flow_xoff_outbuf_ma)); + cc_stats_flow_num_xoff_sent); sentry = metrics_store_add(the_store, rentry->type, rentry->name, rentry->help); metrics_store_entry_add_label(sentry, - metrics_format_label("state", "xoff")); + metrics_format_label("state", "flow_control")); metrics_store_entry_add_label(sentry, - metrics_format_label("action", "num_sent")); + metrics_format_label("action", "xon_num_sent")); metrics_store_entry_update(sentry, - cc_stats_flow_num_xoff_sent); + cc_stats_flow_num_xon_sent); sentry = metrics_store_add(the_store, rentry->type, rentry->name, rentry->help); metrics_store_entry_add_label(sentry, - metrics_format_label("state", "xon")); + metrics_format_label("state", "buffers")); metrics_store_entry_add_label(sentry, - metrics_format_label("action", "outbuf")); + metrics_format_label("action", "xon_outbuf")); metrics_store_entry_update(sentry, tor_llround(cc_stats_flow_xon_outbuf_ma)); sentry = metrics_store_add(the_store, rentry->type, rentry->name, rentry->help); metrics_store_entry_add_label(sentry, - metrics_format_label("state", "xon")); + metrics_format_label("state", "buffers")); metrics_store_entry_add_label(sentry, - metrics_format_label("action", "num_sent")); + metrics_format_label("action", "xoff_outbuf")); metrics_store_entry_update(sentry, - cc_stats_flow_num_xon_sent); + tor_llround(cc_stats_flow_xoff_outbuf_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_format_label("state", "cc_limits")); metrics_store_entry_add_label(sentry, metrics_format_label("action", "above_delta")); metrics_store_entry_update(sentry, cc_stats_vegas_above_delta); @@ -475,7 +457,7 @@ fill_cc_values(void) 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_format_label("state", "cc_limits")); metrics_store_entry_add_label(sentry, metrics_format_label("action", "above_ss_cwnd_max")); metrics_store_entry_update(sentry, cc_stats_vegas_above_ss_cwnd_max); @@ -483,7 +465,25 @@ fill_cc_values(void) 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_format_label("state", "cc_backoff")); + 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)); + + sentry = metrics_store_add(the_store, rentry->type, rentry->name, + rentry->help); + metrics_store_entry_add_label(sentry, + metrics_format_label("state", "cc_backoff")); + metrics_store_entry_add_label(sentry, + metrics_format_label("action", "gamma_drop")); + 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", "cc_backoff")); metrics_store_entry_add_label(sentry, metrics_format_label("action", "delta_drop")); metrics_store_entry_update(sentry, @@ -492,11 +492,11 @@ fill_cc_values(void) 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_format_label("state", "cc_backoff")); metrics_store_entry_add_label(sentry, - metrics_format_label("action", "chan_blocked_pct")); + metrics_format_label("action", "ss_chan_blocked_pct")); metrics_store_entry_update(sentry, - tor_llround(cc_stats_vegas_csig_blocked_ma)); + tor_llround(cc_stats_vegas_ss_csig_blocked_ma)); } /** Helper: Fill in single stream metrics output. */ |