Repository navigation
Expand file tree
/
Copy pathtypes.ts
More file actions
99 lines (86 loc) · 1.96 KB
/
Copy pathtypes.ts
File metadata and controls
99 lines (86 loc) · 1.96 KB
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
96
97
98
99
export type PythonVersion = {
major: number;
minor: number;
patch: number;
};
export type Binary = {
id: string;
name: string;
flags: string[];
description?: string;
color?: string;
icon?: string;
display_order?: number;
};
export type Environment = {
id: string;
name: string;
description?: string;
};
export type Commit = {
sha: string;
timestamp: string;
message: string;
author: string;
python_version: PythonVersion;
prev_commit?: Commit;
};
export type PythonVersionFilterOption = {
label: string;
major: number;
minor: number;
};
export type MetricKey = 'high_watermark_bytes' | 'total_allocated_bytes';
export const METRIC_OPTIONS = [
{ label: 'High Watermark', value: 'high_watermark_bytes' },
{ label: 'Total Allocated', value: 'total_allocated_bytes' },
] as const;
export type TopAllocatingFunction = {
function: string;
count: number;
total_size: number;
};
export type BenchmarkResultJson = {
high_watermark_bytes: number;
allocation_histogram: [number, number][];
total_allocated_bytes: number;
top_allocating_functions: TopAllocatingFunction[];
benchmark_name?: string;
};
export type DiffTableRow = {
benchmark_name: string;
metric_delta_percent?: number;
prev_metric_value?: number;
curr_metric_value: number;
curr_commit_details: Commit;
prev_commit_details?: Commit;
metric_key: MetricKey;
prev_python_version_str?: string;
curr_python_version_str: string;
curr_result_id: string;
};
export type AuthToken = {
id: number;
name: string;
description?: string;
created_at: string;
last_used?: string;
is_active: boolean;
token_preview: string;
};
export type TokenCreate = {
name: string;
description?: string;
};
export type TokenUpdate = {
name?: string;
description?: string;
};
export type TokenAnalytics = {
total_tokens: number;
active_tokens: number;
inactive_tokens: number;
used_tokens: number;
never_used_tokens: number;
recent_active_tokens: number;
};