将性能输出管道传输到文件中

问题描述

我正在尝试粗略了解 Python 脚本生成的失败次数。我使用 perf 如下:

perf stat -a -e fp_arith_inst_retired.128b_packed_double,fp_arith_inst_retired.128b_packed_single,fp_arith_inst_retired.256b_packed_double,fp_arith_inst_retired.256b_packed_single,fp_arith_inst_retired.scalar_double,fp_arith_inst_retired.scalar_single,fp_assist.any -B  ./abc

在我的 abc 脚本中,我有以下内容

#!/bin/bash

/home/usr/anaconda3/bin/python flops.py

我的问题是如何将命令的输出放入文件中?我尝试附加到 > output.txt 上面的命令,但是它只是插入到我的 output.txt 中的 python 脚本的输出。我希望将 perf stat ... 的结果放入一个文件中。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)