mirror of
https://github.com/NotAShelf/microfetch.git
synced 2025-12-15 00:41:01 +00:00
treewide: set up Hotpath for benchmarking individual allocations
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I0351e5753996e6d0391fc9e2f329878a6a6a6964
This commit is contained in:
parent
9bd4c9a70a
commit
2a6fe2a3f1
8 changed files with 1075 additions and 3 deletions
|
|
@ -19,6 +19,7 @@ use crate::{
|
|||
uptime::get_current,
|
||||
};
|
||||
|
||||
#[cfg_attr(feature = "hotpath", hotpath::main)]
|
||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
if Some("--version") == std::env::args().nth(1).as_deref() {
|
||||
println!("Microfetch {}", env!("CARGO_PKG_VERSION"));
|
||||
|
|
@ -56,6 +57,7 @@ struct Fields {
|
|||
colors: String,
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "hotpath", hotpath::measure)]
|
||||
fn print_system_info(
|
||||
fields: &Fields,
|
||||
) -> Result<(), Box<dyn std::error::Error>> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue