Beispiel #1
0
def start(args):
    if args.json_file:
        BenchmarkRunner.show_results(json.load(open(args.json_file, 'r')), args.scale_unit)
        return
    if args.allplans:
        failed = []
        plandir = os.path.join(os.path.dirname(__file__), 'data/plans')
        planlist = [os.path.splitext(f)[0] for f in os.listdir(plandir) if f.endswith('.plan')]
        if not planlist:
            raise Exception('Cant find any .plan file in directory %s' % plandir)
        for plan in sorted(planlist):
            _log.info('Starting benchmark plan: %s' % plan)
            try:
                runner = BenchmarkRunner(plan, args.localCopy, args.countOverride, args.buildDir, args.output, args.platform, args.browser, args.scale_unit, args.device_id)
                runner.execute()
                _log.info('Finished benchmark plan: %s' % plan)
            except KeyboardInterrupt:
                raise
            except:
                failed.append(plan)
                _log.exception('Error running benchmark plan: %s' % plan)
        if failed:
            _log.error('The following benchmark plans have failed: %s' % failed)
        return len(failed)
    runner = BenchmarkRunner(args.plan, args.localCopy, args.countOverride, args.buildDir, args.output, args.platform, args.browser, args.scale_unit, args.device_id)
    runner.execute()
def start(args):
    if args.json_file:
        results_json = json.load(open(args.json_file, 'r'))
        if 'debugOutput' in results_json:
            del results_json['debugOutput']
        BenchmarkRunner.show_results(results_json, args.scale_unit)
        return
    if args.allplans:
        failed = []
        skipped = []
        plandir = os.path.join(os.path.dirname(__file__), 'data/plans')
        planlist = [
            os.path.splitext(f)[0] for f in os.listdir(plandir)
            if f.endswith('.plan')
        ]
        skippedfile = os.path.join(plandir, 'Skipped')
        if not planlist:
            raise Exception('Cant find any .plan file in directory %s' %
                            plandir)
        if os.path.isfile(skippedfile):
            skipped = [
                line.strip() for line in open(skippedfile)
                if not line.startswith('#') and len(line) > 1
            ]
        for plan in sorted(planlist):
            if plan in skipped:
                _log.info(
                    'Skipping benchmark plan: %s because is listed on the Skipped file'
                    % plan)
                continue
            _log.info('Starting benchmark plan: %s' % plan)
            try:
                runner = BenchmarkRunner(plan, args.localCopy,
                                         args.countOverride, args.buildDir,
                                         args.output, args.platform,
                                         args.browser, args.scale_unit,
                                         args.device_id)
                runner.execute()
                _log.info('Finished benchmark plan: %s' % plan)
            except KeyboardInterrupt:
                raise
            except:
                failed.append(plan)
                _log.exception('Error running benchmark plan: %s' % plan)
        if failed:
            _log.error('The following benchmark plans have failed: %s' %
                       failed)
        return len(failed)
    runner = BenchmarkRunner(args.plan, args.localCopy, args.countOverride,
                             args.buildDir, args.output, args.platform,
                             args.browser, args.scale_unit, args.device_id)
    runner.execute()
def start(args):
    if args.json_file:
        BenchmarkRunner.show_results(json.load(open(args.json_file, 'r')), args.scale_unit)
        return
    if args.allplans:
        failed = []
        skipped = []
        plandir = os.path.join(os.path.dirname(__file__), 'data/plans')
        planlist = [os.path.splitext(f)[0] for f in os.listdir(plandir) if f.endswith('.plan')]
        skippedfile = os.path.join(plandir, 'Skipped')
        if not planlist:
            raise Exception('Cant find any .plan file in directory %s' % plandir)
        if os.path.isfile(skippedfile):
            skipped = [line.strip() for line in open(skippedfile) if not line.startswith('#') and len(line) > 1]
        for plan in sorted(planlist):
            if plan in skipped:
                _log.info('Skipping benchmark plan: %s because is listed on the Skipped file' % plan)
                continue
            _log.info('Starting benchmark plan: %s' % plan)
            try:
                runner = BenchmarkRunner(plan, args.localCopy, args.countOverride, args.buildDir, args.output, args.platform, args.browser, args.scale_unit, args.device_id)
                runner.execute()
                _log.info('Finished benchmark plan: %s' % plan)
            except KeyboardInterrupt:
                raise
            except:
                failed.append(plan)
                _log.exception('Error running benchmark plan: %s' % plan)
        if failed:
            _log.error('The following benchmark plans have failed: %s' % failed)
        return len(failed)
    runner = BenchmarkRunner(args.plan, args.localCopy, args.countOverride, args.buildDir, args.output, args.platform, args.browser, args.scale_unit, args.device_id)
    runner.execute()
Beispiel #4
0
def start(args):
    if args.json_file:
        results_json = json.load(open(args.json_file, 'r'))
        if 'debugOutput' in results_json:
            del results_json['debugOutput']
        BenchmarkRunner.show_results(results_json, args.scale_unit,
                                     args.show_iteration_values)
        return
    if args.allplans:
        failed = []
        skipped = []
        planlist = BenchmarkRunner.available_plans()
        skippedfile = os.path.join(BenchmarkRunner.plan_directory(), 'Skipped')
        if not planlist:
            raise Exception('Cant find any .plan file in directory %s' %
                            BenchmarkRunner.plan_directory())
        if os.path.isfile(skippedfile):
            skipped = [
                line.strip() for line in open(skippedfile)
                if not line.startswith('#') and len(line) > 1
            ]
        for plan in sorted(planlist):
            if plan in skipped:
                _log.info(
                    'Skipping benchmark plan: %s because is listed on the Skipped file'
                    % plan)
                continue
            _log.info('Starting benchmark plan: %s' % plan)
            try:
                run_benchmark_plan(args, plan)
                _log.info('Finished benchmark plan: %s' % plan)
            except KeyboardInterrupt:
                raise
            except:
                failed.append(plan)
                _log.exception('Error running benchmark plan: %s' % plan)
        if failed:
            _log.error('The following benchmark plans have failed: %s' %
                       failed)
        return len(failed)
    if args.list_plans:
        list_benchmark_plans()
        return

    run_benchmark_plan(args, args.plan)
Beispiel #5
0
def start(args):
    if args.json_file:
        BenchmarkRunner.show_results(json.load(open(args.json_file, 'r')),
                                     args.scale_unit)
        return
    runner = BenchmarkRunner(args.plan, args.localCopy, args.countOverride,
                             args.buildDir, args.output, args.platform,
                             args.browser, args.scale_unit, args.device_id)
    runner.execute()
Beispiel #6
0
def list_benchmark_plans():
    print "Available benchmark plans: "
    for plan in BenchmarkRunner.available_plans():
        print "\t%s" % plan
Beispiel #7
0
def start(args):
    if args.json_file:
        BenchmarkRunner.show_results(json.load(open(args.json_file, 'r')), args.scale_unit)
        return
    runner = BenchmarkRunner(args.plan, args.localCopy, args.countOverride, args.buildDir, args.output, args.platform, args.browser, args.scale_unit, args.device_id)
    runner.execute()
Beispiel #8
0
def start(args):
    runner = BenchmarkRunner(args.plan, args.localCopy, args.countOverride, args.buildDir, args.output, args.platform, args.browser, args.httpServerDriverOverride, args.device_id)
    runner.execute()
Beispiel #9
0
def start(args):
    runner = BenchmarkRunner(args.plan, args.localCopy, args.countOverride,
                             args.buildDir, args.output, args.platform,
                             args.browser, args.httpServerDriverOverride,
                             args.device_id)
    runner.execute()