def run_tickets(log): nexp = 0 containers = swarm.containers_str() main_class = 'ipa.apps.TicketSleuth' for trial in range(1, opt.target+1): if not opt.dry: print '---------------------------------\n# starting trial', trial elif opt.dry and trial > 1: # only need to do one 'trial' to get all the counts if doing dry run continue for a in cartesian( ipa_version = [version], ipa_output_json = ['true'], ipa_reset = ['false'], ipa_duration = [60], ipa_zipf = ['0.6'], ipa_concurrent_requests = [128, 512, 2*K, 4*K], ipa_bound = ['consistency:strong', 'consistency:weakwrite', 'tolerance:0.1', 'tolerance:0.05', 'tolerance:0.01', 'latency:20ms'], ipa_lease_period = ['200ms'], ipa_reservations_lease = ['10s'], # honeycomb_mode = ['normal', 'slowpoke_flat', 'google', 'amazon', 'flat5'] honeycomb_mode = ['fast', 'flat5', 'slowpoke_flat', 'google', 'amazon'] ): a['containers'] = containers if 'strong' in a['ipa_bound']: a['ipa_consistency'] = 'strong' a['ipa_lease_period'] = '0ms' elif re.search('weak|tol|lat', a['ipa_bound']): a['ipa_consistency'] = 'weak' ct = count_records(table, ignore=['containers'], valid='out_actual_time_length is not null', **a) puts(colored.black("→ ")+colored.cyan('count:')+colored.yellow(ct)) if opt.dry: continue if ct < trial: run(log, *['-main', main_class] , **a) nexp += 1 return nexp
def run_rawmix(log, datatype): nexp = 0 containers = swarm.containers_str() mixes = { 'set': { 'no_size': RawMix(add=0.2, contains=0.8, size=0.0), 'default': RawMix(add=0.3, contains=0.6, size=0.1) }, 'counter': { 'no_size': RawMixCounter(read=0.8, incr=0.2), 'default': RawMixCounter(read=0.8, incr=0.2), 'read_heavy': RawMixCounter(read=0.99, incr=0.01) } } main_class = 'ipa.apps.RawMix' if datatype == 'counter': main_class = 'ipa.apps.RawMixCounter' for trial in range(1, opt.target+1): if not opt.dry: print '---------------------------------\n# starting trial', trial elif opt.dry and trial > 1: # only need to do one 'trial' to get all the counts if doing dry run continue for a in cartesian( datatype = [datatype], ipa_version = [version], ipa_output_json = ['true'], ipa_reset = ['false'], ipa_duration = [60], ipa_zipf = ['0.6'], ipa_concurrent_requests = [128, 4*K], #[128, 512, 2*K], # ipa_bound = ['tolerance:0.1', 'tolerance:0.05', 'tolerance:0.01', 'consistency:strong', 'consistency:weakwrite', 'latency:50ms', 'latency:20ms', 'latency:10ms'], ipa_bound = ['consistency:weakwrite'], # ipa_bound = ['tolerance:0.1', 'tolerance:0.05', 'tolerance:0.01', 'tolerance:0'], ipa_lease_period = ['0ms'], #'200ms'], ipa_reservations_lease = ['10s'], # ipa_bound = ['consistency:strong', 'consistency:weak', 'latency:50ms', 'latency:10ms'], honeycomb_mode = ['fast', 'flat5', 'slowpoke_flat', 'amazon'], # honeycomb_mode = ['amazon'], mix = ['default'], #, 'read_heavy'] # ipa_rawmix_nsets=[10], # ipa_rawmix_target=[1000], # ipa_zipf = ['0'], # ipa_bound = ['consistency:weakwrite', 'tolerance:0.1', 'tolerance:0.01', 'consistency:strong'], # mix = ['custom'], ipa_rawmix_counter_mix_incr=[1.0, 0.5, 0.1, 0.01] ): a['containers'] = containers if a['honeycomb_mode'] == 'fast': a['ipa_concurrent_requests'] = 4*K elif a['honeycomb_mode'] == 'slowpoke_flat': a['ipa_concurrent_requests'] = 512 elif a['honeycomb_mode'] == 'amazon': a['ipa_concurrent_requests'] = 2*K if a['mix'] == 'custom': a['ipa_rawmix_counter_mix_read'] = 1.0 - a['ipa_rawmix_counter_mix_incr'] else: mixes[datatype][a['mix']].merge_into(a) ct = count_records(table, ignore=['containers'], valid='out_actual_time_length is not null', **a) puts(colored.black("→ ")+colored.cyan('count:')+colored.yellow(ct)) if opt.dry: continue if ct < trial: run(log, *['-main', main_class] , **a) nexp += 1 return nexp
def run_retwis(): containers = swarm.containers_str() nexp = 0 for trial in range(1, opt.target+1): if not opt.dry: print '---------------------------------\n# starting trial', trial elif opt.dry and trial > 1: # only need to do one 'trial' to get all the counts if doing dry run continue for a in cartesian( ipa_version = [version], ipa_output_json = ['true'], ipa_reset = ['false'], ipa_retwis_generate = ['true'], ipa_duration = [60], ipa_zipf = ['0.6'], ipa_retwis_initial_users = [100], ipa_retwis_initial_tweets = [10], ipa_concurrent_requests = [128, 512, 2*K, 4*K], ipa_lease_period = ['20ms'], ipa_reservations_lease = ['10s'], # ipa_consistency = ['strong', 'weak'], # ipa_bound = ['consistency:strong', 'consistency:weakwrite'], ipa_bound = ['tolerance:0.05', 'latency:20ms'], honeycomb_mode = ['fast', 'flat5', 'slowpoke_flat', 'amazon'] ): if a['honeycomb_mode'] == 'fast' and a['ipa_concurrent_requests'] != 4096: pass elif a['honeycomb_mode'] == 'slowpoke_flat' and a['ipa_concurrent_requests'] != 512: pass elif a['honeycomb_mode'] == 'amazon' and a['ipa_concurrent_requests'] != 2048: pass a['containers'] = containers if 'strong' in a['ipa_bound']: a['ipa_consistency'] = 'strong' a['ipa_lease_period'] = '0ms' elif re.search('weak|tol|lat', a['ipa_bound']): a['ipa_consistency'] = 'weak' ct = count_records(table, ignore=['containers'], valid='out_actual_time_length is not null', **a) puts(colored.black("→ ")+colored.cyan('count:')+colored.yellow(ct)) if opt.dry: continue if ct < trial: run(log, *['-main', 'owl.All'] , **a) nexp += 1 return nexp