Esempio n. 1
0
def main(argv):
    script_name = os.path.basename(argv[0])
    test_root_output_dir = os.path.dirname(os.path.realpath(__file__))
    
    output_dir = os.path.join(test_root_output_dir, "results")
    
    test_root_dir = os.path.join(
                        os.path.dirname(test_root_output_dir), "tests")

    h2o_jar = os.path.abspath(
                  os.path.join(test_root_dir, "..", "..", "target", "h2o.jar"))

    if not os.path.exists(h2o_jar):
        print("")
        print("ERROR: H2O jar not found: " + h2o_jar)
        print("")
        sys.exit(1)
  
    #parse cmdline arguments
    args = parse_args()
    if args['wipe']:
        PerfUtils.wipe_output_dir(output_dir)

    #new perfdb connection
    perfdb = PerfDB()
    
    perf_runner = PerfRunner(test_root_dir, output_dir, h2o_jar, perfdb)
    perf_runner.build_test_list()
    
    signal.signal(signal.SIGINT, PerfUtils.signal_handler)
    signal.signal(signal.SIGTERM, PerfUtils.signal_handler)

    #run tests
    perf_runner.run_tests()
Esempio n. 2
0
def main(argv):
    script_name = os.path.basename(argv[0])
    test_root_output_dir = os.path.dirname(os.path.realpath(__file__))

    output_dir = os.path.join(test_root_output_dir, "results")

    test_root_dir = os.path.join(os.path.dirname(test_root_output_dir),
                                 "tests")

    h2o_jar = os.path.abspath(
        os.path.join(test_root_dir, "..", "..", "target", "h2o.jar"))

    if not os.path.exists(h2o_jar):
        print("")
        print("ERROR: H2O jar not found: " + h2o_jar)
        print("")
        sys.exit(1)

    #parse cmdline arguments
    args = parse_args()
    if args['wipe']:
        PerfUtils.wipe_output_dir(output_dir)

    #new perfdb connection
    perfdb = PerfDB()

    perf_runner = PerfRunner(test_root_dir, output_dir, h2o_jar, perfdb)
    perf_runner.build_test_list()

    signal.signal(signal.SIGINT, PerfUtils.signal_handler)
    signal.signal(signal.SIGTERM, PerfUtils.signal_handler)

    #run tests
    perf_runner.run_tests()
Esempio n. 3
0
def main(argv):
    script_name = os.path.basename(argv[0])
    test_root_output_dir = os.path.dirname(os.path.realpath(__file__))

    output_dir = os.path.join(test_root_output_dir, "results")

    test_root_dir = os.path.join(os.path.dirname(test_root_output_dir),
                                 "tests")

    h2o_jar = os.path.abspath(
        os.path.join(test_root_dir, "..", "..", "perf-target", "h2o.jar"))

    if not os.path.exists(h2o_jar):
        print("")
        print("ERROR: H2O jar not found: " + h2o_jar)
        print("")
        sys.exit(1)

    #parse cmdline arguments
    args = parse_args()
    if args['wipe']:
        PerfUtils.wipe_output_dir(output_dir)

    #if True:
    #    try:
    #        cmd = ["R",
    #               "--quiet",
    #               "-f",
    #               os.path.join("../../../R/tests", "Utils/runnerSetupPackage.R"),
    #               "--args",
    #               "127.0.0.1:" + str(port)]
    #        child = subprocess.Popen(args=cmd)
    #        rv = child.wait()
    #    except: pass

    #new perfdb connection
    perfdb = PerfDB()
    test_to_run = ""

    if args['testname']:
        test_to_run = args['testname']

    perf_runner = PerfRunner(test_root_dir, output_dir, h2o_jar, perfdb)
    perf_runner.build_test_list(test_to_run)

    signal.signal(signal.SIGINT, PerfUtils.signal_handler)
    signal.signal(signal.SIGTERM, PerfUtils.signal_handler)

    #run tests
    perf_runner.run_tests()
Esempio n. 4
0
def main(argv):
    script_name = os.path.basename(argv[0])
    test_root_output_dir = os.path.dirname(os.path.realpath(__file__))
    
    output_dir = os.path.join(test_root_output_dir, "results")
    
    test_root_dir = os.path.join(
                        os.path.dirname(test_root_output_dir), "tests")

    h2o_jar = os.path.abspath(
                  os.path.join(test_root_dir, "..", "..", "perf-target", "h2o.jar"))

    if not os.path.exists(h2o_jar):
        print("")
        print("ERROR: H2O jar not found: " + h2o_jar)
        print("")
        sys.exit(1)
  
    #parse cmdline arguments
    args = parse_args()
    if args['wipe']:
        PerfUtils.wipe_output_dir(output_dir)

    #if True:
    #    try:
    #        cmd = ["R",
    #               "--quiet",
    #               "-f",
    #               os.path.join("../../../R/tests", "Utils/runnerSetupPackage.R"),
    #               "--args",
    #               "127.0.0.1:" + str(port)]
    #        child = subprocess.Popen(args=cmd)
    #        rv = child.wait()
    #    except: pass

    #new perfdb connection
    perfdb = PerfDB()
    test_to_run = ""

    if args['testname']:
        test_to_run = args['testname']

    perf_runner = PerfRunner(test_root_dir, output_dir, h2o_jar, perfdb)
    perf_runner.build_test_list(test_to_run)
    
    signal.signal(signal.SIGINT, PerfUtils.signal_handler)
    signal.signal(signal.SIGTERM, PerfUtils.signal_handler)

    #run tests
    perf_runner.run_tests()
Esempio n. 5
0
def main(argv):
    script_name = os.path.basename(argv[0])
    test_root_output_dir = os.path.dirname(os.path.realpath(__file__))

    output_dir = os.path.join(test_root_output_dir, "results")

    test_root_dir = os.path.join(os.path.dirname(test_root_output_dir),
                                 "tests")

    h2o_jar = os.path.abspath(
        os.path.join(test_root_dir, "..", "..", "perf-target", "h2o.jar"))

    if not os.path.exists(h2o_jar):
        print("")
        print("ERROR: H2O jar not found: " + h2o_jar)
        print("")
        sys.exit(1)

    args = parse_args()
    if args['wipe']:
        PerfUtils.wipe_output_dir(output_dir)

    perfdb = PerfDB()
    test_to_run = ""

    if args['testname']:
        test_to_run = args['testname']

    perf_runner = PerfRunner(test_root_dir, output_dir, h2o_jar, perfdb)
    perf_runner.build_test_list(test_to_run)

    signal.signal(signal.SIGINT, PerfUtils.signal_handler)
    signal.signal(signal.SIGTERM, PerfUtils.signal_handler)

    # Run tests
    perf_runner.run_tests()
    print "Finished running all tests"

    # Alerts
    print "Running Alerts Rollup"
    try:
        (Alerter(order=10, names=perf_runner.names)).alert(
        )  #  Parens around Alerter to make explicit that alert() is non-static
    except:
        print "Failed to write Alerts.txt"
Esempio n. 6
0
def main(argv):
    script_name = os.path.basename(argv[0])
    test_root_output_dir = os.path.dirname(os.path.realpath(__file__))

    output_dir = os.path.join(test_root_output_dir, "results")

    test_root_dir = os.path.join(
        os.path.dirname(test_root_output_dir), "tests")

    h2o_jar = os.path.abspath(
        os.path.join(test_root_dir, "..", "..", "perf-target", "h2o.jar"))

    if not os.path.exists(h2o_jar):
        print("")
        print("ERROR: H2O jar not found: " + h2o_jar)
        print("")
        sys.exit(1)

    args = parse_args()
    if args['wipe']:
        PerfUtils.wipe_output_dir(output_dir)

    perfdb = PerfDB()
    test_to_run = ""

    if args['testname']:
        test_to_run = args['testname']

    perf_runner = PerfRunner(test_root_dir, output_dir, h2o_jar, perfdb)
    perf_runner.build_test_list(test_to_run)

    signal.signal(signal.SIGINT, PerfUtils.signal_handler)
    signal.signal(signal.SIGTERM, PerfUtils.signal_handler)

    # Run tests
    perf_runner.run_tests()
    print "Finished running all tests"

    # Alerts
    print "Running Alerts Rollup"
    try:
        ( Alerter(order=10, names=perf_runner.names) ).alert() #  Parens around Alerter to make explicit that alert() is non-static
    except:
        print "Failed to write Alerts.txt"