[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor] 03/05: metrics: Reorganize state labels so rate() can be applied



This is an automated email from the git hooks/post-receive script.

dgoulet pushed a commit to branch main
in repository tor.

commit 04fafeb2ddb6f6231f961e19ef91867460b1ece4
Author: Mike Perry <mikeperry-git@xxxxxxxxxxxxxx>
AuthorDate: Tue Nov 8 20:59:36 2022 +0000

    metrics: Reorganize state labels so rate() can be applied
    
    Part of #40708.
---
 src/feature/relay/relay_metrics.c | 70 +++++++++++++++++++--------------------
 1 file 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
@@ -392,24 +392,6 @@ fill_cc_values(void)
   metrics_store_entry_update(sentry,
                              tor_llround(cc_stats_vegas_exit_ss_cwnd_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", "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,
@@ -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. */

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits