diff --git a/src/platform/packages/shared/kbn-profiling-utils/common/__fixtures__/base_flamegraph.ts b/src/platform/packages/shared/kbn-profiling-utils/common/__fixtures__/base_flamegraph.ts index 20f305596152d..2a932bb221dec 100644 --- a/src/platform/packages/shared/kbn-profiling-utils/common/__fixtures__/base_flamegraph.ts +++ b/src/platform/packages/shared/kbn-profiling-utils/common/__fixtures__/base_flamegraph.ts @@ -289,7 +289,6 @@ export const baseFlamegraph: BaseFlameGraph = { Size: 35, SamplingRate: 1, SelfCPU: 7, - TotalCPU: 245, TotalSamples: 7, TotalSeconds: 4.980000019073486, }; diff --git a/src/platform/packages/shared/kbn-profiling-utils/common/__fixtures__/stacktraces.ts b/src/platform/packages/shared/kbn-profiling-utils/common/__fixtures__/stacktraces.ts index 82d9b92285a5b..4b177762190d7 100644 --- a/src/platform/packages/shared/kbn-profiling-utils/common/__fixtures__/stacktraces.ts +++ b/src/platform/packages/shared/kbn-profiling-utils/common/__fixtures__/stacktraces.ts @@ -169,6 +169,5 @@ export const stacktraces: StackTraceResponse = { }, executables: { '5JfXt00O17Yra2Rwh8HT8Q': 'vmlinux', fwIcP8qXDOl7k0VhWU8z9Q: 'metricbeat' }, stack_trace_events: { ['c2TovSbgCECd_RtKHxMtyQ']: 7 }, - total_frames: 34, sampling_rate: 1, }; diff --git a/src/platform/packages/shared/kbn-profiling-utils/common/flamegraph.ts b/src/platform/packages/shared/kbn-profiling-utils/common/flamegraph.ts index 9b8dc42b9463c..c79fb561c96cf 100644 --- a/src/platform/packages/shared/kbn-profiling-utils/common/flamegraph.ts +++ b/src/platform/packages/shared/kbn-profiling-utils/common/flamegraph.ts @@ -47,7 +47,6 @@ export interface BaseFlameGraph { /** sampling rate */ SamplingRate: number; TotalSamples: number; - TotalCPU: number; SelfCPU: number; AnnualCO2TonsExclusive: number[]; AnnualCO2TonsInclusive: number[]; @@ -125,7 +124,6 @@ export function createFlameGraph( TotalSeconds: base.TotalSeconds, TotalSamples: base.TotalSamples, SelfCPU: base.SelfCPU, - TotalCPU: base.TotalCPU, SelfAnnualCO2KgsItems: base.AnnualCO2TonsExclusive.map(convertTonsToKgs), TotalAnnualCO2KgsItems: base.AnnualCO2TonsInclusive.map(convertTonsToKgs), SelfAnnualCostsUSDItems: base.AnnualCostsUSDExclusive, diff --git a/src/platform/packages/shared/kbn-profiling-utils/common/stack_traces.test.ts b/src/platform/packages/shared/kbn-profiling-utils/common/stack_traces.test.ts index 7b8975c1b678a..e050977226a65 100644 --- a/src/platform/packages/shared/kbn-profiling-utils/common/stack_traces.test.ts +++ b/src/platform/packages/shared/kbn-profiling-utils/common/stack_traces.test.ts @@ -17,7 +17,6 @@ import { describe('Stack trace response operations', () => { test('empty stack trace response', () => { const original: StackTraceResponse = { - total_frames: 0, sampling_rate: 1.0, }; @@ -26,7 +25,6 @@ describe('Stack trace response operations', () => { stackTraces: new Map(), stackFrames: new Map(), executables: new Map(), - totalFrames: 0, samplingRate: 1.0, }; @@ -43,9 +41,6 @@ describe('Stack trace response operations', () => { expect(decoded.events.size).toEqual(expected.events.size); expect(decoded.events.size).toEqual(0); - - expect(decoded.totalFrames).toEqual(expected.totalFrames); - expect(decoded.totalFrames).toEqual(0); }); test('stack trace response without undefineds', () => { @@ -82,7 +77,6 @@ describe('Stack trace response operations', () => { abc: 'pthread.c', def: 'def.c', }, - total_frames: 1, sampling_rate: 1.0, }; @@ -138,7 +132,6 @@ describe('Stack trace response operations', () => { ['abc', { FileName: 'pthread.c' }], ['def', { FileName: 'def.c' }], ]), - totalFrames: 1, samplingRate: 1.0, }; @@ -155,9 +148,6 @@ describe('Stack trace response operations', () => { expect(decoded.events.size).toEqual(expected.events.size); expect(decoded.events.size).toEqual(1); - - expect(decoded.totalFrames).toEqual(expected.totalFrames); - expect(decoded.totalFrames).toEqual(1); }); test('stack trace response with undefineds', () => { @@ -188,7 +178,6 @@ describe('Stack trace response operations', () => { executables: { abc: 'pthread.c', }, - total_frames: 1, }; const expected: DecodedStackTraceResponse = { @@ -220,7 +209,6 @@ describe('Stack trace response operations', () => { ], ]), executables: new Map([['abc', { FileName: 'pthread.c' }]]), - totalFrames: 1, samplingRate: 1.0, }; @@ -237,8 +225,5 @@ describe('Stack trace response operations', () => { expect(decoded.events.size).toEqual(expected.events.size); expect(decoded.events.size).toEqual(1); - - expect(decoded.totalFrames).toEqual(expected.totalFrames); - expect(decoded.totalFrames).toEqual(1); }); }); diff --git a/src/platform/packages/shared/kbn-profiling-utils/common/stack_traces.ts b/src/platform/packages/shared/kbn-profiling-utils/common/stack_traces.ts index 339294db67ba6..9826cca491778 100644 --- a/src/platform/packages/shared/kbn-profiling-utils/common/stack_traces.ts +++ b/src/platform/packages/shared/kbn-profiling-utils/common/stack_traces.ts @@ -79,8 +79,6 @@ export interface StackTraceResponse { ['stack_frames']?: ProfilingStackFrames; /** executables */ ['executables']?: ProfilingExecutables; - /** total frames */ - ['total_frames']: number; /** sampling rate */ ['sampling_rate']: number; } @@ -95,8 +93,6 @@ export interface DecodedStackTraceResponse { stackFrames: Map; /** Map of file ID and Executables */ executables: Map; - /** Total number of frames */ - totalFrames: number; /** sampling rate */ samplingRate: number; } @@ -207,7 +203,6 @@ export function decodeStackTraceResponse( stackTraces, stackFrames, executables, - totalFrames: response.total_frames, samplingRate: response.sampling_rate, }; } diff --git a/x-pack/solutions/observability/plugins/profiling/common/__fixtures__/base_flamegraph.ts b/x-pack/solutions/observability/plugins/profiling/common/__fixtures__/base_flamegraph.ts index 5cb42de5f4347..6aba9e161d07f 100644 --- a/x-pack/solutions/observability/plugins/profiling/common/__fixtures__/base_flamegraph.ts +++ b/x-pack/solutions/observability/plugins/profiling/common/__fixtures__/base_flamegraph.ts @@ -287,7 +287,6 @@ export const baseFlamegraph: BaseFlameGraph = { Size: 35, SamplingRate: 1, SelfCPU: 7, - TotalCPU: 245, TotalSamples: 7, TotalSeconds: 4.980000019073486, }; diff --git a/x-pack/solutions/observability/plugins/profiling/scripts/shrink_stacktrace_response.js b/x-pack/solutions/observability/plugins/profiling/scripts/shrink_stacktrace_response.js index f57514e8e2125..d30f6f2f5f1e6 100644 --- a/x-pack/solutions/observability/plugins/profiling/scripts/shrink_stacktrace_response.js +++ b/x-pack/solutions/observability/plugins/profiling/scripts/shrink_stacktrace_response.js @@ -46,7 +46,6 @@ function mergeStackTracesByDepth(response) { } }); - let totalFrames = 0; const stackTraceEvents = {}; const stackTraces = {}; @@ -54,7 +53,6 @@ function mergeStackTracesByDepth(response) { const { event, count } = eventsByFrameDepth[depth]; stackTraces[event] = response.stack_traces[event]; stackTraceEvents[event] = count; - totalFrames += stackTraces[event].frame_ids.length * count; }); return { @@ -62,7 +60,6 @@ function mergeStackTracesByDepth(response) { stack_traces: stackTraces, stack_frames: response.stack_frames, executables: response.executables, - total_frames: totalFrames, sampling_rate: response.sampling_rate, }; } @@ -97,7 +94,6 @@ function purgeUnusedFramesAndExecutables(response) { stack_traces: response.stack_traces, stack_frames: stackFrames, executables: executables, - total_frames: response.total_frames, sampling_rate: response.sampling_rate, }; }