Skip to content

Commit fbaf2bd

Browse files
ui: enhance metric display
Modified the Axis component for goroutines to dynamically render Metric components based on nodeIDs
1 parent 7625d9f commit fbaf2bd

File tree

1 file changed

+11
-4
lines changed
  • pkg/ui/workspaces/db-console/src/views/cluster/containers/nodeGraphs/dashboards

1 file changed

+11
-4
lines changed

pkg/ui/workspaces/db-console/src/views/cluster/containers/nodeGraphs/dashboards/runtime.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,15 @@ export default function (props: GraphDashboardProps) {
7777
and fall based on load.`}
7878
showMetricsInTooltip={true}
7979
>
80-
<Axis label="goroutines">
81-
<Metric name="cr.node.sys.goroutines" title="Goroutine Count" />
80+
<Axis units={AxisUnits.Count} label="goroutines">
81+
{nodeIDs.map(nid => (
82+
<Metric
83+
key={nid}
84+
name="cr.node.sys.goroutines"
85+
title={nodeDisplayName(nodeDisplayNameByID, nid)}
86+
sources={[nid]}
87+
/>
88+
))}
8289
</Axis>
8390
</LineGraph>,
8491

@@ -129,7 +136,7 @@ export default function (props: GraphDashboardProps) {
129136
title="GC Runs"
130137
sources={nodeSources}
131138
tenantSource={tenantSource}
132-
tooltip={`The number of times that Gos garbage collector was invoked per second ${tooltipSelection}.`}
139+
tooltip={`The number of times that Go's garbage collector was invoked per second ${tooltipSelection}.`}
133140
showMetricsInTooltip={true}
134141
>
135142
<Axis label="runs">
@@ -141,7 +148,7 @@ export default function (props: GraphDashboardProps) {
141148
title="GC Pause Time"
142149
sources={nodeSources}
143150
tenantSource={tenantSource}
144-
tooltip={`The amount of processor time used by Gos garbage collector per second
151+
tooltip={`The amount of processor time used by Go's garbage collector per second
145152
${tooltipSelection}. During garbage collection, application code
146153
execution is paused.`}
147154
showMetricsInTooltip={true}

0 commit comments

Comments
 (0)