File tree Expand file tree Collapse file tree 1 file changed +15
-12
lines changed
Expand file tree Collapse file tree 1 file changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -70,20 +70,23 @@ export default class CloudFetchResultHandler implements IResultsProvider<ArrowBa
7070 }
7171
7272 private logDownloadMetrics ( url : string , fileSizeBytes : number , downloadTimeMs : number ) : void {
73- const speedMBps = ( fileSizeBytes / ( 1024 * 1024 ) ) / ( downloadTimeMs / 1000 ) ;
73+ const speedMBps = fileSizeBytes / ( 1024 * 1024 ) / ( downloadTimeMs / 1000 ) ;
7474 const cleanUrl = url . split ( '?' ) [ 0 ] ;
75-
76- this . context . getLogger ( ) . log (
77- LogLevel . info ,
78- `Result File Download speed from cloud storage ${ cleanUrl } : ${ speedMBps . toFixed ( 4 ) } MB/s`
79- ) ;
80-
75+
76+ this . context
77+ . getLogger ( )
78+ . log ( LogLevel . info , `Result File Download speed from cloud storage ${ cleanUrl } : ${ speedMBps . toFixed ( 4 ) } MB/s` ) ;
79+
8180 const speedThresholdMBps = this . context . getConfig ( ) . cloudFetchSpeedThresholdMBps ;
8281 if ( speedMBps < speedThresholdMBps ) {
83- this . context . getLogger ( ) . log (
84- LogLevel . warn ,
85- `Results download is slower than threshold speed of ${ speedThresholdMBps . toFixed ( 4 ) } MB/s: ${ speedMBps . toFixed ( 4 ) } MB/s`
86- ) ;
82+ this . context
83+ . getLogger ( )
84+ . log (
85+ LogLevel . warn ,
86+ `Results download is slower than threshold speed of ${ speedThresholdMBps . toFixed (
87+ 4 ,
88+ ) } MB/s: ${ speedMBps . toFixed ( 4 ) } MB/s`,
89+ ) ;
8790 }
8891 }
8992
@@ -100,7 +103,7 @@ export default class CloudFetchResultHandler implements IResultsProvider<ArrowBa
100103
101104 const result = await response . arrayBuffer ( ) ;
102105 const downloadTimeMs = Date . now ( ) - startTime ;
103-
106+
104107 this . logDownloadMetrics ( link . fileLink , result . byteLength , downloadTimeMs ) ;
105108
106109 return {
You can’t perform that action at this time.
0 commit comments