在度量运行时间时,通过多次重新运行来检查脚本的性能

.

0

linux命令:for i in {1..10}; do time curl http://localhost:8000 >/dev/null; done 2>&1 | grep real real grep | 2>&1 done >/dev/null; http://localhost:8000 curl time do {1..10}; in i for for i in {1..10}; do time curl http://localhost:8000 >/dev/null; done 2>&1 | grep realrootopen.com
linux命令:for i in {1..10}; do time curl http://localhost:8000 >/dev/null; done 2>&1 | grep real real grep | 2>&1 done >/dev/null; http://localhost:8000 curl time do {1..10}; in i for for i in {1..10}; do time curl http://localhost:8000 >/dev/null; done 2>&1 | grep realrootopen.com
denh 2018-12-13 23:09:58
输出
{1..10} 创建一个从1到10的序列,用于运行主脚本10次
2>&1将stderr重定向到stdout,这是捕获time内置的“输出”所必需的

评论

相关推荐
共收录0条命令行
这里是记录和分享命令行的地方, 所有命令行都可以进行评论、提交替代方案.

热门文章