Skip to content
Snippets Groups Projects

Tweaks for hlt2_pp_2024 throughput tests

Merged Andre Gunther requested to merge gunther-2024-throughput-tests into master
3 files
+ 421
143
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -55,17 +55,19 @@ def main(listOfLogs, hltlabel, throughput, produceYAML, ht_file, heaptrack,
# call the perl scripts from https://github.com/brendangregg/FlameGraph
# to create a flamegraph
if no_inline:
run_perf_script = perf_exe + " script --no-inline -i ./perf.data"
else:
run_perf_script = perf_exe + " script -i ./perf.data"
make_flamegraph = "{FLS} --hash --title '{hltlabel} Flame Graph' --minwidth 2 --width 1600 > flamy.svg".format(
FLS=FLAME_GRAPH_SCRIPT, hltlabel=hltlabel)
if perf_exe:
if no_inline:
run_perf_script = perf_exe + " script --no-inline -i ./perf.data"
else:
run_perf_script = perf_exe + " script -i ./perf.data"
make_flamegraph = "{FLS} --hash --title '{hltlabel} Flame Graph' --minwidth 2 --width 1600 > flamy.svg".format(
FLS=FLAME_GRAPH_SCRIPT, hltlabel=hltlabel)
flamy_cmd = " | ".join(
[run_perf_script, STACK_COLLAPSE_SCRIPT, demangle, make_flamegraph])
logging.info(f"Creating flamegraph: {flamy_cmd!r}")
subprocess.Popen(flamy_cmd, shell=True).wait()
flamy_cmd = " | ".join([
run_perf_script, STACK_COLLAPSE_SCRIPT, demangle, make_flamegraph
])
logging.info(f"Creating flamegraph: {flamy_cmd!r}")
subprocess.Popen(flamy_cmd, shell=True).wait()
if ht_file:
heaptrack_print = heaptrack + '_print'
@@ -147,9 +149,10 @@ def main(listOfLogs, hltlabel, throughput, produceYAML, ht_file, heaptrack,
'facecolor': 'white',
'edgecolor': 'none'
})
plt.savefig("FlameBars.png", bbox_inches='tight')
plt.savefig("FlameBars.pdf", bbox_inches='tight')
if args.output_dir and args.output_dir[-1] != "/":
args.output_dir = args.output_dir + "/"
plt.savefig(f"{args.output_dir}FlameBars.png", bbox_inches='tight')
plt.savefig(f"{args.output_dir}FlameBars.pdf", bbox_inches='tight')
if __name__ == '__main__':
@@ -209,6 +212,12 @@ if __name__ == '__main__':
parser.add_argument('--perf-path', default='perf', help='Path to perf')
parser.add_argument(
'--output-dir',
type=str,
default="",
help='Output directory for plots.')
args = parser.parse_args()
main(args.logs, args.hltlabel, args.throughput, args.produce_yaml,
args.ht_file, args.heaptrack, args.perf_path, args.no_inline)
Loading