df = cmn.load_parsed_results() def map_fn(strategy): return 'LB-' if strategy == 'PESS' else 'TB-' df = df[(df.isolationLevel != 'PL0') & (df.isolationLevel != 'PL1')] df['strategy'] = df['strategy'].map(map_fn) + df['isolationLevel'] # ------ throughput cmn.reset_colors_and_markers() tp = df[(df.tag1 == 'ks') & (df.tag3 == 'tp')] tp = tp.sort_values('var') fig, ax = plt.subplots() for key, group in tp.groupby('strategy'): cmn.my_plot(group, ax, kind='line', x='var', y='value', label=key) ax.set_ylim((0, 15000)) ax.margins(y=0.1) ax.set_ylabel(cmn.TP_LABEL) ax.set_xlabel('Number of keys') ax.set_xscale('log') plt.gca().invert_xaxis() cmn.savefig_with_separate_legend('ks_tp', ax, fig) # ------ latency cmn.reset_colors_and_markers() lat = df[(df.tag1 == 'ks') & (df.tag3 == 'lat')] lat = lat.sort_values('var') fig, ax = plt.subplots()
def get_xlabel(typee): return 'Number of stateful operators' if 'SINGLE' in typee else 'Number of t-graphs' # -------- Throughput cmn.reset_colors_and_markers() tp = df[df.tplat == 'tp'].sort_values('var') i = 0 for typee, group in tp.groupby('type'): fig, ax = plt.subplots() for strategy, grp in group.groupby('strategy'): cmn.my_plot(grp, ax, kind='line', x='var', y='value', label=strategy) ax.set_ylim((0, 15000)) ax.margins(y=0.1) ax.set_xticks(range(1, 6)) ax.set_ylabel(cmn.TP_LABEL) ax.set_xlabel(get_xlabel(typee)) i += 1 cmn.savefig_with_separate_legend('topologies_' + typee.lower() + '_tp', ax, fig) # -------- Latency cmn.reset_colors_and_markers()
import pandas as pd import matplotlib.pyplot as plt # ------------ MAIN ------------ if __name__ == '__main__': df = cmn.load_parsed_results() df = df[df['tag1'] == 'scale'] df['tplat'] = df['tag3'] # -------- Throughput cmn.reset_colors_and_markers() tp = df[df.tplat == 'tp'].sort_values('var') fig, ax = plt.subplots() cmn.my_plot(tp, ax, kind='line', x='var', y='value', legend=False) ax.set_ylim((0, 15000)) ax.margins(y=0.1) ax.set_ylabel(cmn.TP_LABEL) ax.set_xlabel('Graph parallelism') cmn.savefig('scalability_tp', fig) # -------- Latency cmn.reset_colors_and_markers() lat = df[df.tplat == 'lat'].sort_values('var') fig, ax = plt.subplots() cmn.my_plot(lat, ax, kind='line', x='var', y='value', legend=False)
accs['recovery-time-at-source']['mean'])) data = dict(replayed=x, at_state=at_state, at_source=at_source) df = pd.DataFrame(data=data).sort_values('replayed') cmn.reset_colors_and_markers() fig, ax = plt.subplots() formatter = FuncFormatter(lambda x, pos: int(x / 1000)) ax.yaxis.set_major_formatter(formatter) ax.xaxis.set_major_formatter(formatter) cmn.my_plot(df, ax, kind='line', x='replayed', y='at_state', label='stateful operator', yformatter=False) cmn.my_plot(df, ax, kind='line', x='replayed', y='at_source', label='open operator', yformatter=False) ax.set_ylim((0, 33000)) ax.margins(y=0.1) ax.set_ylabel('Replay time [s]') ax.set_xlabel('Number of entries in the WAL (thousands)')
pd.concat([ pd.Series(name), group.lat.describe().rename(name), ]) for name, group in grouped) lat.rename(columns={lat.columns[0]: 'var', 'mean': 'value'}, inplace=True) #print tp #print lat #sys.exit(1) # ------ throughput cmn.reset_colors_and_markers() fig, ax = plt.subplots() #for key, group in df.groupby('percentage'): # cmn.my_plot(group, ax, kind='line', x='percentage', y='tp', label=key) cmn.my_plot(tp, ax, kind='line', x='var', y='value') #ax.set_ylim((0, 80000)) ax.set_xlim((-10, 110)) ax.margins(y=0.1) ax.set_ylabel("Average throughput [Ktxn/s]") ax.set_xlabel('Single partition transactions percentage') ax.set_yscale('log') #plt.gca().invert_yaxis() ax.get_legend().remove() cmn.savefig('volt_tp', fig) # ------ latency cmn.reset_colors_and_markers() fig, ax = plt.subplots()