平均执行时间 [英] Average execution time

查看:192
本文介绍了平均执行时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有什么好的办法GNU如何测量平均值(最坏的情况下,最好的情况下),一些命令行程序的执行时间?我有图像过滤,图像的数目不详,使用循环在bash过滤它们。到目前为止,我使用的时间的,但我不能找到一个办法如何得到一些统计数据。

is there any nice GNU way how to measure average (worst case, best case) execution time of some command line program? I have image filter, unspecified amount of pictures, filtering them using for-loop in bash. So far I am using time, but I can't find a way how to get some statistics.

推荐答案

有被称为一个有趣的Perl程序 dumbbench 这基本上是围绕时间命令的包装。它运行您的程序多次,丢弃异常值,然后计算的一些统计数据。

There's an interesting Perl program called dumbbench that's essentially a wrapper around the time command. It runs your program a number of times, throws away outliers, then calculates some statistics.

笔者有​​几篇文章(这里这里 )概述了),为什么基准很烂,和b)什么样的pretty图表可以使使您的基准测试数字吸少一点。

The author has a couple of articles (here and here) outlining a) why benchmarking sucks, and b) what kind of pretty graphs you can make to make your benchmarking numbers suck a little less.

这篇关于平均执行时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆