scylladb / seastar

High performance server-side application framework
http://seastar.io
Apache License 2.0
8.36k stars 1.55k forks source link

"smp" metrics are disabled #2375

Open xemul opened 3 months ago

xemul commented 3 months ago

0634989343fa1dd2585ba911383784569f1da5c3 contains such hunk around "smp" group

@@ -2867,49 +2749,22 @@ size_t smp_message_queue::process_incoming() {

 void smp_message_queue::start(unsigned cpuid) {
     _tx.init();
+    namespace sm = seastar::metrics;
     char instance[10];
     std::snprintf(instance, sizeof(instance), "%u-%u", engine().cpu_id(), cpuid);
-    _collectd_regs = scollectd::registrations({
+    _metrics.add_group("smp", {
             // queue_length     value:GAUGE:0:U
             // Absolute value of num packets in last tx batch.
-            scollectd::add_disabled_polled_metric(scollectd::type_instance_id("smp"
-                    , instance
-                    , "queue_length", "send-batch")
-            , scollectd::make_typed(scollectd::data_type::GAUGE, _last_snt_batch)
-            ),
-            scollectd::add_disabled_polled_metric(scollectd::type_instance_id("smp"
-                    , instance
-                    , "queue_length", "receive-batch")
-            , scollectd::make_typed(scollectd::data_type::GAUGE, _last_rcv_batch)
-            ),
-            scollectd::add_disabled_polled_metric(scollectd::type_instance_id("smp"
-                    , instance
-                    , "queue_length", "complete-batch")
-            , scollectd::make_typed(scollectd::data_type::GAUGE, _last_cmpl_batch)
-            ),
-            scollectd::add_disabled_polled_metric(scollectd::type_instance_id("smp"
-                    , instance
-                    , "queue_length", "send-queue-length")
-            , scollectd::make_typed(scollectd::data_type::GAUGE, _current_queue_length)
-            ),
+            sm::make_queue_length("send_batch_queue_length", _last_snt_batch, sm::description("Current send batch queue length"), sm::metric_disabled, instance),
+            sm::make_queue_length("receive_batch_queue_length", _last_rcv_batch, sm::description("Current receive batch queue length"), sm::metric_disabled, instance),
+            sm::make_queue_length("complete_batch_queue_length", _last_cmpl_batch, sm::description("Current complete batch queue length"), sm::metric_disabled, instance),
+            sm::make_queue_length("send_queue_length", _current_queue_length, sm::description("Current send queue length"), sm::metric_disabled, instance),
...

so all the "smp" metrics were marked as "disabled" and they are indeed not reported AFAICT

@amnonh , despite it's been long ago, please comment

tchaikov commented 1 month ago

@amnonh hi Amnon, ping?

amnonh commented 1 month ago

What information do you need? Those metrics are quadratic in their nature and were disabled