示例#1
0
def online_boutique_experiment(platform, multizonal, empty_filter, arg_no_filter, filter_dirs):
    filters = filter_dirs
    if arg_no_filter:
        filters = []
    no_filter = 'ON'
    if empty_filter:
        filters.append(EMPTY_FILTER_DIR)

    #setup_application_deployment(platform, multizonal, "OB")
    #output = platform + "online_boutique_index"
    #start_benchmark(filters, platform, THREADS, QPS, RUNTIME, application="OB",
    #    output_file=output, no_filter=no_filter, subpath='', request='GET',
    #    custom='loadgen', plot_name = "Index - Online Boutique", command_args=[])
    #stop_kubernetes(platform)
    #time.sleep(20)


    #setup_application_deployment(platform, multizonal, "OB")
    #output = platform + "online_boutique_set_currency"
    #start_benchmark(filters, platform, THREADS, QPS, RUNTIME, application="OB",
    #    output=output, no_filter= no_filter, subpath='setCurrency',
    #    request='CURRENCY', custom='loadgen', 
    #    plot_name = "Set Currency - Online Boutique", command_args=[])
    #stop_kubernetes(platform)
    #time.sleep(20)


    #setup_application_deployment(platform, multizonal, "OB")
    #output = platform + "online_boutique_browse_product"
    #start_benchmark(filters, platform, THREADS, QPS, RUNTIME, application="OB",
    #    output=output, no_filter=no_filter, subpath='product/6E92ZMYYFZ',
    #    request='GET', custom='loadgen',
    #    plot_name="Browse Product - Online Boutique", command_args=[])
    #stop_kubernetes(platform)

    #time.sleep(20)

    setup_application_deployment(platform, multizonal, "OB")
    output = platform + "online_boutique_view_cart"
    start_benchmark(filters, platform, THREADS, QPS, RUNTIME, application="OB",
        output=output, no_filter=no_filter, subpath='cart', request='GET',
        custom='loadgen', plot_name="View Cart - Online Boutique", command_args=[])
    stop_kubernetes(platform)

    time.sleep(20)

    setup_application_deployment(platform, multizonal, "OB")
    output = platform + "online_boutique_add_to_cart"
    start_benchmark(filters, platform, THREADS, QPS, RUNTIME, application="OB",
        output=output, no_filter=no_filter, subpath='cart',
        request='ADD_TO_CART', custom='loadgen',
        plot_name="Add to Cart - Online Boutique", command_args=[])
    stop_kubernetes(platform)
示例#2
0
def bookinfo_experiment(platform, multizonal, empty_filter, arg_no_filter, filter_dirs):
    filters = filter_dirs
    if arg_no_filter:
        filters = []
    no_filter = 'ON'
    if empty_filter:
        filters.append(EMPTY_FILTER_DIR)
    setup_application_deployment(platform, multizonal, "BK")
    output = platform + "bookinfo"
    start_benchmark(filters, platform, THREADS, QPS, RUNTIME, application = "BK",
        output_file=output, no_filter= no_filter, subpath='productpage',
        request='GET', custom='loadgen',
        command_args=[], plot_name="BookInfo")
    stop_kubernetes(platform)
def main(args):
    if args.full_run:
        result = kube_env.setup_bookinfo_deployment(args.platform,
                                                    args.multizonal)
        if result != util.EXIT_SUCCESS:
            return result
        result = kube_env.deploy_filter(args.filter_dir)
        if result != util.EXIT_SUCCESS:
            return result
    # test the fault injection on an existing deployment
    do_experiment(args.platform, args.num_experiments, args.results_dir)
    if args.full_run:
        # all done with the test, clean up
        kube_env.stop_kubernetes(args.platform)
    return util.EXIT_SUCCESS
示例#4
0
def train_ticket_experiment(multizonal, empty_filter, arg_no_filter, filter_dirs):
    filters = filter_dirs
    if arg_no_filter:
        filters = []
    no_filter = 'ON'
    if empty_filter:
        filters.append(EMPTY_FILTER_DIR)
        no_filter = 'OFF'

    #setup_application_deployment('GCP', multizonal, 'TT')
    output = "GCPtrain_ticket_home"
    start_benchmark(filters, 'GCP', THREADS, QPS, RUNTIME, application="TT",
        output=output, no_filter= no_filter, subpath='index.html',
        request='GET', custom='loadgen', command_args=[])

    time.sleep(60)
    stop_kubernetes('GCP')