import argparse

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

parser.add_argument(
    "directory", type=str, help="ftrace-cmd output .dat directory"
)

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(
    "--output", "-o", type=str, help="output file", default="out.pdf"
)