def main(argv): data = read_data_agent_result(sys.argv[1]) grouped = groupby_globally(data, key) print template.format(**headers) for (bs, cache_tp, act, conc), curr_data in sorted(grouped.items()): iops = med_dev([i['iops'] * int(conc) for i in curr_data]) bw = med_dev([i['bw'] * int(conc) for i in curr_data]) lat = med_dev([i['lat'] / 1000 for i in curr_data]) iops = round_deviation(iops) bw = round_deviation(bw) lat = round_deviation(lat) params = dict( bs=bs, action=act, cache_tp=cache_tp, iops=iops, bw=bw, lat=lat, conc=conc ) print template.format(**params)
def main(argv): data = read_data_agent_result(sys.argv[1]) grouped = groupby_globally(data, key) print template.format(**headers) for (bs, cache_tp, act, conc), curr_data in sorted(grouped.items()): iops = med_dev([i['iops'] * int(conc) for i in curr_data]) bw = med_dev([i['bw'] * int(conc) for i in curr_data]) lat = med_dev([i['lat'] / 1000 for i in curr_data]) iops = round_deviation(iops) bw = round_deviation(bw) lat = round_deviation(lat) params = dict(bs=bs, action=act, cache_tp=cache_tp, iops=iops, bw=bw, lat=lat, conc=conc) print template.format(**params)
import sys import collections import scipy.stats as stats import matplotlib.mlab as mlab import matplotlib.pyplot as plt from data_stat import med_dev, round_deviation from data_stat import read_data_agent_result data = read_data_agent_result(sys.argv[1]) # for run in data: # for name, numbers in run['res'].items(): # # med, dev = round_deviation(med_dev(numbers['iops'])) # # print name, med, '~', dev # distr = collections.defaultdict(lambda: 0.0) # for i in numbers['iops']: # distr[i] += 1 # print name # for key, val in sorted(distr.items()): # print " ", key, val # print # # example data # mu = 100 # mean of distribution # sigma = 15 # standard deviation of distribution # x = mu + sigma * np.random.randn(10000)
import sys import collections import scipy.stats as stats import matplotlib.mlab as mlab import matplotlib.pyplot as plt from data_stat import med_dev, round_deviation from data_stat import read_data_agent_result data = read_data_agent_result(sys.argv[1]) # for run in data: # for name, numbers in run['res'].items(): # # med, dev = round_deviation(med_dev(numbers['iops'])) # # print name, med, '~', dev # distr = collections.defaultdict(lambda: 0.0) # for i in numbers['iops']: # distr[i] += 1 # print name # for key, val in sorted(distr.items()): # print " ", key, val # print # # example data # mu = 100 # mean of distribution # sigma = 15 # standard deviation of distribution # x = mu + sigma * np.random.randn(10000) x = data[0]['res'][sys.argv[2]]['iops']