import argparse

parser = argparse.ArgumentParser(
    prog="ftrace2pyplot",
    description="Personal use. Visualize ftrace function_graph statistics."
)

# Positional
parser.add_argument(
    "fn", metavar="function", type=str,
    help="ftrace function name to filter entries for"
)
parser.add_argument(
    "directory", type=str, help="ftrace-cmd output .dat directory"
)

# Flags
parser.add_argument(
    "-g", "--glob", type=bool, help="infer given directory as glob pattern"
)
parser.add_argument(
    "-p", "--percentile", type=float, help="clip to <PERCENTILE> in both ends",
    default=1.
)
parser.add_argument(
    "-l", "--use-log-scale", type=bool, help="use logarithmic scale (log10)",
    default=False
)
parser.add_argument(
    "-o", "--output", type=str, help="output file", default="out.pdf"
)
parser.add_argument(
    "-i", "--interactive", type=bool, help="show pyplot when finished drawing",
    default=True
)