Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions collector/src/compile/execute/profiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,13 @@ impl Processor for ProfileProcessor<'_> {
}

// Samply produces (via rustc-fake) a data file called
// `profile.json`. We copy it from the temp dir to the output dir,
// giving it a new name in the process.
// `profile.json.gz`. We copy it from the temp dir to the output dir,
// giving it a new name in the process. The new name must end
// in `.gz` for `samply load` to handle it.
Profiler::Samply => {
let tmp_samply_file = filepath(data.cwd, "profile.json");
let samply_file = filepath(self.output_dir, &out_file("samply"));
let tmp_samply_file = filepath(data.cwd, "profile.json.gz");
let samply_file =
filepath(self.output_dir, &format!("{}.gz", out_file("samply")));

fs::copy(tmp_samply_file, samply_file)?;
}
Expand Down
Loading