コード例 #1
0
def main():
    parser = argparse.ArgumentParser(description=(
        "Submit Servo performance data to Perfherder. "
        "Remember to set your Treeherder credential as environment"
        " variable \'TREEHERDER_CLIENT_ID\' and "
        "\'TREEHERDER_CLIENT_SECRET\'"))
    parser.add_argument("perf_json", help="the output json from runner")
    parser.add_argument("revision_json",
                        help="the json containing the servo revision data")
    parser.add_argument("--engine",
                        type=str,
                        default='servo',
                        help=("The engine to run the tests on. Currently only"
                              " servo and gecko are supported."))
    args = parser.parse_args()

    with open(args.perf_json, 'r') as f:
        result_json = json.load(f)

    with open(args.revision_json, 'r') as f:
        revision = json.load(f)

    perf_data = format_perf_data(result_json, args.engine)
    failures = list(filter(lambda x: x['domComplete'] == -1, result_json))
    summary = format_result_summary(result_json).replace('\n', '<br/>')

    submit(perf_data, failures, revision, summary, args.engine)
    print("Done!")
コード例 #2
0
def main():
    parser = argparse.ArgumentParser(
        description=("Submit Servo performance data to Perfherder. "
                     "Put your treeherder credentail in credentail.json. "
                     "You can refer to credential.json.example.")
    )
    parser.add_argument("perf_json",
                        help="the output json from runner")
    parser.add_argument("revision_json",
                        help="the json containing the servo revision data")
    parser.add_argument("--engine",
                        type=str,
                        default='servo',
                        help=("The engine to run the tests on. Currently only"
                              " servo and gecko are supported."))
    args = parser.parse_args()

    with open(args.perf_json, 'r') as f:
        result_json = json.load(f)

    with open(args.revision_json, 'r') as f:
        revision = json.load(f)

    perf_data = format_perf_data(result_json, args.engine)
    failures = list(filter(lambda x: x['domComplete'] == -1, result_json))
    summary = format_result_summary(result_json)
    summary = summary.replace('\n', '<br/>')

    submit(perf_data, failures, revision, summary, args.engine)
    print("Done!")
コード例 #3
0
def main():
    parser = argparse.ArgumentParser(
        description=("Submit Servo performance data to Perfherder. "
                     "Remember to set your Treeherder credential as environment"
                     " variable \'TREEHERDER_CLIENT_ID\' and "
                     "\'TREEHERDER_CLIENT_SECRET\'"))
    parser.add_argument("perf_json",
                        help="the output json from runner")
    parser.add_argument("revision_json",
                        help="the json containing the servo revision data")
    parser.add_argument("--engine",
                        type=str,
                        default='servo',
                        help=("The engine to run the tests on. Currently only"
                              " servo and gecko are supported."))
    args = parser.parse_args()

    with open(args.perf_json, 'r') as f:
        result_json = json.load(f)

    with open(args.revision_json, 'r') as f:
        revision = json.load(f)

    perf_data = format_perf_data(result_json, args.engine)
    failures = list(filter(lambda x: x['domComplete'] == -1, result_json))
    summary = format_result_summary(result_json).replace('\n', '<br/>')

    submit(perf_data, failures, revision, summary, args.engine)
    print("Done!")
コード例 #4
0
def main():
    parser = argparse.ArgumentParser(
        description=("Submit Servo performance data to Perfherder. "
                     "Put your treeherder credentail in credentail.json. "
                     "You can refer to credential.json.example."))
    parser.add_argument("perf_json", help="the output json from runner")
    parser.add_argument("revision_json",
                        help="the json containing the servo revision data")
    parser.add_argument("--engine",
                        type=str,
                        default='servo',
                        help=("The engine to run the tests on. Currently only"
                              " servo and gecko are supported."))
    args = parser.parse_args()

    with open(args.perf_json, 'r') as f:
        result_json = json.load(f)

    with open(args.revision_json, 'r') as f:
        revision = json.load(f)

    perf_data = format_perf_data(result_json, args.engine)
    failures = list(filter(lambda x: x['domComplete'] == -1, result_json))
    summary = format_result_summary(result_json)
    summary = summary.replace('\n', '<br/>')

    submit(perf_data, failures, revision, summary, args.engine)
    print("Done!")
コード例 #5
0
ファイル: test_runner.py プロジェクト: shinglyu/servo-perf
def test_log_result():
    results = [{
        "testcase": "http://localhost:8000/page_load_test/56.com/www.56.com/index.html",
        "domComplete": -1
    }, {
        "testcase": "http://localhost:8000/page_load_test/56.com/www.56.com/index.html",
        "domComplete": -1
    }, {
        "testcase": "http://localhost:8000/page_load_test/104.com/www.104.com/index.html",
        "domComplete": 123456789
    }]

    expected = """
========================================
Total 3 tests; 1 succeeded, 2 failed.

Failure summary:
 - http://localhost:8000/page_load_test/56.com/www.56.com/index.html
========================================
"""
    assert(expected == runner.format_result_summary(results))
コード例 #6
0
ファイル: test_runner.py プロジェクト: yoyo930021/servo
def test_log_result():
    results = [{
        "testcase": "http://localhost:8000/page_load_test/56.com/www.56.com/index.html",
        "domComplete": -1
    }, {
        "testcase": "http://localhost:8000/page_load_test/56.com/www.56.com/index.html",
        "domComplete": -1
    }, {
        "testcase": "http://localhost:8000/page_load_test/104.com/www.104.com/index.html",
        "domComplete": 123456789
    }]

    expected = """
========================================
Total 3 tests; 1 succeeded, 2 failed.

Failure summary:
 - http://localhost:8000/page_load_test/56.com/www.56.com/index.html
========================================
"""
    assert(expected == runner.format_result_summary(results))