Skip to content

Commit 47e20b8

Browse files
committed
Change formatting of self-profile metrics
1 parent 7162f86 commit 47e20b8

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

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

+10-12
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import {createUrlWithAppendedParams, getUrlParams} from "../utils/navigation";
22
import {postMsgpack} from "../utils/requests";
33
import {SELF_PROFILE_DATA_URL} from "../urls";
44

5-
function to_seconds(time) {
6-
return time / 1000000000;
5+
function normalize_value(value) {
6+
return value;
77
}
88

99
function fmt_delta(to, delta, is_integral_delta) {
@@ -267,14 +267,14 @@ function populate_data(data, state: Selector) {
267267
t.setAttribute("title", "% of cpu-time stat");
268268
}
269269
}
270-
td(row, to_seconds(cur.self_time).toFixed(3));
270+
td(row, normalize_value(cur.self_time));
271271
if (delta) {
272272
td(
273273
row,
274274
fmt_delta(
275-
to_seconds(cur.self_time),
276-
to_seconds(delta.self_time),
277-
false
275+
normalize_value(cur.self_time),
276+
normalize_value(delta.self_time),
277+
true
278278
),
279279
true
280280
);
@@ -291,16 +291,14 @@ function populate_data(data, state: Selector) {
291291
} else {
292292
td(row, "-", true);
293293
}
294-
td(row, to_seconds(cur.incremental_load_time).toFixed(3)).classList.add(
295-
"incr"
296-
);
294+
td(row, normalize_value(cur.incremental_load_time)).classList.add("incr");
297295
if (delta) {
298296
td(
299297
row,
300298
fmt_delta(
301-
to_seconds(cur.incremental_load_time),
302-
to_seconds(delta.incremental_load_time),
303-
false
299+
normalize_value(cur.incremental_load_time),
300+
normalize_value(delta.incremental_load_time),
301+
true
304302
),
305303
true
306304
).classList.add("incr");

0 commit comments

Comments
 (0)