From 6b132d4f90ea517f84d84119502ecc8458c3102c Mon Sep 17 00:00:00 2001 From: olehp Date: Thu, 18 Jan 2024 14:30:05 +0200 Subject: [PATCH 1/2] Added additional info for many queries insights --- .../Insights/HighNumberOfQueriesInsight/index.tsx | 7 +++++-- .../Insights/HighNumberOfQueriesInsight/mockData.ts | 3 ++- src/components/Insights/types.ts | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) 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..2aa512d62 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; } From c6c68e6251096681ecd137101395467dccb9e956 Mon Sep 17 00:00:00 2001 From: olehp Date: Thu, 18 Jan 2024 18:29:55 +0200 Subject: [PATCH 2/2] make it optional --- src/components/Insights/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Insights/types.ts b/src/components/Insights/types.ts index 2aa512d62..408627bbd 100644 --- a/src/components/Insights/types.ts +++ b/src/components/Insights/types.ts @@ -677,5 +677,5 @@ export interface EndpointHighNumberOfQueriesInsight extends EndpointInsight { medianDuration: Duration; traceId: string | null; requestFraction: number; - quantile: number; + quantile?: number; }