From 956ba4c804f02f4c277f20dcd4c22dffe4e0237a Mon Sep 17 00:00:00 2001 From: Pascal Seitz Date: Tue, 29 Oct 2024 10:45:37 +0800 Subject: [PATCH] fix bench --- benches/crit_bench.rs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/benches/crit_bench.rs b/benches/crit_bench.rs index d50111f..17e2cab 100644 --- a/benches/crit_bench.rs +++ b/benches/crit_bench.rs @@ -59,14 +59,6 @@ fn parse_bench() { } black_box(val); }); - runner.register("serde_json_borrow", move |_data| { - let mut val = None; - for line in input_gen() { - let json: OwnedValue = OwnedValue::parse_from(line).unwrap(); - val = Some(json); - } - black_box(val); - }); runner.register("serde_json + access by key", move |_data| { let mut total_size = 0; @@ -113,9 +105,15 @@ fn get_access_for_input_name(name: &str) -> &[&[&'static str]] { &["id"], &["type"], &["actor", "avatar_url"], - &["actor", "avatar_url"], + &["actor", "url"], &["actor", "id"], &["actor", "login"], + &["actor", "url"], + &["actor", "avatar_url"], + &["type"], + &["actor", "id"], + &["publuc"], + &["created_at"], ], "wiki" => &[&["body", "url"]], _ => &[],