def generate_test_workload(lns_id, hostname):
    from generate_sequence import write_single_name_trace,write_random_name_trace
    name = '0'
    number = exp_config.lookup_count
    filename = os.path.join(lookup_trace, 'lookup_' + hostname)
    if exp_config.regular_workload + exp_config.mobile_workload == 1:
        write_single_name_trace(filename, number, name)
    else:
        write_random_name_trace(filename,exp_config.regular_workload + exp_config.mobile_workload, number)
    
    number = exp_config.update_count
    filename = os.path.join(update_trace, 'update_' + hostname)
    if exp_config.regular_workload + exp_config.mobile_workload== 1:
        write_single_name_trace(filename, number, name)
    else:
        write_random_name_trace(filename,exp_config.regular_workload + exp_config.mobile_workload, number)
Esempio n. 2
0
def generate_trace(lns_id):

    from generate_sequence import write_single_name_trace, write_random_name_trace
    name = '0'
    number = exp_config.lookup_count
    filename = os.path.join(exp_config.trace_folder, 'lookupLocal/' + str(lns_id))
    if exp_config.regular_workload + exp_config.mobile_workload == 1:
        write_single_name_trace(filename, number, name)
    else:
        write_random_name_trace(filename, exp_config.regular_workload + exp_config.mobile_workload, number)

    number = exp_config.update_count
    filename = os.path.join(exp_config.trace_folder, 'updateLocal/' + str(lns_id))
    if exp_config.regular_workload + exp_config.mobile_workload == 1:
        write_single_name_trace(filename, number, name)
    else:
        write_random_name_trace(filename, exp_config.regular_workload + exp_config.mobile_workload, number)
Esempio n. 3
0
def generate_test_workload(lns_id, hostname):
    from generate_sequence import write_single_name_trace, write_random_name_trace
    name = '0'
    number = exp_config.lookup_count
    filename = os.path.join(lookup_trace, 'lookup_' + hostname)
    if exp_config.regular_workload + exp_config.mobile_workload == 1:
        write_single_name_trace(filename, number, name)
    else:
        write_random_name_trace(
            filename, exp_config.regular_workload + exp_config.mobile_workload,
            number)

    number = exp_config.update_count
    filename = os.path.join(update_trace, 'update_' + hostname)
    if exp_config.regular_workload + exp_config.mobile_workload == 1:
        write_single_name_trace(filename, number, name)
    else:
        write_random_name_trace(
            filename, exp_config.regular_workload + exp_config.mobile_workload,
            number)