-
Notifications
You must be signed in to change notification settings - Fork 240
/
IPerfEvent.ts
69 lines (58 loc) · 1.83 KB
/
IPerfEvent.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
/**
* This interface identifies the details of an internal performance event - it does not represent an outgoing reported event
*/
export interface IPerfEvent {
/**
* The name of the performance event
*/
name: string;
/**
* The start time of the performance event
*/
start: number;
/**
* The payload (contents) of the perfEvent, may be null or only set after the event has completed depending on
* the runtime environment.
*/
payload: any;
/**
* Is this occurring from an asynchronous event
*/
isAsync: boolean;
/**
* Identifies the total inclusive time spent for this event, including the time spent for child events,
* this will be undefined until the event is completed
*/
time?: number;
/**
* Identifies the exclusive time spent in for this event (not including child events),
* this will be undefined until the event is completed.
*/
exTime?: number;
/**
* The Parent event that was started before this event was created
*/
parent?: IPerfEvent;
/**
* The child perf events that are contained within the total time of this event.
*/
childEvts?: IPerfEvent[];
/**
* Identifies whether this event is a child event of a parent
*/
isChildEvt: () => boolean;
/**
* Get the names additional context associated with this perf event
*/
getCtx?: (key: string) => any;
/**
* Set the named additional context to be associated with this perf event, this will replace any existing value
*/
setCtx?: (key: string, value: any) => void;
/**
* Mark this event as completed, calculating the total execution time.
*/
complete: () => void;
}