Skip to content

Commit

Permalink
Added a number of scripts for running multitier anticaching as well
Browse files Browse the repository at this point in the history
as plotting results.
  • Loading branch information
mjgiardino committed Jul 9, 2015
1 parent a30f69c commit bbf96f4
Show file tree
Hide file tree
Showing 9 changed files with 2,355 additions and 67 deletions.
745 changes: 745 additions & 0 deletions graphs/average-throughput-articles.py

Large diffs are not rendered by default.

90 changes: 46 additions & 44 deletions graphs/average-throughput.py
Expand Up @@ -339,61 +339,61 @@ def draw_throughput_sync_tuple_vs_block(dict, out_path):
# res2_max.append(np.max(dict[tp]) - mean)
# print tp
# print np.mean(dict[tp])
for s in skew:
for tp in dict:
if tp.find(s + '-') > 0 and tp.find("-10c-") > 0 and tp.find("tuple") > 0 and tp.find("sync") > 0:
#if tp.find(s + '-') > 0 and tp.find("aseline") > 0 and tp.find("BERKELEY") > 0:
res3.append(np.mean(dict[tp]))
mean = np.mean(dict[tp])
res3_min.append(mean - np.min(dict[tp]))
res3_max.append(np.max(dict[tp]) - mean)
print tp
print np.mean(dict[tp])

for s in skew:
for tp in dict:
#if tp.find(s + '-') > 0 and tp.find("aseline") > 0 and tp.find("NVM") > 0:
if tp.find(s + '-') > 0 and tp.find("-10c-") > 0 and tp.find("block") > 0 and tp.find("sync") > 0:
res4.append(np.mean(dict[tp]))
mean = np.mean(dict[tp])
res4_min.append(mean - np.min(dict[tp]))
res4_max.append(np.max(dict[tp]) - mean)
print tp
print np.mean(dict[tp])

# for s in skew:
# for tp in dict:
# if tp.find(s + '-') > 0 and tp.find("-50c-") > 0 and tp.find("tuple") > 0 and tp.find("sync") > 0:
# if tp.find(s + '-') > 0 and tp.find("-10c-") > 0 and tp.find("tuple") > 0 and tp.find("sync") > 0:
#if tp.find(s + '-') > 0 and tp.find("aseline") > 0 and tp.find("BERKELEY") > 0:
# res5.append(np.mean(dict[tp]))
# res3.append(np.mean(dict[tp]))
# mean = np.mean(dict[tp])
# res5_min.append(mean - np.min(dict[tp]))
# res5_max.append(np.max(dict[tp]) - mean)
# res3_min.append(mean - np.min(dict[tp]))
# res3_max.append(np.max(dict[tp]) - mean)
# print tp
# print np.mean(dict[tp])

# for s in skew:
# for tp in dict:
# #if tp.find(s + '-') > 0 and tp.find("aseline") > 0 and tp.find("NVM") > 0:
# if tp.find(s + '-') > 0 and tp.find("-50c-") > 0 and tp.find("block") > 0 and tp.find("sync") > 0:
# res6.append(np.mean(dict[tp]))
#if tp.find(s + '-') > 0 and tp.find("aseline") > 0 and tp.find("NVM") > 0:
# if tp.find(s + '-') > 0 and tp.find("-10c-") > 0 and tp.find("block") > 0 and tp.find("sync") > 0:
# res4.append(np.mean(dict[tp]))
# mean = np.mean(dict[tp])
# res6_min.append(mean - np.min(dict[tp]))
# res6_max.append(np.max(dict[tp]) - mean)
# res4_min.append(mean - np.min(dict[tp]))
# res4_max.append(np.max(dict[tp]) - mean)
# print tp
# print np.mean(dict[tp])

for s in skew:
for tp in dict:
if tp.find(s + '-') > 0 and tp.find("-50c-") > 0 and tp.find("tuple") > 0 and tp.find("sync") > 0:
#if tp.find(s + '-') > 0 and tp.find("aseline") > 0 and tp.find("BERKELEY") > 0:
res5.append(np.mean(dict[tp]))
mean = np.mean(dict[tp])
res5_min.append(mean - np.min(dict[tp]))
res5_max.append(np.max(dict[tp]) - mean)
print tp
print np.mean(dict[tp])

for s in skew:
for tp in dict:
#if tp.find(s + '-') > 0 and tp.find("aseline") > 0 and tp.find("NVM") > 0:
if tp.find(s + '-') > 0 and tp.find("-50c-") > 0 and tp.find("block") > 0 and tp.find("sync") > 0:
res6.append(np.mean(dict[tp]))
mean = np.mean(dict[tp])
res6_min.append(mean - np.min(dict[tp]))
res6_max.append(np.max(dict[tp]) - mean)
print tp
print np.mean(dict[tp])


x = [0.5,1.5,2.5,3.5,4.5]
# print res1
# print res2
print res3
print res4
# print res3
# print res4
# print res5
# print res6

tmp1 = max(res3)
tmp2 = max(res4)
tmp1 = max(res5)
tmp2 = max(res6)
tmp = max(tmp1, tmp2)
print tmp
order = 1
Expand All @@ -405,18 +405,20 @@ def draw_throughput_sync_tuple_vs_block(dict, out_path):

print y_max_range

print res5
print res6
# ax.bar( [i-0.3 for i in x] ,res1,width=0.1,label='1c tuple',hatch='\\\\\\',color='#0000CC')
# ax.errorbar([i-0.25 for i in x], res1, yerr = [res1_min, res1_max], fmt='o')
# ax.bar( [i-0.2 for i in x],res2,width=0.1,label='1c block',hatch='///',color='#FF0000')
# ax.errorbar([i-0.15 for i in x], res2, yerr = [res2_min, res2_max], fmt='o')
ax.bar( [i-0.2 for i in x] ,res3,width=0.2,label='10c tuple',hatch='+++',color='#8080E6')
ax.errorbar([i-0.1 for i in x], res3, yerr = [res3_min, res3_max], fmt='o')
ax.bar( [i for i in x],res4,width=0.2,label='10c block',hatch='XXX',color='#FF8080')
ax.errorbar([i+0.1 for i in x], res4, yerr = [res4_min, res4_max], fmt='o')
# ax.bar( [i+0.1 for i in x] ,res5,width=0.1,label='50c tuple',hatch='---',color='#CCCCF5')
# ax.errorbar([i+0.15 for i in x], res5, yerr = [res5_min, res5_max], fmt='o')
# ax.bar( [i+0.2 for i in x],res6,width=0.1,label='50c block',hatch='...',color='#FFC0C0')
# ax.errorbar([i+0.25 for i in x], res6, yerr = [res6_min, res6_max], fmt='o')
# ax.bar( [i-0.2 for i in x] ,res3,width=0.2,label='10c tuple',hatch='+++',color='#8080E6')
# ax.errorbar([i-0.1 for i in x], res3, yerr = [res3_min, res3_max], fmt='o')
# ax.bar( [i for i in x],res4,width=0.2,label='10c block',hatch='XXX',color='#FF8080')
# ax.errorbar([i+0.1 for i in x], res4, yerr = [res4_min, res4_max], fmt='o')
ax.bar( [i+0.1 for i in x] ,res5,width=0.1,label='50c tuple',hatch='---',color='#CCCCF5')
ax.errorbar([i+0.15 for i in x], res5, yerr = [res5_min, res5_max], fmt='o')
ax.bar( [i+0.2 for i in x],res6,width=0.1,label='50c block',hatch='...',color='#FFC0C0')
ax.errorbar([i+0.25 for i in x], res6, yerr = [res6_min, res6_max], fmt='o')
ax.set_ylabel("Transactions per second",fontsize=16,weight='bold')
#ax.legend(loc='center left', bbox_to_anchor=(1, 0.5))
lgd = ax.legend(loc=3, bbox_to_anchor=(0.,1, 1, .1),mode="expand", ncol=3)
Expand Down Expand Up @@ -708,7 +710,7 @@ def draw_throughput_graph_INF(dict, out_path):

#draw_throughput_graph_INF(dict, "ycsb-INF.pdf")
#draw_throughput_graph(dict, "ycsb-T500-NoLoop-blocking-vs-nonblocking-6.pdf")
draw_throughput_sync_tuple_vs_block(dict, "ycsb-1-tier-1p-sync-tuple-vs-block.pdf");
draw_throughput_sync_tuple_vs_block(dict, "ycsb-1-tier-1p-50c-sync-tuple-vs-block.pdf");

dict = {}
matches = []
Expand Down

0 comments on commit bbf96f4

Please sign in to comment.