Registry / testing / allocation-counter

allocation-counter

JSON →
library0.8.1rscratesunverified

Count the number of memory allocation of some code.

# Cargo.toml [dependencies] allocation-counter = "0.8.1"
INSTALL
IMPORT
SIG · ALLOCATION-COUNTER
A
allocation-counter
testingrustv0.8.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AllocationCounter
use allocation_counter::AllocationCounter;

Count memory allocations in a code block.

use allocation_counter::AllocationCounter; fn main() { let counter = AllocationCounter::new(); counter.start(); let _v = vec![1, 2, 3]; counter.stop(); println!("Allocations: {}", counter.count()); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.8.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
47 hits · last 30 days
node
40
Meta
1
OpenAI (training)
1
Resources
allocation-counter — cargo add allocation-counter · libregistry