Skip to content

Commit

Permalink
[Profiling] Switch to 19Hz sampling frequency (elastic#202278)
Browse files Browse the repository at this point in the history
With 9.0.0, profiling switches to 19Hz default sampling frequency.
  • Loading branch information
rockdaboot authored and CAWilson94 committed Dec 9, 2024
1 parent 15510b8 commit 9b88197
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
});

Expand All @@ -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
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9b88197

Please sign in to comment.