@@ -37,8 +37,8 @@ export interface SelfProfileResponse {
3737 base_profile_delta ?: ProfileData ;
3838}
3939
40- export function toSeconds ( time : number ) : number {
41- return time / 1000000000 ;
40+ export function normalizeValue ( icounts : number ) : number {
41+ return icounts ;
4242}
4343
4444export function createDelta (
@@ -259,24 +259,24 @@ export function createTableData(
259259 formatted : totals . percent_total_time . toFixed ( 2 ) + "%*" ,
260260 title : "% of cpu-time stat" ,
261261 } ,
262- timeSeconds : toSeconds ( totals . self_time ) ,
262+ timeSeconds : normalizeValue ( totals . self_time ) ,
263263 timeDelta : totalsDelta
264264 ? 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
268268 )
269269 : null ,
270270 executions : totals . invocation_count ,
271271 executionsDelta : totalsDelta
272272 ? createDelta ( totals . invocation_count , totalsDelta . invocation_count , true )
273273 : null ,
274- incrementalLoading : toSeconds ( totals . incremental_load_time ) ,
274+ incrementalLoading : normalizeValue ( totals . incremental_load_time ) ,
275275 incrementalLoadingDelta : totalsDelta
276276 ? 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
280280 )
281281 : null ,
282282 } ) ;
@@ -299,24 +299,24 @@ export function createTableData(
299299 formatted : query . percent_total_time . toFixed ( 2 ) + "%" ,
300300 title : "" ,
301301 } ,
302- timeSeconds : toSeconds ( query . self_time ) ,
302+ timeSeconds : normalizeValue ( query . self_time ) ,
303303 timeDelta : queryDelta
304304 ? 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
308308 )
309309 : null ,
310310 executions : query . invocation_count ,
311311 executionsDelta : queryDelta
312312 ? createDelta ( query . invocation_count , queryDelta . invocation_count , true )
313313 : null ,
314- incrementalLoading : toSeconds ( query . incremental_load_time ) ,
314+ incrementalLoading : normalizeValue ( query . incremental_load_time ) ,
315315 incrementalLoadingDelta : queryDelta
316316 ? 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
320320 )
321321 : null ,
322322 } ) ;
0 commit comments