Skip to content

Commit 31cbb9d

Browse files
feat: add a way to disable perf compression through env var
This is aimed to be dev only, because some profilers do not support compressed perf data, namely hotspot.
1 parent 0d6ea25 commit 31cbb9d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/executor/wall_time/perf/perf_executable.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ pub fn get_compression_flags<S: AsRef<Path>>(perf_executable: S) -> Result<Optio
134134

135135
if has_zstd {
136136
debug!("perf supports zstd compression");
137+
if std::env::var("CODSPEED_PERF_DISABLE_COMPRESSION").is_ok() {
138+
info!("CODSPEED_PERF_DISABLE_COMPRESSION is set, disabling perf compression");
139+
return Ok(None);
140+
}
137141
// 3 is a widely adopted default level (AWS Athena, Python, ...)
138142
Ok(Some("--compression-level=3".to_string()))
139143
} else {

0 commit comments

Comments
 (0)