From 947a33bf206e8bec15a9734e217cd540b8a2fb5c Mon Sep 17 00:00:00 2001 From: Ryan Levick Date: Fri, 23 Jul 2021 16:25:58 +0200 Subject: Add support for artifact size profiling --- compiler/rustc_incremental/src/persist/file_format.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'compiler/rustc_incremental') diff --git a/compiler/rustc_incremental/src/persist/file_format.rs b/compiler/rustc_incremental/src/persist/file_format.rs index 572a4fc6971..392c5bdc15a 100644 --- a/compiler/rustc_incremental/src/persist/file_format.rs +++ b/compiler/rustc_incremental/src/persist/file_format.rs @@ -95,6 +95,12 @@ where return; } + sess.prof.artifact_size( + &name.replace(' ', "_"), + path_buf.file_name().unwrap().to_string_lossy(), + encoder.position() as u64, + ); + debug!("save: data written to disk successfully"); } -- cgit 1.4.1-3-g733a5