-
Notifications
You must be signed in to change notification settings - Fork 470
Expand file tree
/
Copy pathconstants.ts
More file actions
113 lines (88 loc) · 4.45 KB
/
constants.ts
File metadata and controls
113 lines (88 loc) · 4.45 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import type { MarkerPhase } from 'firefox-profiler/types';
// The current version of the Gecko profile format.
// Please don't forget to update the gecko profile format changelog in
// `docs-developer/CHANGELOG-formats.md`.
export const GECKO_PROFILE_VERSION = 34;
// The current version of the "processed" profile format.
// Please don't forget to update the processed profile format changelog in
// `docs-developer/CHANGELOG-formats.md`.
export const PROCESSED_PROFILE_VERSION = 62;
// The following are the margin sizes for the left and right of the timeline. Independent
// components need to share these values.
export const TIMELINE_MARGIN_RIGHT = 15;
export const TIMELINE_MARGIN_LEFT = 150;
// Export the value for tests, and for computing the max height of the timeline
// for the splitter.
export const FULL_TRACK_SCREENSHOT_HEIGHT = 50;
// The following values are for network track.
export const TRACK_NETWORK_ROW_HEIGHT = 5;
export const TRACK_NETWORK_ROW_REPEAT = 7;
export const TRACK_NETWORK_HEIGHT =
TRACK_NETWORK_ROW_HEIGHT * TRACK_NETWORK_ROW_REPEAT;
// The following values are for counter tracks (Memory, Power, Bandwidth, etc.).
export const TRACK_COUNTER_GRAPH_HEIGHT = 25;
export const TRACK_COUNTER_MARKERS_HEIGHT = 15;
export const TRACK_COUNTER_LINE_WIDTH = 2;
// The following values are for experimental event delay track.
export const TRACK_EVENT_DELAY_HEIGHT = 40;
export const TRACK_EVENT_DELAY_LINE_WIDTH = 2;
// The following values are for IPC track.
export const TRACK_IPC_MARKERS_HEIGHT = 25;
export const TRACK_IPC_HEIGHT = TRACK_IPC_MARKERS_HEIGHT;
// The following values are the defaults for marker tracks
export const TRACK_MARKER_HEIGHT = 25;
export const TRACK_MARKER_LINE_WIDTH = 2;
export const TRACK_MARKER_DEFAULT_COLOR = 'grey';
// Height of the blank area in process track.
export const TRACK_PROCESS_BLANK_HEIGHT = 30;
// Height of timeline ruler.
export const TIMELINE_RULER_HEIGHT = 20;
// JS Tracer has very high fidelity information, and needs a more fine-grained zoom.
export const JS_TRACER_MAXIMUM_CHART_ZOOM = 0.001;
// The following values are for the visual progress tracks.
export const TRACK_VISUAL_PROGRESS_HEIGHT = 40;
export const TRACK_VISUAL_PROGRESS_LINE_WIDTH = 2;
// =============================================================================
// Storage and server-related constants
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// For the 2 values GOOGLE_STORAGE_BUCKET and PROFILER_SERVER_ORIGIN, several
// values are possible, so that you can easily switch between existing server
// (both local or remote).
//
// GOOGLE_STORAGE_BUCKET
// ---------------------
// This defines which bucket we fetch profile data at load time.
// Google storage bucket, where production profile data is stored:
export const GOOGLE_STORAGE_BUCKET = 'profile-store';
// You can also use one of the following values instead:
// To use the bucket used by the server deployment for the main branch:
// export const GOOGLE_STORAGE_BUCKET = 'moz-fx-dev-firefoxprofiler-bucket';
// To use the bucket developers usually use on their local working copy:
// export const GOOGLE_STORAGE_BUCKET = 'profile-store-julien-dev';
// PROFILER_SERVER_ORIGIN
// ----------------------
// This defines our server-side endpoint. This is currently used to publish
// profiles and manage shortlinks.
// This is the production server:
export const PROFILER_SERVER_ORIGIN = 'https://api.profiler.firefox.com';
// This is the deployment from the main branch:
// export const PROFILER_SERVER_ORIGIN = 'https://dev.firefoxprofiler.nonprod.cloudops.mozgcp.net';
// This is your local server:
// export const PROFILER_SERVER_ORIGIN = 'http://localhost:5252';
// SYMBOL_SERVER_URL
// -----------------
// Can be overridden with the URL parameter `symbolServer=SERVERURL`.
// You can change this to run a local symbol server (for example using profiler-symbol-server [1])
// and set it to e.g. 'http://localhost:8000/'.
//
// [1] https://github.com/mstange/profiler-symbol-server/
// This is the default server.
export const SYMBOL_SERVER_URL = 'https://symbolication.services.mozilla.com';
// See the MarkerPhase type for more information.
export const INSTANT: MarkerPhase = 0;
export const INTERVAL: MarkerPhase = 1;
export const INTERVAL_START: MarkerPhase = 2;
export const INTERVAL_END: MarkerPhase = 3;