UNPKG

@oaklean/profiler-core

Version:

Part of the @oaklean suite. It provides all basic functions to work with the `.oak` file format. It allows parsing the `.oak` file format as well as tools for analyzing the measurement values. It also provides all necessary capabilities required for prec

29 lines (28 loc) 1.32 kB
import type { Protocol as Cdp } from 'devtools-protocol'; import { UnifiedPath } from '../../system/UnifiedPath'; export declare class CPUProfileHelper { /** * This function is used to convert all paths in the CPU profile to relative paths. * (relative to the rootDir) * * The CPU profile is then written to the given output path. * This creates anonymized CPU profiles that can be shared with others * while still preserving the structure of the profile * so it can be used in the InsertCPUProfileHelper.insertCPUProfile function. * * @param rootDir path to the root directory of the project * * @param cpuProfilePath path to the CPU profile that should be anonymized * @param outPath path to the output file */ static anonymize(rootDir: UnifiedPath, cpuProfilePath: UnifiedPath, outPath: UnifiedPath): Promise<void>; static loadFromFile(cpuProfilePath: UnifiedPath): Promise<Cdp.Profiler.Profile | undefined>; static inspect(cpuProfile: Cdp.Profiler.Profile): Promise<{ nodeCount: number; sourceNodeLocationCount: number; sampleCount: number; totalHits: number; totalCPUTime: number; }>; static storeToFile(cpuProfile: Cdp.Profiler.Profile, cpuProfilePath: UnifiedPath): Promise<void>; }