Github: https://github.com/parttimenerd/temci
安装,推荐pip安装
系统环境:欧拉
pip3 install temci==0.7.12 -i https://pypi.tuna.tsinghua.edu.cn/simple
# 依赖的python module
pip3 install pytimeparse -i https://pypi.tuna.tsinghua.edu.cn/simple
pip3 install click -i https://pypi.tuna.tsinghua.edu.cn/simple
pip3 install pureyaml -i https://pypi.tuna.tsinghua.edu.cn/simple
pip3 install rainbow_logging_handler -i https://pypi.tuna.tsinghua.edu.cn/simple
pip3 install humanfriendly -i https://pypi.tuna.tsinghua.edu.cn/simple
pip3 install pyyaml -i https://pypi.tuna.tsinghua.edu.cn/simple
# 报错File "/usr/lib64/python3.9/site-packages/matplotlib/__init__.py", line 600, in __setitem__ raise ValueError(f"Key {key}: {ve}") from None ValueError: Key backend: 'gtkagg' is not a valid value for backend; supported values are ['GTK3Agg', 'GTK3Cairo', 'MacOSX', 'nbAgg', 'Qt4Agg', 'Qt4Cairo', 'Qt5Agg', 'Qt5Cairo', 'TkAgg', 'TkCairo', 'WebAgg', 'WX', 'WXAgg', 'WXCairo', 'agg', 'cairo', 'pdf', 'pgf', 'ps', 'svg', 'template']
pip3 install matplotlib==3.5.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
# 报错ModuleNotFoundError: No module named 'cpuset'
pip3 install cpuset-py3 -i https://pypi.tuna.tsinghua.edu.cn/simple
# 报错Program block no. 0 failed: gnu time seems to be not installed and the time runner can therefore not be used
yum install time
# AttributeError: module 'seaborn.utils' has no attribute 'iqr'
pip3 install seaborn==0.10.1 -i https://pypi.tuna.tsinghua.edu.cn/simple
安装成功截图
测试
demo
temci short exec "grep '[ab]*' -R ." "grep 'a*' -R ." --runs 10
# 产生一个run_output.yaml文件
生成报告
temci report --reporter html2 run_output.yaml
# 直接执行有可能会遇到这种错误
TypeError: value 'run_output.yaml' hasn't the expected type ValidYamlFileName(): YAML parse error: load() missing 1 required positional argument: 'Loader'
需修改代码
vim /usr/local/lib/python3.9/site-packages/temci/report/report.py
# 76行屏蔽
if stats_helper is None:
runs = []
#不做校验 typecheck(Settings()["report/in"], ValidYamlFileName())
with open(Settings()["report/in"], "r") as f:
runs = yaml.safe_load(f)
self.stats_helper = RunDataStatsHelper.init_from_dicts(runs)
报告截图,从多个维度进行分析