@@ -487,18 +487,12 @@ export class CreateApi {
487487 await this . run ( url , init , ResponseResultProvider . NOOP ) ;
488488 }
489489
490- private fetchCounter = 0 ;
491490 private async run < T > (
492491 requestInfo : URL ,
493492 init : RequestInit | undefined ,
494493 resultProvider : ResponseResultProvider = ResponseResultProvider . JSON
495494 ) : Promise < T > {
496- const fetchCount = `[${ ++ this . fetchCounter } ]` ;
497- const fetchStart = performance . now ( ) ;
498- const method = init ?. method ? `${ init . method } : ` : '' ;
499- const url = requestInfo . toString ( ) ;
500495 const response = await fetch ( requestInfo . toString ( ) , init ) ;
501- const fetchEnd = performance . now ( ) ;
502496 if ( ! response . ok ) {
503497 let details : string | undefined = undefined ;
504498 try {
@@ -509,18 +503,7 @@ export class CreateApi {
509503 const { statusText, status } = response ;
510504 throw new CreateError ( statusText , status , details ) ;
511505 }
512- const parseStart = performance . now ( ) ;
513506 const result = await resultProvider ( response ) ;
514- const parseEnd = performance . now ( ) ;
515- console . debug (
516- `HTTP ${ fetchCount } ${ method } ${ url } [fetch: ${ (
517- fetchEnd - fetchStart
518- ) . toFixed ( 2 ) } ms, parse: ${ ( parseEnd - parseStart ) . toFixed (
519- 2
520- ) } ms] body: ${
521- typeof result === 'string' ? result : JSON . stringify ( result )
522- } `
523- ) ;
524507 return result ;
525508 }
526509
0 commit comments