@@ -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) =
0 commit comments