diff options
Diffstat (limited to 'benches/whirl_common_iai.rs')
| -rw-r--r-- | benches/whirl_common_iai.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/benches/whirl_common_iai.rs b/benches/whirl_common_iai.rs new file mode 100644 index 0000000..025c719 --- /dev/null +++ b/benches/whirl_common_iai.rs @@ -0,0 +1,15 @@ +// Copyright (C) 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 +); |