File tree Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Expand file tree Collapse file tree 3 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 12701270 " tokio_total_busy_duration{cluster=~\" $cluster\" , namespace=~\" $namespace\" }"
12711271 ],
12721272 "extra_params" : {
1273+ "unit" : " µs" ,
12731274 "legends" : [
12741275 " {{pod}}"
12751276 ]
12831284 " tokio_min_busy_duration{cluster=~\" $cluster\" , namespace=~\" $namespace\" }"
12841285 ],
12851286 "extra_params" : {
1287+ "unit" : " µs" ,
12861288 "legends" : [
12871289 " {{pod}}"
12881290 ]
12961298 " tokio_max_busy_duration{cluster=~\" $cluster\" , namespace=~\" $namespace\" }"
12971299 ],
12981300 "extra_params" : {
1301+ "unit" : " µs" ,
12991302 "legends" : [
13001303 " {{pod}}"
13011304 ]
Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ pub enum Unit {
8080 // The expected values for PercentUnit are [0,1]
8181 PercentUnit ,
8282 MB ,
83+ Microseconds ,
8384}
8485
8586impl Unit {
@@ -89,6 +90,7 @@ impl Unit {
8990 Unit :: Seconds => "s" ,
9091 Unit :: PercentUnit => "percentunit" ,
9192 Unit :: MB => "decmbytes" ,
93+ Unit :: Microseconds => "µs" ,
9294 }
9395 }
9496}
Original file line number Diff line number Diff line change @@ -9,22 +9,25 @@ use apollo_monitoring_endpoint::tokio_metrics::{
99 TOKIO_WORKERS_COUNT ,
1010} ;
1111
12- use crate :: dashboard:: { Panel , PanelType , Row } ;
12+ use crate :: dashboard:: { Panel , PanelType , Row , Unit } ;
1313
1414// TODO(Matan/Tsabary): Use units for Tokio panels.
1515const TOKIO_PANEL_LEGENDS : & [ & str ] = & [ "{{pod}}" ] ;
1616
1717fn get_panel_tokio_total_busy_duration_micros ( ) -> Panel {
1818 Panel :: from_counter ( & TOKIO_TOTAL_BUSY_DURATION_MICROS , PanelType :: TimeSeries )
1919 . with_legends ( TOKIO_PANEL_LEGENDS . to_vec ( ) )
20+ . with_unit ( Unit :: Microseconds )
2021}
2122fn get_panel_tokio_min_busy_duration_micros ( ) -> Panel {
2223 Panel :: from_counter ( & TOKIO_MIN_BUSY_DURATION_MICROS , PanelType :: TimeSeries )
2324 . with_legends ( TOKIO_PANEL_LEGENDS . to_vec ( ) )
25+ . with_unit ( Unit :: Microseconds )
2426}
2527fn get_panel_tokio_max_busy_duration_micros ( ) -> Panel {
2628 Panel :: from_counter ( & TOKIO_MAX_BUSY_DURATION_MICROS , PanelType :: TimeSeries )
2729 . with_legends ( TOKIO_PANEL_LEGENDS . to_vec ( ) )
30+ . with_unit ( Unit :: Microseconds )
2831}
2932
3033fn get_panel_tokio_total_park_count ( ) -> Panel {
You can’t perform that action at this time.
0 commit comments