@@ -37,8 +37,8 @@ export interface SelfProfileResponse {
37
37
base_profile_delta ?: ProfileData ;
38
38
}
39
39
40
- export function toSeconds ( time : number ) : number {
41
- return time / 1000000000 ;
40
+ export function normalizeValue ( icounts : number ) : number {
41
+ return icounts ;
42
42
}
43
43
44
44
export function createDelta (
@@ -259,24 +259,24 @@ export function createTableData(
259
259
formatted : totals . percent_total_time . toFixed ( 2 ) + "%*" ,
260
260
title : "% of cpu-time stat" ,
261
261
} ,
262
- timeSeconds : toSeconds ( totals . self_time ) ,
262
+ timeSeconds : normalizeValue ( totals . self_time ) ,
263
263
timeDelta : totalsDelta
264
264
? createDelta (
265
- toSeconds ( totals . self_time ) ,
266
- toSeconds ( totalsDelta . self_time ) ,
267
- false
265
+ normalizeValue ( totals . self_time ) ,
266
+ normalizeValue ( totalsDelta . self_time ) ,
267
+ true
268
268
)
269
269
: null ,
270
270
executions : totals . invocation_count ,
271
271
executionsDelta : totalsDelta
272
272
? createDelta ( totals . invocation_count , totalsDelta . invocation_count , true )
273
273
: null ,
274
- incrementalLoading : toSeconds ( totals . incremental_load_time ) ,
274
+ incrementalLoading : normalizeValue ( totals . incremental_load_time ) ,
275
275
incrementalLoadingDelta : totalsDelta
276
276
? createDelta (
277
- toSeconds ( totals . incremental_load_time ) ,
278
- toSeconds ( totalsDelta . incremental_load_time ) ,
279
- false
277
+ normalizeValue ( totals . incremental_load_time ) ,
278
+ normalizeValue ( totalsDelta . incremental_load_time ) ,
279
+ true
280
280
)
281
281
: null ,
282
282
} ) ;
@@ -299,24 +299,24 @@ export function createTableData(
299
299
formatted : query . percent_total_time . toFixed ( 2 ) + "%" ,
300
300
title : "" ,
301
301
} ,
302
- timeSeconds : toSeconds ( query . self_time ) ,
302
+ timeSeconds : normalizeValue ( query . self_time ) ,
303
303
timeDelta : queryDelta
304
304
? createDelta (
305
- toSeconds ( query . self_time ) ,
306
- toSeconds ( queryDelta . self_time ) ,
307
- false
305
+ normalizeValue ( query . self_time ) ,
306
+ normalizeValue ( queryDelta . self_time ) ,
307
+ true
308
308
)
309
309
: null ,
310
310
executions : query . invocation_count ,
311
311
executionsDelta : queryDelta
312
312
? createDelta ( query . invocation_count , queryDelta . invocation_count , true )
313
313
: null ,
314
- incrementalLoading : toSeconds ( query . incremental_load_time ) ,
314
+ incrementalLoading : normalizeValue ( query . incremental_load_time ) ,
315
315
incrementalLoadingDelta : queryDelta
316
316
? createDelta (
317
- toSeconds ( query . incremental_load_time ) ,
318
- toSeconds ( queryDelta . incremental_load_time ) ,
319
- false
317
+ normalizeValue ( query . incremental_load_time ) ,
318
+ normalizeValue ( queryDelta . incremental_load_time ) ,
319
+ true
320
320
)
321
321
: null ,
322
322
} ) ;
0 commit comments