Skip to content

Commit 4a19ac0

Browse files
committed
Remove self-profile three file format support
1 parent 7206038 commit 4a19ac0

File tree

2 files changed

+1
-46
lines changed

2 files changed

+1
-46
lines changed

collector/src/compile/execute/bencher.rs

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -282,44 +282,6 @@ impl SelfProfileS3Upload {
282282
.context("create temporary file")
283283
.unwrap();
284284
let filename = match files {
285-
SelfProfileFiles::Seven {
286-
string_index,
287-
string_data,
288-
events,
289-
} => {
290-
let tarball = snap::write::FrameEncoder::new(Vec::new());
291-
let mut builder = tar::Builder::new(tarball);
292-
builder.mode(tar::HeaderMode::Deterministic);
293-
294-
let append_file = |builder: &mut tar::Builder<_>,
295-
file: &Path,
296-
name: &str|
297-
-> anyhow::Result<()> {
298-
if file.exists() {
299-
// Silently ignore missing files, the new self-profile
300-
// experiment with one file has a different structure.
301-
builder.append_path_with_name(file, name)?;
302-
}
303-
Ok(())
304-
};
305-
306-
append_file(&mut builder, &string_index, "self-profile.string_index")
307-
.expect("append string index");
308-
append_file(&mut builder, &string_data, "self-profile.string_data")
309-
.expect("append string data");
310-
append_file(&mut builder, &events, "self-profile.events").expect("append events");
311-
builder.finish().expect("complete tarball");
312-
std::fs::write(
313-
upload.path(),
314-
builder
315-
.into_inner()
316-
.expect("get")
317-
.into_inner()
318-
.expect("snap success"),
319-
)
320-
.expect("wrote tarball");
321-
format!("self-profile-{}.tar.sz", collection)
322-
}
323285
SelfProfileFiles::Eight { file } => {
324286
let data = std::fs::read(file).expect("read profile data");
325287
let mut data = snap::read::FrameEncoder::new(&data[..]);

collector/src/compile/execute/mod.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -485,14 +485,7 @@ enum DeserializeStatError {
485485
}
486486

487487
enum SelfProfileFiles {
488-
Seven {
489-
string_data: PathBuf,
490-
string_index: PathBuf,
491-
events: PathBuf,
492-
},
493-
Eight {
494-
file: PathBuf,
495-
},
488+
Eight { file: PathBuf },
496489
}
497490

498491
fn process_stat_output(

0 commit comments

Comments
 (0)