aboutsummaryrefslogtreecommitdiff
path: root/benches/whirl_common.rs
blob: dd4a945aef4e620250ebdda5dee20a4729524180 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyleft (ɔ) 2021-2021 The Whirlsplash Collective
// SPDX-License-Identifier: GPL-3.0-only

fn iai_benchmark_sort_vec_alphabetically() {
  whirl_common::sort::vec_alphabetically(&mut vec!["a", "c", "d", "b"])
}

fn iai_benchmark_system_seconds_to_hrtime() -> String {
  whirl_common::system::seconds_to_hrtime(1623058677)
}

iai::main!(
  iai_benchmark_sort_vec_alphabetically,
  iai_benchmark_system_seconds_to_hrtime
);