Source code for gcpy.profile.vtune_list_hotspots

#!/usr/bin/env python3
"""
Displays a hotspot report generated by the Intel VTune profiler.
"""

# Imports
import argparse
from gcpy.profile.vtune_utils import vtune_list_all_hotspots


[docs] def main(): """ Lists all hotspots in an Intel VTune hotspot report. Command-line Arguments ---------------------- --filename, -f : str Hotspot report file generated by VTune (as CSV). --delimiter, -d : str, optional Separator between columns. Default value: "\\t" (tab) --lines-per-screen, -l : int Display this many lines at a time. """ # Tell the parser which arguments to look for parser = argparse.ArgumentParser( description="Lists all hotspots in an Intel VTune hotspot report" ) parser.add_argument( "-f", "--filename", metavar="FILENAME", type=str, required=True, help="Hotspot report (in CSV format) generated by Intel VTune" ) parser.add_argument( "-d", "--delimiter", metavar="DELIMITER", type=str, required=False, help="Character used as to separate columns in the hotspot report", default="\t" ) parser.add_argument( "-l", "--lines-per-screen", metavar="LINES-PER-SCREEN", type=int, required=False, help="Number of lines to display on screen at a time", default=30 ) # Parse command-line arguments args = parser.parse_args() # Display the hotspot report vtune_list_all_hotspots( args.filename, delimiter=args.delimiter, lines_per_screen=args.lines_per_screen )
if __name__ == '__main__': main()