Skip to content

Commit 890b0e1

Browse files
committed
polish: useconds as unit for duration settings
Fixes microsoft/vscode#107799
1 parent fa3761b commit 890b0e1

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

packages/vscode-js-profile-flame/package.json

+7-7
Original file line numberDiff line numberDiff line change
@@ -76,19 +76,19 @@
7676
],
7777
"configuration": [
7878
{
79-
"title": "Flamegraph Visaulizer",
79+
"title": "Flamegraph Visualizer",
8080
"properties": {
8181
"debug.flameGraph.realtimePollInterval": {
8282
"type": "integer",
83-
"minimum": 500,
84-
"default": 1000,
85-
"description": "How often (in milliseconds) to refresh statistics from the runtime"
83+
"minimum": 0.5,
84+
"default": 1,
85+
"description": "How often (in seconds) to refresh statistics from the runtime"
8686
},
8787
"debug.flameGraph.realtimeViewDuration": {
8888
"type": "integer",
89-
"minimum": 500,
90-
"default": 30000,
91-
"description": "How much time (in milliseconds) should be kept in the graph"
89+
"minimum": 1,
90+
"default": 30,
91+
"description": "How much time (in seconds) should be kept in the graph"
9292
},
9393
"debug.flameGraph.realtimeEasing": {
9494
"type": "boolean",

packages/vscode-js-profile-flame/src/realtimeSessionTracker.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ export const readRealtimeSettings = (context: vscode.ExtensionContext): ISetting
2222
vscode.window.activeColorTheme.kind !== vscode.ColorThemeKind.HighContrast,
2323
enabledMetrics: context.workspaceState.get(enabledMetricsKey) ?? [0, 1],
2424
splitCharts: context.workspaceState.get(splitChartsKey) ?? false,
25-
pollInterval: config.get(Config.PollInterval, 1000),
26-
viewDuration: config.get(Config.ViewDuration, 30_000),
25+
pollInterval: config.get(Config.PollInterval, 1) * 1000,
26+
viewDuration: config.get(Config.ViewDuration, 30) * 1000,
2727
zoomLevel: config.get('window.zoomLevel', 0),
2828
};
2929
};

0 commit comments

Comments
 (0)