Beispiel #1
0
def main():
    parser = util.default_argparse('Print the total time of all benchmarks in the JSON-file.')
    args = parser.parse_args()
    if args.output is not None:
        args.output.write(str(visualize(args)))
    else:
        print("Total time of all benchmarks: %f" % visualize(args))
Beispiel #2
0
def main():
    parser = util.default_argparse(
        'Raw dump of the stdout and stderr in a Benchpress JSON-file.')
    parser.add_argument("--no-stdout",
                        action="store_true",
                        help="Don't dump stdout.")
    parser.add_argument("--no-stderr",
                        action="store_true",
                        help="Don't dump stderr.")
    args = parser.parse_args()
    if args.output is not None:
        args.output.write(visualize(args))
    else:
        print(visualize(args))
Beispiel #3
0
def main():
    parser = util.default_argparse(
        'Prints the result of a Benchpress JSON-file.')
    parser.add_argument(
        "--csv",
        action="store_true",
        help="Use the CSV format using 'separator' as the separator.")
    parser.add_argument(
        "--csv-separator",
        type=str,
        default=',',
        metavar="sep",
        help="Use the CSV format using 'sep' as the separator.")
    args = parser.parse_args()
    if args.output is not None:
        args.output.write(visualize(args))
    else:
        print(visualize(args))
Beispiel #4
0
def main():
    parser = util.default_argparse(
        'Prints the result of a series of Benchpress JSON-files.', True)
    parser.add_argument(
        "--csv-separator",
        type=str,
        default=',',
        metavar="sep",
        help="Use the CSV format using 'sep' as the separator.")
    parser.add_argument(
        '--meta-key',
        default='creation_date_utc',
        type=str,
        choices=['creation_date_utc', 'tag'],
        help="The meta key, which value vary throughout the series")
    args = parser.parse_args()
    if args.output is not None:
        args.output.write(visualize(args))
    else:
        print(visualize(args))
Beispiel #5
0
def main():
    parser = util.default_argparse(
        'Plots the result of a Benchpress JSON-file (one bar per command)')
    parser.add_argument('--title',
                        default=None,
                        help='The title of the chart.')
    parser.add_argument(
        '--warmups',
        default=0,
        type=int,
        help="Specify the amount of samples from warm-up rounds.")
    parser.add_argument('--ymax', default=None, help="Max value of the y-axis")
    parser.add_argument('--ymin', default=None, help="Min value of the y-axis")
    parser.add_argument('--ylog',
                        default=False,
                        action='store_true',
                        help="Makes the y-axis logarithmic")
    parser.add_argument('--ylabel',
                        default="Elapsed time in seconds",
                        help="Label on the y-axis")
    parser.add_argument('--xticklabel-rotation',
                        default=90,
                        metavar='DEGREE',
                        type=int,
                        help="The rotation of the labels on the x-axis")
    parser.add_argument('--no-legend',
                        default=False,
                        action='store_true',
                        help="Hide the legend box")
    parser.add_argument('--fontsize', default=12, type=int, help="Fontsize")
    parser.add_argument('--pyplot-style',
                        default='seaborn-darkgrid',
                        type=str,
                        choices=plt.style.available,
                        help="The matplotlib.pyplot.style to use")
    parser.add_argument('--mpld3',
                        action='store_true',
                        help="Generate mpld3 plots <https://mpld3.github.io>")
    args = parser.parse_args()
    one_bar_per_cmd(args)
Beispiel #6
0
def main():
    parser = util.default_argparse('Plots the result of a Benchpress JSON-file (one bar per command)', True)
    parser.add_argument(
        '--title',
        default=None,
        help='The title of the chart.'
    )
    parser.add_argument(
        '--warmups',
        default=0,
        type=int,
        help="Specify the amount of samples from warm-up rounds."
    )
    parser.add_argument(
        '--ymax',
        default=None,
        help="Max value of the y-axis"
    )
    parser.add_argument(
        '--ymin',
        default=None,
        help="Min value of the y-axis"
    )
    parser.add_argument(
        '--ylog',
        default=False,
        action='store_true',
        help="Makes the y-axis logarithmic"
    )
    parser.add_argument(
        '--ylabel',
        default="Elapsed time in seconds",
        help="Label on the y-axis"
    )
    parser.add_argument(
        '--plot-size',
        type=float,
        default=0.7,
        help="Size of the plot compared to total figure (0.1 to 1.0)"
    )
    parser.add_argument(
        '--xticklabel-rotation',
        default=90,
        metavar='DEGREE',
        type=int,
        help="The rotation of the labels on the x-axis"
    )
    parser.add_argument(
        '--no-legend',
        default=False,
        action='store_true',
        help="Hide the legend box"
    )
    parser.add_argument(
        '--fontsize',
        default=12,
        type=int,
        help="Fontsize"
    )
    parser.add_argument(
        '--pyplot-style',
        default='seaborn-darkgrid',
        type=str,
        help="The matplotlib.pyplot.style to use"
    )
    parser.add_argument(
        '--meta-key',
        default='creation_date_utc',
        type=str,
        choices=['creation_date_utc', 'tag'],
        help="The meta key, which value vary throughout the series"
    )
    parser.add_argument(
        '--mpld3',
        action='store_true',
        help="Generate mpld3 plot <https://mpld3.github.io>"
    )
    args = parser.parse_args()
    line_per_cmd(args)