From f09bc34af61d59c015a1fa3db7a3b2a0ac7a3f6d Mon Sep 17 00:00:00 2001 From: Nikolai Vazquez Date: Tue, 19 Dec 2023 00:19:10 -0500 Subject: [PATCH] Profile allocations in Divan benchmarks --- Cargo.toml | 2 +- benches/divan.rs | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index b774ab9..e53a456 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,7 +34,7 @@ features = ["derive"] version = "1.0.61" [dev-dependencies] -divan = "0.1.5" +divan = "0.1.8" insta = { version = "1.26.0", default-features = false } [dev-dependencies.quickcheck] diff --git a/benches/divan.rs b/benches/divan.rs index 8323060..ab6c48e 100644 --- a/benches/divan.rs +++ b/benches/divan.rs @@ -1,5 +1,8 @@ mod util; +#[global_allocator] +static ALLOC: divan::AllocProfiler = divan::AllocProfiler::system(); + fn main() { let _tracing = util::init_tracing();