diff --git a/ui/packages/shared/profile/src/MetricsGraph/index.tsx b/ui/packages/shared/profile/src/MetricsGraph/index.tsx
index aee77093958..e00d635d9de 100644
--- a/ui/packages/shared/profile/src/MetricsGraph/index.tsx
+++ b/ui/packages/shared/profile/src/MetricsGraph/index.tsx
@@ -184,7 +184,7 @@ export const RawMetricsGraph = ({
const xScale = d3
.scaleUtc()
.domain([from, to])
- .range([0, width - 2 * margin]);
+ .range([0, width - 2.5 * margin]);
const yScale = d3
.scaleLinear()
@@ -381,6 +381,18 @@ export const RawMetricsGraph = ({
setIsContextMenuOpen(isVisible);
};
+ const isDeltaType = profile !== null ? profile?.query.profType.delta : false;
+
+ let yAxisLabel = sampleUnit;
+ if (isDeltaType) {
+ if (profile?.query.profType.periodType === 'cpu' && sampleUnit === 'count') {
+ yAxisLabel = 'CPU Cores';
+ }
+ if (sampleUnit === 'bytes') {
+ yAxisLabel = 'Bytes per Second';
+ }
+ }
+
return (
<>
)}
@@ -436,7 +448,7 @@ export const RawMetricsGraph = ({
)}
-
+
{yScale.ticks(5).map((d, i) => (
@@ -476,6 +488,16 @@ export const RawMetricsGraph = ({
y1={0}
y2={height - margin}
/>
+
+
+ {yAxisLabel}
+
+
+
+
+ Time
+
+
{series.map((s, i) => (