forked from github/vscode-codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlog-summary.ts
95 lines (81 loc) · 2.09 KB
/
log-summary.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
export interface PipelineRun {
raReference: string;
counts: number[];
duplicationPercentages: number[];
}
interface Ra {
[key: string]: string[];
}
type EvaluationStrategy =
| "COMPUTE_SIMPLE"
| "COMPUTE_RECURSIVE"
| "IN_LAYER"
| "COMPUTED_EXTENSIONAL"
| "EXTENSIONAL"
| "SENTINEL_EMPTY"
| "CACHACA"
| "CACHE_HIT";
interface SummaryEventBase {
evaluationStrategy: EvaluationStrategy;
predicateName: string;
raHash: string;
appearsAs: { [key: string]: { [key: string]: number[] } };
completionType?: string;
}
interface ResultEventBase extends SummaryEventBase {
resultSize: number;
}
export interface ComputeSimple extends ResultEventBase {
evaluationStrategy: "COMPUTE_SIMPLE";
ra: Ra;
millis: number;
pipelineRuns?: [PipelineRun];
queryCausingWork?: string;
dependencies: { [key: string]: string };
}
export interface ComputeRecursive extends ResultEventBase {
evaluationStrategy: "COMPUTE_RECURSIVE";
deltaSizes: number[];
ra: Ra;
millis: number;
pipelineRuns: PipelineRun[];
queryCausingWork?: string;
dependencies: { [key: string]: string };
predicateIterationMillis: number[];
}
export interface InLayer extends ResultEventBase {
evaluationStrategy: "IN_LAYER";
deltaSizes: number[];
ra: Ra;
pipelineRuns: PipelineRun[];
queryCausingWork?: string;
mainHash: string;
predicateIterationMillis: number[];
}
interface ComputedExtensional extends ResultEventBase {
evaluationStrategy: "COMPUTED_EXTENSIONAL";
queryCausingWork?: string;
}
interface NonComputedExtensional extends ResultEventBase {
evaluationStrategy: "EXTENSIONAL";
queryCausingWork?: string;
}
interface SentinelEmpty extends SummaryEventBase {
evaluationStrategy: "SENTINEL_EMPTY";
sentinelRaHash: string;
}
interface Cachaca extends ResultEventBase {
evaluationStrategy: "CACHACA";
}
interface CacheHit extends ResultEventBase {
evaluationStrategy: "CACHE_HIT";
}
type Extensional = ComputedExtensional | NonComputedExtensional;
export type SummaryEvent =
| ComputeSimple
| ComputeRecursive
| InLayer
| Extensional
| SentinelEmpty
| Cachaca
| CacheHit;