Skip to content

Commit a8b03fb

Browse files
committed
Change formatting of self-profile metrics
1 parent 579860f commit a8b03fb

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

site/frontend/src/pages/detailed-query.ts

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import {
77
} from "../self-profile";
88
import {openTraceInPerfetto} from "../perfetto";
99

10-
function to_seconds(time) {
11-
return time / 1000000000;
10+
function normalize_value(value) {
11+
return value;
1212
}
1313

1414
function fmt_delta(to, delta, is_integral_delta) {
@@ -305,14 +305,14 @@ function populate_data(data, state: Selector) {
305305
t.setAttribute("title", "% of cpu-time stat");
306306
}
307307
}
308-
td(row, to_seconds(cur.self_time).toFixed(3));
308+
td(row, normalize_value(cur.self_time));
309309
if (delta) {
310310
td(
311311
row,
312312
fmt_delta(
313-
to_seconds(cur.self_time),
314-
to_seconds(delta.self_time),
315-
false
313+
normalize_value(cur.self_time),
314+
normalize_value(delta.self_time),
315+
true
316316
),
317317
true
318318
);
@@ -329,16 +329,14 @@ function populate_data(data, state: Selector) {
329329
} else {
330330
td(row, "-", true);
331331
}
332-
td(row, to_seconds(cur.incremental_load_time).toFixed(3)).classList.add(
333-
"incr"
334-
);
332+
td(row, normalize_value(cur.incremental_load_time)).classList.add("incr");
335333
if (delta) {
336334
td(
337335
row,
338336
fmt_delta(
339-
to_seconds(cur.incremental_load_time),
340-
to_seconds(delta.incremental_load_time),
341-
false
337+
normalize_value(cur.incremental_load_time),
338+
normalize_value(delta.incremental_load_time),
339+
true
342340
),
343341
true
344342
).classList.add("incr");

0 commit comments

Comments
 (0)