diff --git a/src/components/Insights/HighNumberOfQueriesInsight/index.tsx b/src/components/Insights/HighNumberOfQueriesInsight/index.tsx index 07d2dcb1d..28a6c5e91 100644 --- a/src/components/Insights/HighNumberOfQueriesInsight/index.tsx +++ b/src/components/Insights/HighNumberOfQueriesInsight/index.tsx @@ -13,7 +13,9 @@ import { HighNumberOfQueriesInsightProps } from "./types"; export const HighNumberOfQueriesInsight = ( props: HighNumberOfQueriesInsightProps ) => { - const traceId = props.insight.traceId; + const { insight } = props; + const traceId = insight.traceId; + const handleTraceButtonClick = ( trace: Trace, insightType: InsightType, @@ -24,10 +26,11 @@ export const HighNumberOfQueriesInsight = ( return ( + {insight.quantile && insight.quantile === 0.95 && "Affecting the slowest 5% of requests. " } Consider using joins or caching responses to reduce database round trips diff --git a/src/components/Insights/HighNumberOfQueriesInsight/mockData.ts b/src/components/Insights/HighNumberOfQueriesInsight/mockData.ts index a95b4325d..adb1bd385 100644 --- a/src/components/Insights/HighNumberOfQueriesInsight/mockData.ts +++ b/src/components/Insights/HighNumberOfQueriesInsight/mockData.ts @@ -67,5 +67,6 @@ export const mockedHighNumberOfQueriesInsight: EndpointHighNumberOfQueriesInsigh prefixedCodeObjectId: "method:org.springframework.samples.petclinic.owner.PetController$_$processCreationForm", customStartTime: null, - actualStartTime: "2023-08-10T08:04:00Z" + actualStartTime: "2023-08-10T08:04:00Z", + quantile: 0.95, }; diff --git a/src/components/Insights/types.ts b/src/components/Insights/types.ts index 9ce74bf08..408627bbd 100644 --- a/src/components/Insights/types.ts +++ b/src/components/Insights/types.ts @@ -677,4 +677,5 @@ export interface EndpointHighNumberOfQueriesInsight extends EndpointInsight { medianDuration: Duration; traceId: string | null; requestFraction: number; + quantile?: number; }