https://github.com/connorbp/benchme
A simple rust library to quickly benchmark your code blocks.
https://github.com/connorbp/benchme
Last synced: 10 months ago
JSON representation
A simple rust library to quickly benchmark your code blocks.
- Host: GitHub
- URL: https://github.com/connorbp/benchme
- Owner: ConnorBP
- License: apache-2.0
- Created: 2019-04-18T06:13:38.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-08-20T18:10:20.000Z (almost 6 years ago)
- Last Synced: 2025-04-13T05:29:19.252Z (about 1 year ago)
- Language: Rust
- Size: 12.7 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🦀 benchme 🐢
A simple rust library to quickly benchmark your code blocks.
> Check it out on [crates.io](https://crates.io/crates/benchme)
[](https://crates.io/crates/benchme)
## 🏎 usage 🚀
```rust
//run a quick benchmark
benchmark! {
//your super code goes here
println!("omaewamou SHINDEIRUUUUUU! {}", 999999999);
println!("NANI!?!?!?!?");
}
//or run a benchmark tagged with a name #[name_goes_here_AbCd123] (useful if you are benchmarking more than one thing)
benchmarknamed! {
//name that will be displayed for the benchmark output
#[weeeeeeee]
//my super intense code that I need to make sure is super mega fast
println!("To the moooooooon! 🚀");
println!("the yeet was yote.");
}
```
## ✳️ acquiring benchme ✅
add the following in your `Cargo.toml` file:
`benchme = "0.1.0"`
and this in your super intensive `needsabenchmark.rs` file:
``` rust
#[macro_use]
extern crate benchme;
use std::time::{Instant};
```