#duration #execution #command #command-line-tool #measuring #measure #time

app meas

用于测量命令执行持续时间的命令行工具

1 个不稳定版本

0.1.0 2022年5月18日

7#measuring

MIT 许可证

7KB
66 代码行

meas

测量命令执行持续时间。类似于 time(1)

$ meas -- ping localhost -c5
00:00.004 │ PING localhost (127.0.0.1): 56 data bytes
00:00.005 │ 64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.053 ms
00:01.006 │ 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.177 ms
00:02.008 │ 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.108 ms
00:03.011 │ 64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.092 ms
00:04.014 │ 64 bytes from 127.0.0.1: icmp_seq=4 ttl=64 time=0.122 ms
00:04.014
00:04.014 │ --- localhost ping statistics ---
00:04.014 │ 5 packets transmitted, 5 packets received, 0.0% packet loss
00:04.014 │ round-trip min/avg/max/stddev = 0.053/0.110/0.177/0.041 ms
command completed in 4s 15ms

安装

$ cargo install meas

某天

  • 添加参数以控制从何处开始和结束测量命令运行时间
  • 运行命令 n 次,并生成报告

依赖项

~4–12MB
~128K SLoC