@@ -438,7 +438,8 @@ def _download_and_open_build_archive(self, base_build_dir: str,
438438 try :
439439 start_time = time .time ()
440440 storage .copy_file_from (build_url , build_local_archive )
441- build_download_duration = time .time () - start_time
441+ # In minutes, as per metric definition.
442+ build_download_duration = (time .time () - start_time ) / 60
442443 monitoring_metrics .JOB_BUILD_RETRIEVAL_TIME .add (
443444 build_download_duration , {
444445 'job' : os .getenv ('JOB_NAME' ),
@@ -530,10 +531,10 @@ def _unpack_build(self,
530531 # from the build archive.
531532 list_fuzz_target_start_time = time .time ()
532533 self .fuzz_targets = list (build .list_fuzz_targets ())
533- elapsed_time = time . time () - list_fuzz_target_start_time
534- elapsed_time_in_minutes = elapsed_time / 60
534+ # In minutes, as per metric definition.
535+ elapsed_time = ( time . time () - list_fuzz_target_start_time ) / 60
535536 monitoring_metrics .JOB_BUILD_RETRIEVAL_TIME .add (
536- elapsed_time_in_minutes , {
537+ elapsed_time , {
537538 'job' : os .getenv ('JOB_NAME' ),
538539 'platform' : environment .platform (),
539540 'step' : 'list_fuzz_targets' ,
@@ -563,7 +564,8 @@ def _unpack_build(self,
563564 fuzz_target = fuzz_target_to_unpack ,
564565 trusted = trusted )
565566
566- unpack_elapsed_time = time .time () - unpack_start_time
567+ # In minutes, as per metric definition.
568+ unpack_elapsed_time = (time .time () - unpack_start_time ) / 60
567569
568570 monitoring_metrics .JOB_BUILD_RETRIEVAL_TIME .add (
569571 unpack_elapsed_time , {
@@ -580,10 +582,10 @@ def _unpack_build(self,
580582 if unpack_everything :
581583 list_fuzz_target_start_time = time .time ()
582584 self .fuzz_targets = list (self ._get_fuzz_targets_from_dir (build_dir ))
583- elapsed_time = time . time () - list_fuzz_target_start_time
584- elapsed_time_in_minutes = elapsed_time / 60
585+ # In minutes, as per metric definition.
586+ elapsed_listing_time = ( time . time () - list_fuzz_target_start_time ) / 60
585587 monitoring_metrics .JOB_BUILD_RETRIEVAL_TIME .add (
586- elapsed_time_in_minutes , {
588+ elapsed_listing_time , {
587589 'job' : os .getenv ('JOB_NAME' ),
588590 'platform' : environment .platform (),
589591 'step' : 'list_fuzz_targets' ,
@@ -933,7 +935,8 @@ def _unpack_custom_build(self):
933935 build_local_archive ):
934936 return False
935937
936- build_download_time = time .time () - download_start_time
938+ # In minutes, as per metric definition.
939+ build_download_time = (time .time () - download_start_time ) / 60
937940 monitoring_metrics .JOB_BUILD_RETRIEVAL_TIME .add (
938941 build_download_time , {
939942 'job' : os .getenv ('JOB_NAME' ),
@@ -961,7 +964,8 @@ def _unpack_custom_build(self):
961964 # Unpack belongs to the BuildArchive class
962965 unpack_start_time = time .time ()
963966 build .unpack (self .build_dir , trusted = True )
964- build_unpack_time = time .time () - unpack_start_time
967+ build_unpack_time = (time .time () - unpack_start_time ) / 60
968+ # In minutes, as per metric definition.
965969 monitoring_metrics .JOB_BUILD_RETRIEVAL_TIME .add (
966970 build_unpack_time , {
967971 'job' : os .getenv ('JOB_NAME' ),
0 commit comments