memtrack
A procedural macro for tracking memory usage of Rust functions.
Overview
memtrack provides a simple way to monitor memory usage of functions in Rust programs. It works by wrapping functions with memory tracking code that measures the resident set size (RSS) before and after function execution.
Installation
Add this to your Cargo.toml:
[]
= "0.1.0"
Usage
Add the #[track_mem] attribute to the functions you want to track:
use track_mem;
This will print the memory usage before and after the function execution.