-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathperftable.sh
executable file
·24 lines (22 loc) · 1.02 KB
/
perftable.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
set -e
echo '//! | Function | [datealgo](https://github.com/nakedible/datealgo-rs) | [hinnant](https://howardhinnant.github.io/date_algorithms.html) | [httpdate](https://github.com/pyfisch/httpdate) | [humantime](https://github.com/tailhook/humantime) | [time](https://github.com/time-rs/time) | [chrono](https://github.com/chronotope/chrono) |'
echo '//! | ---------------------- | ------------- | --------- | --------- | --------- | --------- | --------- |'
for group in date_to_rd rd_to_date datetime_to_systemtime systemtime_to_datetime; do
echo -n "//! | $group |"
for fun in datealgo hinnant httpdate humantime time chrono; do
fn=target/criterion/compare_$group/$fun/new/estimates.json
if [ -e "$fn" ]; then
v=$(jq '.mean.point_estimate * 10 | round / 10' < "$fn")
if [ "$fun" = "datealgo" ]; then
echo -n " **$v ns** |"
else
echo -n " $v ns |"
fi
else
echo -n " |"
fi
done
echo
done
echo