mirror of
https://github.com/NotAShelf/microfetch.git
synced 2025-11-03 07:26:35 +00:00
benchmark.rs: fix benchmark function's name
This commit is contained in:
parent
5e515065e9
commit
4683335606
1 changed files with 2 additions and 2 deletions
|
|
@ -7,7 +7,7 @@ use microfetch_lib::system::{
|
||||||
};
|
};
|
||||||
use microfetch_lib::uptime::get_current;
|
use microfetch_lib::uptime::get_current;
|
||||||
|
|
||||||
fn benchmark1(c: &mut Criterion) {
|
fn main_benchmark(c: &mut Criterion) {
|
||||||
let utsname = nix::sys::utsname::uname().expect("lol");
|
let utsname = nix::sys::utsname::uname().expect("lol");
|
||||||
c.bench_function("user_info", |b| {
|
c.bench_function("user_info", |b| {
|
||||||
b.iter(|| get_username_and_hostname(&utsname))
|
b.iter(|| get_username_and_hostname(&utsname))
|
||||||
|
|
@ -23,5 +23,5 @@ fn benchmark1(c: &mut Criterion) {
|
||||||
c.bench_function("colors", |b| b.iter(print_dots));
|
c.bench_function("colors", |b| b.iter(print_dots));
|
||||||
}
|
}
|
||||||
|
|
||||||
criterion_group!(benches, benchmark1);
|
criterion_group!(benches, main_benchmark);
|
||||||
criterion_main!(benches);
|
criterion_main!(benches);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue