@@ -41,37 +41,4 @@ export function reportPeformanceMetrics() {
4141 console . log ( "Performance metrics" ) ;
4242 console . log ( "Quarto:" ) ;
4343 console . log ( JSON . stringify ( quartoPerformanceMetrics ( ) , null , 2 ) ) ;
44- console . log ( ) ;
45- // denoMetrics is some kind of fancy object that doesn't respond
46- // to a bunch of the normal methods. So we have to do this
47- // the JSON-round-trip way.
48- console . log ( "Deno:" ) ;
49- const denoMetrics = JSON . parse ( JSON . stringify ( Deno . metrics ( ) as any ) ) ;
50- denoMetrics . ops = Object . fromEntries (
51- Object . entries ( denoMetrics . ops ) . map (
52- ( [ key , opMetrics ] : any ) => {
53- for ( const key of Object . keys ( opMetrics ) ) {
54- if ( opMetrics [ key ] === 0 ) {
55- delete opMetrics [ key ] ;
56- }
57- }
58- return [ key , opMetrics ] ;
59- } ,
60- ) . filter ( ( [ _key , opMetrics ] : any ) => Object . keys ( opMetrics ) . length > 0 )
61- . map ( ( [ key , opMetrics ] : any ) => {
62- if (
63- ( opMetrics . opsDispatched === opMetrics . opsDispatchedSync &&
64- opMetrics . opsDispatched === opMetrics . opsCompleted &&
65- opMetrics . opsDispatched === opMetrics . opsCompletedSync ) ||
66- ( opMetrics . opsDispatched === opMetrics . opsDispatchedAsync &&
67- opMetrics . opsDispatched === opMetrics . opsCompleted &&
68- opMetrics . opsDispatched === opMetrics . opsCompletedAsync )
69- ) {
70- return [ key , opMetrics . opsDispatched ] ;
71- } else {
72- return [ key , opMetrics ] ;
73- }
74- } ) ,
75- ) ;
76- console . log ( JSON . stringify ( denoMetrics , null , 2 ) ) ;
7744}
0 commit comments