UNPKG

@oaklean/profiler

Version:

A library to measure the energy consumption of your javascript/typescript code

17 lines (16 loc) 717 B
import type { Protocol as Cdp } from 'devtools-protocol'; import { MicroSeconds_number } from '@oaklean/profiler-core'; export declare class V8Profiler { static startProfiling(name: string, recsamples?: boolean, mode?: 0 | 1): void; static stopProfiling(name?: string): Cdp.Profiler.Profile; static setGenerateType(type: 0 | 1): void; static setSamplingInterval(num: MicroSeconds_number): void; /** * Unifies the V8 Profile to ensure compatibility between linux / mac / windows * All filePaths are converted to unix paths * * @param profile */ static unifyProfile(profile: Cdp.Profiler.Profile): void; static cleanUpProfile(profile: Cdp.Profiler.Profile): void; }