aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Wu <juu@google.com>2023-04-13 01:56:20 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2023-04-13 01:56:20 +0000
commit2438b5e72615f5896d797d82fefd48fae0a35824 (patch)
tree6f92b36ddcde3a15c2ffeee3daf3193dea7cb6f9
parent3fc97bb8d12cea5fef5fc8d4b87e14b273b4afa0 (diff)
parent42d03d0e426a2f7194f2c350145b164d51cdb4d2 (diff)
downloadbazel-2438b5e72615f5896d797d82fefd48fae0a35824.tar.gz
Merge "Copy the metrics files instead of moving the metrics in CUJ"
-rw-r--r--scripts/incremental_build/perf_metrics.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/incremental_build/perf_metrics.py b/scripts/incremental_build/perf_metrics.py
index da5ff59b..3d074566 100644
--- a/scripts/incremental_build/perf_metrics.py
+++ b/scripts/incremental_build/perf_metrics.py
@@ -58,20 +58,20 @@ SOONG_BUILD_PB = 'soong_build_metrics.pb'
BP2BUILD_PB = 'bp2build_metrics.pb'
-def _move_pbs_to(d: Path):
+def _copy_pbs_to(d: Path):
soong_pb = util.get_out_dir().joinpath(SOONG_PB)
soong_build_pb = util.get_out_dir().joinpath(SOONG_BUILD_PB)
bp2build_pb = util.get_out_dir().joinpath(BP2BUILD_PB)
if soong_pb.exists():
- shutil.move(soong_pb, d.joinpath(SOONG_PB))
+ shutil.copy(soong_pb, d.joinpath(SOONG_PB))
if soong_build_pb.exists():
- shutil.move(soong_build_pb, d.joinpath(SOONG_BUILD_PB))
+ shutil.copy(soong_build_pb, d.joinpath(SOONG_BUILD_PB))
if bp2build_pb.exists():
- shutil.move(bp2build_pb, d.joinpath(BP2BUILD_PB))
+ shutil.copy(bp2build_pb, d.joinpath(BP2BUILD_PB))
def archive_run(d: Path, build_info: dict[str, any]):
- _move_pbs_to(d)
+ _copy_pbs_to(d)
with open(d.joinpath(util.BUILD_INFO_JSON), 'w') as f:
json.dump(build_info, f, indent=True)