Skip to content

Commit ff28827

Browse files
weihanglomichaelwoerister
authored andcommitted
fix(analyzeme): drop the support of v7 profdata format
Based on the discussion in #229[^1] the next release (v12) will stop supporting the v7 profdata format. [^1]: #229 (comment)
1 parent bb7214a commit ff28827

File tree

6 files changed

+0
-139
lines changed

6 files changed

+0
-139
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ repository = "https://github.com/rust-lang/measureme"
2121

2222
[workspace.dependencies]
2323
analyzeme = { path = "analyzeme" }
24-
analyzeme_9_2_0 = { package = "analyzeme", git = "https://github.com/rust-lang/measureme", tag = "9.2.0" }
2524
clap = { version = "4.5.0", features = ["derive"] }
2625
decodeme = { path = "decodeme" }
2726
decodeme_10_1_2 = { package = "decodeme", git = "https://github.com/rust-lang/measureme", tag = "10.1.2" }

analyzeme/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ serde.workspace = true
1717
# Depending on older versions of this crate allows us to keep supporting older
1818
# file formats.
1919

20-
# File format: v7
21-
analyzeme_9_2_0.workspace = true
22-
2320
# File format: v8
2421
decodeme_10_1_2.workspace = true
2522
measureme_10_1_2.workspace = true

analyzeme/src/file_formats/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use decodeme::{event::Event, lightweight_event::LightweightEvent, Metadata};
22
use std::fmt::Debug;
33

4-
pub mod v7;
54
pub mod v8;
65
pub mod v9;
76

analyzeme/src/file_formats/v7.rs

Lines changed: 0 additions & 78 deletions
This file was deleted.

analyzeme/src/profiling_data.rs

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ impl ProfilingData {
6060
)?;
6161

6262
let event_decoder: Box<dyn file_formats::EventDecoder> = match file_format_version {
63-
file_formats::v7::FILE_FORMAT => Box::new(file_formats::v7::EventDecoder::new(data)?),
6463
file_formats::v8::FILE_FORMAT => Box::new(file_formats::v8::EventDecoder::new(
6564
data,
6665
diagnostic_file_path,
@@ -539,61 +538,6 @@ mod tests {
539538
use std::collections::{HashMap, HashSet};
540539
use std::io::Read;
541540

542-
#[test]
543-
fn can_read_v7_profdata_files() {
544-
let (data, file_format_version) =
545-
read_data_and_version("tests/profdata/v7.mm_profdata.gz");
546-
assert_eq!(file_format_version, file_formats::v7::FILE_FORMAT);
547-
let profiling_data = ProfilingData::from_paged_buffer(data, None)
548-
.expect("Creating the profiling data failed");
549-
let grouped_events = group_events(&profiling_data);
550-
let event_kinds = grouped_events
551-
.keys()
552-
.map(|k| k.as_str())
553-
.collect::<HashSet<_>>();
554-
let expect_event_kinds = vec!["GenericActivity", "IncrementalResultHashing", "Query"]
555-
.into_iter()
556-
.collect::<HashSet<_>>();
557-
assert_eq!(event_kinds, expect_event_kinds);
558-
559-
let generic_activity_len = 6425;
560-
let incremental_hashing_len = 2237;
561-
let query_len = 2260;
562-
assert_eq!(
563-
grouped_events["GenericActivity"].len(),
564-
generic_activity_len
565-
);
566-
assert_eq!(
567-
grouped_events["IncrementalResultHashing"].len(),
568-
incremental_hashing_len
569-
);
570-
assert_eq!(grouped_events["Query"].len(), query_len);
571-
572-
assert_eq!(
573-
&*grouped_events["GenericActivity"][generic_activity_len / 2].label,
574-
"incr_comp_encode_dep_graph"
575-
);
576-
assert_eq!(
577-
grouped_events["GenericActivity"][generic_activity_len / 2].duration(),
578-
Some(Duration::from_nanos(200))
579-
);
580-
581-
assert_eq!(
582-
&*grouped_events["IncrementalResultHashing"][incremental_hashing_len - 1].label,
583-
"item_children"
584-
);
585-
assert_eq!(
586-
grouped_events["IncrementalResultHashing"][incremental_hashing_len - 1].duration(),
587-
Some(Duration::from_nanos(300))
588-
);
589-
590-
assert_eq!(&*grouped_events["Query"][0].label, "hir_crate");
591-
assert_eq!(
592-
grouped_events["Query"][0].duration(),
593-
Some(Duration::from_nanos(16800))
594-
);
595-
}
596-
597541
#[test]
598542
fn can_read_v8_profdata_files() {
599543
let (data, file_format_version) =
-104 KB
Binary file not shown.

0 commit comments

Comments
 (0)