@@ -487,18 +487,12 @@ export class CreateApi {
487
487
await this . run ( url , init , ResponseResultProvider . NOOP ) ;
488
488
}
489
489
490
- private fetchCounter = 0 ;
491
490
private async run < T > (
492
491
requestInfo : URL ,
493
492
init : RequestInit | undefined ,
494
493
resultProvider : ResponseResultProvider = ResponseResultProvider . JSON
495
494
) : Promise < T > {
496
- const fetchCount = `[${ ++ this . fetchCounter } ]` ;
497
- const fetchStart = performance . now ( ) ;
498
- const method = init ?. method ? `${ init . method } : ` : '' ;
499
- const url = requestInfo . toString ( ) ;
500
495
const response = await fetch ( requestInfo . toString ( ) , init ) ;
501
- const fetchEnd = performance . now ( ) ;
502
496
if ( ! response . ok ) {
503
497
let details : string | undefined = undefined ;
504
498
try {
@@ -509,18 +503,7 @@ export class CreateApi {
509
503
const { statusText, status } = response ;
510
504
throw new CreateError ( statusText , status , details ) ;
511
505
}
512
- const parseStart = performance . now ( ) ;
513
506
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
- ) ;
524
507
return result ;
525
508
}
526
509
0 commit comments