diff --git a/handlers/BandwidthTestHandler.py b/handlers/BandwidthTestHandler.py index 5497a2743a20c26cbb4b995e25ccbe53ae3996ad..16f1b2ebe1f62dee1e4a3b97b7b2789fc61fb448 100644 --- a/handlers/BandwidthTestHandler.py +++ b/handlers/BandwidthTestHandler.py @@ -512,6 +512,36 @@ class BandwidthTestHandler(BaseHandler): process, ) + # Temporary test of the system: copy the full stream MDF to eos + # Only do so if test was completely successful. + if options == "Moore_hlt2_bandwidth" and slot == "lhcb-master" and status: + from datetime import datetime + before_copy = datetime.now() + full_stream_mdf = os.path.join( + directory, 'tmp', 'MDF', + "hlt2_bw_testing__production__full.mdf") + log.info( + f"Trying to copy {full_stream_mdf} to eos. File size: {os.stat(full_stream_mdf).st_size / 1e6} MB." + ) + publish.upload_eos_www( + full_stream_mdf, + os.path.basename(full_stream_mdf), + baseurl=os.path.join( + os.getenv("LHCBPR_WWW_EOS"), "UpgradeRateTest")) + log.info(f"Copied {full_stream_mdf} to eos. This took " + + str(datetime.now() - before_copy)) + log.info("Trying to copy to new directory...") + before_second_copy = datetime.now() + publish.upload_eos_www( + full_stream_mdf, + os.path.join("current_hlt2_output", + os.path.basename(full_stream_mdf)), + baseurl=os.path.join( + os.getenv("LHCBPR_WWW_EOS"), "UpgradeRateTest")) + log.info( + f"Copied {full_stream_mdf} to eos new directory. This took " + + str(datetime.now() - before_second_copy)) + # Post GitLab MR feedback; a bit more complex as comparing to a reference build. if (slot in [ "lhcb-master-mr",