import { Config } from './config' ; export enum ProfileType { HEAP_PROFILE = 'HEAP_PROFILE' , CPU_PROFILE = 'CPU_PROFILE' , /**
     * Performance instrumentation and tracing for Android, Linux and Chrome
     * ref: https://www.perfetto.dev/#/
     */ PERFECTO = 'PERFECTO' } export enum ProfileStatus { UNKNOWN = 0 , SUCCESS = 1 , FAILED = 2 } export interface ProfileListener { onProfileStart ( profile ) : Promise < void > ; onProfileEnd ( profile ) : Promise < void > ; } /** Maps a label to a string, number or boolean. */ export interface Attributes { [ attributeKey ] : string | number | boolean ; } /** Interface for profile */ export interface Profile { /** The resource name of the profile */ name : string ; /** Kind of profile. */ kind : ProfileType ; /** A final status for this profile */ status : ProfileStatus ; /** A set of attributes, each in the format [KEY]:[VALUE] */ attributes : Attributes ; /** The actual data that the profiler gave us */ data : Buffer ; /** Indicates if profile was started. */ readonly started : boolean ; /** Indicates if profile was ended. */ readonly ended : boolean ; /**
     * Gives a timestap that indicates the profile's start time in RFC3339 UTC
     * "Zulu" format.
     */ readonly startTime : Date ; /**
     * Gives a timestap that indicates the profile's end time in RFC3339 UTC
     * "Zulu" format.
     */ readonly endTime : Date ; /**
     * Gives a timestap that indicates the profile's duration in RFC3339 UTC
     * "Zulu" format.
     */ readonly duration : number ; param key param value addAttribute ( key , value ) : void ; param data addProfileData ( data ) : void ; /** Ends a profile. */ end ( ) : void ; } export interface Agent { /** Gets active status  */ active : boolean ; param userConfig returns start ( userConfig ? ) : ThisType < Agent > ; /** Stops agent. */ stop ( ) : ThisType < Agent > ; param listener registerProfileListener ( listener ) : void ; param listener unregisterProfileListener ( listener ) : void ; param profile notifyStartProfile ( profile ) : void ; param profile notifyEndProfile ( profile ) : void ; }