This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
tsg-tsg-performance-test-tools/FlameGraph/1_collect_data.sh
luwenpeng 7a8342a048 增加脚本用于生产火焰图
1_collect_data.sh    : 采集指定 CPU 的运行数据
	2_conversion_data.sh :将采集的数据转化成火焰图
2021-07-14 10:45:09 +00:00

11 lines
218 B
Bash

#!/bin/bash
if [ ! -n "$1" ]; then
echo "Please input CPU ID !"
exit 0
fi
# 执行后在当前目录下会生成采样数据 perf.data
rm -rf perf.data
perf record -e cpu-clock --call-graph dwarf -C $1 -- sleep 10