当前位置: 首页 > 工具软件 > Cyclictest > 使用案例 >

gnuplot生成cyclictest histogram图

吴镜
2023-12-01
#!/bin/bash

# usage ./gen-graph.sh <PATH>
# NOTE: the best way is to use this scripe in .txt files' PATH.

# all .txt files are treated as histogram
datafile=($(find $1 -name "*.txt"))
echo "set term post eps color solid enh" > graph.cmd
for(( i=0;i<${#datafile[@]};i++)) do
  echo "set output \"${datafile[i]}.eps\"" >> graph.cmd
  echo "plot for [i=1:10] \"${datafile[i]}\" using 1:i+1 title \"thread\".i with lines" >> graph.cmd
done

gnuplot graph.cmd
#epsfile=($(find . -name "*.eps"))
#for(( i=0;i<${#epsfile[@]};i++)) do
#  convert ${epsfile[i]} $(basename ${epsfile[i]} .txt.eps).png
#done
 类似资料: