@@ -9,11 +9,8 @@ import React from "react";
9
9
import LineGraph from "src/views/cluster/components/linegraph" ;
10
10
import { Metric , Axis } from "src/views/shared/components/metricQuery" ;
11
11
12
- import {
13
- GraphDashboardProps ,
14
- nodeDisplayName ,
15
- storeIDsForNode ,
16
- } from "./dashboardUtils" ;
12
+ import { GraphDashboardProps , nodeDisplayName } from "./dashboardUtils" ;
13
+ import { storeMetrics } from "./storeUtils" ;
17
14
18
15
export default function ( props : GraphDashboardProps ) {
19
16
const {
@@ -66,36 +63,32 @@ export default function (props: GraphDashboardProps) {
66
63
67
64
< LineGraph
68
65
title = "Admission IO Tokens Exhausted Duration Per Second"
69
- sources = { nodeSources }
66
+ sources = { storeSources }
70
67
tenantSource = { tenantSource }
71
68
showMetricsInTooltip = { true }
72
69
tooltip = { `Relative time the node had exhausted IO tokens for all IO-bound work per second of wall time, measured in microseconds/second. Increased IO token exhausted duration indicates IO resource exhaustion.` }
73
70
>
74
71
< Axis label = "Duration (micros/sec)" >
75
- { nodeIDs . map ( nid => (
76
- < >
77
- < Metric
78
- key = { nid }
79
- name = "cr.node.admission.granter.io_tokens_exhausted_duration.kv"
80
- title = {
81
- "Regular (Foreground) " +
82
- nodeDisplayName ( nodeDisplayNameByID , nid )
83
- }
84
- sources = { [ nid ] }
85
- nonNegativeRate
86
- />
87
- < Metric
88
- key = { nid }
89
- name = "cr.node.admission.granter.elastic_io_tokens_exhausted_duration.kv"
90
- title = {
91
- "Elastic (Background) " +
92
- nodeDisplayName ( nodeDisplayNameByID , nid )
93
- }
94
- sources = { [ nid ] }
95
- nonNegativeRate
96
- />
97
- </ >
98
- ) ) }
72
+ { storeMetrics (
73
+ {
74
+ name : "cr.store.admission.granter.io_tokens_exhausted_duration.kv" ,
75
+ nonNegativeRate : true ,
76
+ aggregateMax : true ,
77
+ } ,
78
+ nodeIDs ,
79
+ storeIDsByNodeID ,
80
+ "regular (foreground)" ,
81
+ ) }
82
+ { storeMetrics (
83
+ {
84
+ name : "cr.store.admission.granter.elastic_io_tokens_exhausted_duration.kv" ,
85
+ nonNegativeRate : true ,
86
+ aggregateMax : true ,
87
+ } ,
88
+ nodeIDs ,
89
+ storeIDsByNodeID ,
90
+ "elastic (background)" ,
91
+ ) }
99
92
</ Axis >
100
93
</ LineGraph > ,
101
94
@@ -107,16 +100,14 @@ export default function (props: GraphDashboardProps) {
107
100
showMetricsInTooltip = { true }
108
101
>
109
102
< Axis label = "Score" >
110
- { nodeIDs . map ( nid => (
111
- < >
112
- < Metric
113
- key = { nid }
114
- name = "cr.store.admission.io.overload"
115
- title = { nodeDisplayName ( nodeDisplayNameByID , nid ) }
116
- sources = { storeIDsForNode ( storeIDsByNodeID , nid ) }
117
- />
118
- </ >
119
- ) ) }
103
+ { storeMetrics (
104
+ {
105
+ name : "cr.store.admission.io.overload" ,
106
+ aggregateMax : true ,
107
+ } ,
108
+ nodeIDs ,
109
+ storeIDsByNodeID ,
110
+ ) }
120
111
</ Axis >
121
112
</ LineGraph > ,
122
113
@@ -178,30 +169,30 @@ export default function (props: GraphDashboardProps) {
178
169
179
170
< LineGraph
180
171
title = "Admission Queueing Delay p99 – Store"
181
- sources = { nodeSources }
172
+ sources = { storeSources }
182
173
tenantSource = { tenantSource }
183
174
showMetricsInTooltip = { true }
184
175
tooltip = { `The 99th percentile latency of requests waiting in the Admission Control store queue.` }
185
176
>
186
177
< Axis units = { AxisUnits . Duration } label = "Write Delay Duration" >
187
- { nodeIDs . map ( nid => (
188
- < >
189
- < Metric
190
- key = { nid }
191
- name = "cr.node.admission.wait_durations.kv-stores-p99"
192
- title = { "KV " + nodeDisplayName ( nodeDisplayNameByID , nid ) }
193
- sources = { [ nid ] }
194
- downsampleMax
195
- />
196
- < Metric
197
- key = { nid }
198
- name = "cr.node .admission.wait_durations.elastic-stores-p99"
199
- title = { "Elastic " + nodeDisplayName ( nodeDisplayNameByID , nid ) }
200
- sources = { [ nid ] }
201
- downsampleMax
202
- />
203
- </ >
204
- ) ) }
178
+ { storeMetrics (
179
+ {
180
+ name : "cr.store.admission.wait_durations.kv-stores-p99" ,
181
+ aggregateMax : true ,
182
+ } ,
183
+ nodeIDs ,
184
+ storeIDsByNodeID ,
185
+ "KV" ,
186
+ ) }
187
+ { storeMetrics (
188
+ {
189
+ name : "cr.store .admission.wait_durations.elastic-stores-p99" ,
190
+ aggregateMax : true ,
191
+ } ,
192
+ nodeIDs ,
193
+ storeIDsByNodeID ,
194
+ "elastic" ,
195
+ ) }
205
196
</ Axis >
206
197
</ LineGraph > ,
207
198
@@ -420,16 +411,14 @@ export default function (props: GraphDashboardProps) {
420
411
showMetricsInTooltip = { true }
421
412
>
422
413
< Axis label = "Count" >
423
- { nodeIDs . map ( nid => (
424
- < >
425
- < Metric
426
- key = { nid }
427
- name = "cr.store.storage.l0-sublevels"
428
- title = { nodeDisplayName ( nodeDisplayNameByID , nid ) }
429
- sources = { storeIDsForNode ( storeIDsByNodeID , nid ) }
430
- />
431
- </ >
432
- ) ) }
414
+ { storeMetrics (
415
+ {
416
+ name : "cr.store.storage.l0-sublevels" ,
417
+ aggregateMax : true ,
418
+ } ,
419
+ nodeIDs ,
420
+ storeIDsByNodeID ,
421
+ ) }
433
422
</ Axis >
434
423
</ LineGraph > ,
435
424
] ;
0 commit comments