| Crates.io | tramer |
| lib.rs | tramer |
| version | 0.1.2 |
| created_at | 2025-02-05 12:56:02.533594+00 |
| updated_at | 2025-02-05 13:18:18.765896+00 |
| description | A lightweight procedural macro library for profiling function execution time with customizable time units |
| homepage | |
| repository | https://github.com/rakivo/tramer |
| max_upload_size | |
| id | 1543933 |
| size | 6,801 |
add
tramerto yourCargo.toml:
[dependencies]
tramer = "0.1.0"
use it:
use tramer::tramer;
#[tramer("millis")]
fn profile_millis() {
std::thread::sleep(std::time::Duration::from_millis(150));
}
#[tramer("nanos")]
fn profile_nanos() {
std::thread::sleep(std::time::Duration::from_micros(300));
}
#[tramer("secs")]
fn profile_seconds() {
std::thread::sleep(std::time::Duration::from_millis(250));
}