diff --git a/x-pack/plugins/observability_solution/profiling/public/hooks/use_calculate_impact_estimates.test.ts b/x-pack/plugins/observability_solution/profiling/public/hooks/use_calculate_impact_estimates.test.ts index 1c4017a468eae..4bb49fcf8ac55 100644 --- a/x-pack/plugins/observability_solution/profiling/public/hooks/use_calculate_impact_estimates.test.ts +++ b/x-pack/plugins/observability_solution/profiling/public/hooks/use_calculate_impact_estimates.test.ts @@ -40,9 +40,9 @@ describe('useCalculateImpactEstimate', () => { it('calculates impact when countExclusive is lower than countInclusive', () => { const calculateImpactEstimates = useCalculateImpactEstimate(); const { selfCPU, totalCPU, totalSamples } = calculateImpactEstimates({ - countExclusive: 500, - countInclusive: 1000, - totalSamples: 10000, + countExclusive: 475, + countInclusive: 950, + totalSamples: 9500, totalSeconds: 15 * 60, // 15m }); @@ -68,9 +68,9 @@ describe('useCalculateImpactEstimate', () => { it('calculates impact', () => { const calculateImpactEstimates = useCalculateImpactEstimate(); const { selfCPU, totalCPU, totalSamples } = calculateImpactEstimates({ - countExclusive: 1000, - countInclusive: 1000, - totalSamples: 10000, + countExclusive: 950, + countInclusive: 950, + totalSamples: 9500, totalSeconds: 15 * 60, // 15m }); diff --git a/x-pack/plugins/observability_solution/profiling/public/hooks/use_calculate_impact_estimates.ts b/x-pack/plugins/observability_solution/profiling/public/hooks/use_calculate_impact_estimates.ts index d148e0cc262dd..a56f8c96d95db 100644 --- a/x-pack/plugins/observability_solution/profiling/public/hooks/use_calculate_impact_estimates.ts +++ b/x-pack/plugins/observability_solution/profiling/public/hooks/use_calculate_impact_estimates.ts @@ -28,7 +28,7 @@ export function useCalculateImpactEstimate() { totalSeconds: number; }) { const annualizedScaleUp = ANNUAL_SECONDS / totalSeconds; - const totalCoreSeconds = totalSamples / 20; + const totalCoreSeconds = totalSamples / 19; const percentage = samples / totalSamples; const coreSeconds = totalCoreSeconds * percentage; const annualizedCoreSeconds = coreSeconds * annualizedScaleUp;