diff --git a/public/pages/QueryDetails/Components/QuerySummary.tsx b/public/pages/QueryDetails/Components/QuerySummary.tsx
index 1e4fd62..564aeb0 100644
--- a/public/pages/QueryDetails/Components/QuerySummary.tsx
+++ b/public/pages/QueryDetails/Components/QuerySummary.tsx
@@ -46,27 +46,15 @@ const QuerySummary = ({ query }: { query: SearchQueryRecord }) => {
diff --git a/public/pages/QueryGroupDetails/Components/QueryGroupAggregateSummary.tsx b/public/pages/QueryGroupDetails/Components/QueryGroupAggregateSummary.tsx
index 7047782..689e55d 100644
--- a/public/pages/QueryGroupDetails/Components/QueryGroupAggregateSummary.tsx
+++ b/public/pages/QueryGroupDetails/Components/QueryGroupAggregateSummary.tsx
@@ -40,31 +40,20 @@ export const QueryGroupAggregateSummary = ({ query }: { query: any }) => {
diff --git a/public/pages/QueryInsights/QueryInsights.tsx b/public/pages/QueryInsights/QueryInsights.tsx
index 230ae71..7e038ad 100644
--- a/public/pages/QueryInsights/QueryInsights.tsx
+++ b/public/pages/QueryInsights/QueryInsights.tsx
@@ -12,12 +12,12 @@ import { QUERY_INSIGHTS } from '../TopNQueries/TopNQueries';
import { SearchQueryRecord } from '../../../types/types';
import {
CPU_TIME,
+ ID,
INDICES,
LATENCY,
MEMORY_USAGE,
NODE_ID,
QUERY_COUNT,
- ID,
SEARCH_TYPE,
TIMESTAMP,
TOTAL_SHARDS,
@@ -160,13 +160,13 @@ const QueryInsights = ({
field: MEASUREMENTS_FIELD,
name: LATENCY,
render: (measurements: SearchQueryRecord['measurements']) => {
- const result = calculateMetric(
+ return calculateMetric(
measurements?.latency?.number,
measurements?.latency?.count,
+ 'ms',
1,
METRIC_DEFAULT_MSG
);
- return `${result} ms`;
},
sortable: true,
truncateText: true,
@@ -175,13 +175,13 @@ const QueryInsights = ({
field: MEASUREMENTS_FIELD,
name: CPU_TIME,
render: (measurements: SearchQueryRecord['measurements']) => {
- const result = calculateMetric(
+ return calculateMetric(
measurements?.cpu?.number,
measurements?.cpu?.count,
+ 'ms',
1000000, // Divide by 1,000,000 for CPU time
METRIC_DEFAULT_MSG
);
- return `${result} ms`;
},
sortable: true,
truncateText: true,
@@ -190,13 +190,13 @@ const QueryInsights = ({
field: MEASUREMENTS_FIELD,
name: MEMORY_USAGE,
render: (measurements: SearchQueryRecord['measurements']) => {
- const result = calculateMetric(
+ return calculateMetric(
measurements?.memory?.number,
measurements?.memory?.count,
+ 'B',
1,
METRIC_DEFAULT_MSG
);
- return `${result} B`;
},
sortable: true,
truncateText: true,
diff --git a/public/pages/QueryInsights/__snapshots__/QueryInsights.test.tsx.snap b/public/pages/QueryInsights/__snapshots__/QueryInsights.test.tsx.snap
index 74fde68..a310a4b 100644
--- a/public/pages/QueryInsights/__snapshots__/QueryInsights.test.tsx.snap
+++ b/public/pages/QueryInsights/__snapshots__/QueryInsights.test.tsx.snap
@@ -827,7 +827,7 @@ exports[`QueryInsights Component renders the table with the correct columns and
- Not enabled B
+ Not enabled
|