Repository navigation
Expand file tree
/
Copy pathprofiling.ts
More file actions
88 lines (82 loc) · 1.76 KB
/
Copy pathprofiling.ts
File metadata and controls
88 lines (82 loc) · 1.76 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
import type { DebugImage } from './debugMeta';
import type { MeasurementUnit } from './measurement';
export type ThreadId = string;
export type FrameId = number;
export type StackId = number;
export interface ThreadCpuSample {
stack_id: StackId;
thread_id: ThreadId;
queue_address?: string;
elapsed_since_start_ns: string;
}
export type ThreadCpuStack = FrameId[];
export type ThreadCpuFrame = {
function?: string;
file?: string;
lineno?: number;
colno?: number;
abs_path?: string;
platform?: string;
instruction_addr?: string;
module?: string;
in_app?: boolean;
};
export interface ThreadCpuProfile {
samples: ThreadCpuSample[];
stacks: ThreadCpuStack[];
frames: ThreadCpuFrame[];
thread_metadata: Record<ThreadId, { name?: string; priority?: number }>;
queue_metadata?: Record<string, { label: string }>;
}
export interface Profile {
event_id: string;
version: string;
os: {
name: string;
version: string;
build_number?: string;
};
runtime: {
name: string;
version: string;
};
device: {
architecture: string;
is_emulator: boolean;
locale: string;
manufacturer: string;
model: string;
};
timestamp: string;
release: string;
environment: string;
platform: string;
profile: ThreadCpuProfile;
debug_meta?: {
images: DebugImage[];
};
transaction?: {
name: string;
id: string;
trace_id: string;
active_thread_id: string;
};
transactions?: {
name: string;
id: string;
trace_id: string;
active_thread_id: string;
relative_start_ns: string;
relative_end_ns: string;
}[];
measurements?: Record<
string,
{
unit: MeasurementUnit;
values: {
elapsed_since_start_ns: number;
value: number;
}[];
}
>;
}