@@ -44,15 +44,31 @@ fn benchmark_fixtures(c: &mut Criterion) {
4444 } ) ;
4545 } ) ;
4646
47- // Very large fixture benchmark - disabled due to parsing issues
48- // group.bench_function("duplicate_packages", |b| {
49- // let fixture = load_fixture("duplicate-packages.yarn.lock");
50- // b.iter(|| {
51- // let result = parse_lockfile(black_box(&fixture));
52- // assert!(result.is_ok(), "Should parse duplicate packages fixture successfully");
53- // result.unwrap().1
54- // });
55- // });
47+ // Large fixture benchmark
48+ group. bench_function ( "duplicate_packages" , |b| {
49+ let fixture = load_fixture ( "berry.lock" ) ;
50+ b. iter ( || {
51+ let result = parse_lockfile ( black_box ( & fixture) ) ;
52+ assert ! (
53+ result. is_ok( ) ,
54+ "Should parse duplicate packages fixture successfully"
55+ ) ;
56+ result. unwrap ( ) . 1
57+ } ) ;
58+ } ) ;
59+
60+ // Extra large fixture benchmark
61+ group. bench_function ( "resolutions_patches" , |b| {
62+ let fixture = load_fixture ( "resolutions-patches.yarn.lock" ) ;
63+ b. iter ( || {
64+ let result = parse_lockfile ( black_box ( & fixture) ) ;
65+ assert ! (
66+ result. is_ok( ) ,
67+ "Should parse resolutions patches fixture successfully"
68+ ) ;
69+ result. unwrap ( ) . 1
70+ } ) ;
71+ } ) ;
5672
5773 group. finish ( ) ;
5874}
@@ -66,7 +82,8 @@ fn benchmark_parsing_speed_vs_size(c: &mut Criterion) {
6682 ( "workspaces.yarn.lock" , "small-medium" ) ,
6783 ( "yarn4-mixed-protocol.lock" , "medium" ) ,
6884 ( "auxiliary-packages.yarn.lock" , "large" ) ,
69- // ("duplicate-packages.yarn.lock", "very-large"), // Disabled due to parsing issues
85+ ( "berry.lock" , "extra-large" ) , // Large Berry lockfile (~112KB)
86+ ( "resolutions-patches.yarn.lock" , "extra-extra-large" ) , // Very large lockfile (~2MB)
7087 ] ;
7188
7289 for ( fixture_name, size_label) in fixtures {
@@ -94,6 +111,8 @@ fn benchmark_memory_usage(c: &mut Criterion) {
94111 "minimal-berry.lock" ,
95112 "workspaces.yarn.lock" ,
96113 "auxiliary-packages.yarn.lock" ,
114+ "berry.lock" ,
115+ "resolutions-patches.yarn.lock" ,
97116 ] ;
98117
99118 for fixture_name in fixtures {
@@ -157,6 +176,8 @@ fn benchmark_heap_usage(c: &mut Criterion) {
157176 ( "minimal-berry.lock" , "small" ) ,
158177 ( "workspaces.yarn.lock" , "medium" ) ,
159178 ( "auxiliary-packages.yarn.lock" , "large" ) ,
179+ ( "berry.lock" , "extra-large" ) ,
180+ ( "resolutions-patches.yarn.lock" , "extra-extra-large" ) ,
160181 ] ;
161182
162183 for ( fixture_name, size_label) in fixtures {
0 commit comments