@@ -29,7 +29,7 @@ use std::{
2929 sync:: Arc ,
3030 time:: Duration ,
3131} ;
32- use tracing:: { info, instrument, trace, warn} ;
32+ use tracing:: { debug , info, instrument, trace, warn} ;
3333use utils:: wasm_tools:: WasmComponent ;
3434use wasm_workers:: http_request_policy:: HostPatternError ;
3535use wasm_workers:: {
@@ -513,12 +513,14 @@ impl ComponentLocationToml {
513513 ) -> Result < ( ContentDigest , PathBuf ) , anyhow:: Error > {
514514 use utils:: sha256sum:: calculate_sha256_file;
515515
516+ debug ! ( "Fetching {self:?}" ) ;
517+ let stopwatch = std:: time:: Instant :: now ( ) ;
516518 // Happy path: if content_digest is known and file exists in cache, return immediately
517519 if let Some ( expected_digest) = expected_digest
518520 && let wasm_path = content_digest_to_wasm_file ( wasm_cache_dir, expected_digest)
519521 && wasm_path. exists ( )
520522 {
521- trace ! ( "Using cached file for known content digest" ) ;
523+ debug ! ( "Using cached file for known content digest" ) ;
522524 return Ok ( ( expected_digest. clone ( ) , wasm_path) ) ;
523525 }
524526
@@ -557,6 +559,8 @@ impl ComponentLocationToml {
557559 "content digest mismatch: expected {expected_digest}, got {actual_digest}"
558560 ) ;
559561 }
562+ let stopwatch = stopwatch. elapsed ( ) ;
563+ debug ! ( "Fetching done in {stopwatch:?}" ) ;
560564 Ok ( ( actual_digest, path) )
561565 }
562566}
0 commit comments