| Crates.io | zombie_profiler |
| lib.rs | zombie_profiler |
| version | 0.0.4 |
| created_at | 2025-12-22 08:58:05.970468+00 |
| updated_at | 2025-12-24 18:15:25.787725+00 |
| description | Zero-overhead profiling utilities for Zombie benchmarks |
| homepage | |
| repository | https://github.com/kawayww/zombie-rs |
| max_upload_size | |
| id | 1999360 |
| size | 31,048 |
Zero-overhead profiling utilities for zombie-rs benchmarks.
This crate provides:
TrackingAllocator: A global allocator that tracks memory usageProfiler: Utilities for measuring time and memory in benchmarksBenchmarkSuite: Framework for running comparative benchmarksuse zombie_profiler::{Profiler, TrackingAllocator, BenchmarkSuite};
#[global_allocator]
static GLOBAL: TrackingAllocator = TrackingAllocator::new();
[!WARNING]
TrackingAllocatoris a#[global_allocator]. Do not use it if your application already uses a custom allocator (e.g., mimalloc, jemalloc), as Rust only allows one global allocator. This crate is intended for development and benchmarking.
fn main() {
let profiler = Profiler::new();
// Measure a computation
let (result, stats) = profiler.measure(|| {
// expensive computation
42
});
println!("Result: {}, Time: {:?}, Memory: {} bytes",
result, stats.duration, stats.peak_memory);
}
std (default): Standard library supportui: Pretty-printed tables for benchmark resultsMIT