Example #1
0
input_folder = './stat/2016-03-07-092625/'
output_folder = './figures/final_tpcc_retry/'
bench_type = 'tpcc'
dict1 = {
    'title': '10% new-order, 80% payment, 10% order-status',
    'no_title': True,
    'x_labels': False,
    'y_labels': False,
    'y_lim': 9000,
    'legend_type': 'warehouse',
    'draw_line': 2,
    'line_name': 'max'
}
series1 = get_matching_series([input_folder, 'tpcc', 7, 10, 6])
print(series1)
plot_multi_lines(input_folder, output_folder, bench_type, series1, 6, dict1)

dict3 = {
    'title': '80% new-order, 10% payment, 10% order-status',
    'no_title': True,
    'x_labels': False,
    'y_labels': False,
    'y_lim': 4000,
    'legend_type': 'warehouse',
    'draw_line': 2,
    'line_name': 'max'
}
series3 = get_matching_series([input_folder, 'tpcc', 8, 10, 6])
print(series3)
plot_multi_lines(input_folder, output_folder, bench_type, series3, 6, dict3)
import matplotlib.gridspec as gridspec
from os.path import basename
import numpy as np
from time import gmtime, strftime
from plot_line import plot_multi_lines
from helper import get_matching_series

gs1 = gridspec.GridSpec(3, 3)
gs1.update(wspace=0.025, hspace=0.05)

input_folder='./stat/2016-02-01-115146/'
output_folder='./figures/2016-02-01-0518434_10_11_1/'
bench_type='micro'
dict1={'title':'Low contention', 'x_labels':False, 'y_labels':'Throughput (tps)', 'y_lim':2100, 'legend_type':'process'}
series1=get_matching_series(['./stat/2016-02-01-115146/', 'micro', 1, 4, 10, 12, 1000000, 3, 11])
plot_multi_lines(input_folder, output_folder, bench_type, series1, 11, dict1)

series2=get_matching_series(['./stat/2016-02-01-115146/','micro', 1, 4, 10, 12, 100000, 3, 11])
dict2={'title':'Medium contention', 'x_labels':False, 'y_labels':False, 'y_lim':2100, 'legend_type':'process'}
plot_multi_lines(input_folder, output_folder, bench_type, series2, 11, dict2)

series3=get_matching_series(['./stat/2016-02-01-115146/','micro',1,4,10,12,20000,3,11])
dict3={'title':'High contention', 'x_labels':False, 'y_labels':False, 'y_lim':2100, 'legend_type':'process'}
plt.subplot(gs1[2])
plot_multi_lines(input_folder, output_folder, bench_type, series3, 11, dict3)

series4=get_matching_series(['./stat/2016-02-01-115146/','micro',4,10,11,1000000,3,0,1])
dict4={'title':'Low contention', 'x_labels':False, 'y_labels':'Throughput (tps)', 'y_lim':2100, 'legend_type':'locality', 'no_title':True}
plt.subplot(gs1[3])
plot_multi_lines(input_folder, output_folder, bench_type, series4, 1, dict4) 
Example #3
0
from os.path import basename
import numpy as np
from time import gmtime, strftime
from plot_line import plot_multi_lines
from helper import * 

#input_folder='./stat/2016-03-06-232257/'
input_folder='./stat/2016-03-08-023721/'
output_folder='./figures/final_micro/'
bench_type='micro'
dict1={'title':'Low local contention, low remote contention', 'big':True, 'no_title':True, 'x_labels':False, 'y_labels':'Transactions per second', 'y_lim':5000, 'legend_type':'read'}
series1=get_matching_series([input_folder, 'micro', 1, 2, 4, 6, 7, 80, 20, 20000, 40000, 'true', 9])
[base_serie1]=get_matching_serie([input_folder, 'micro', 1, 2, 4, 6, 7, 80, 20, 20000, 40000, 'false'])
series1 = [[base_serie1]+s  for s in series1]
print(series1)
plot_multi_lines(input_folder, output_folder, bench_type, series1, 9, dict1)

dict2={'title':'Low local contention, high remote contention','big':True, 'no_title':True, 'x_labels':False, 'y_axis':False, 'y_labels':False, 'y_lim':5000, 'legend_type':'read'}
series2=get_matching_series([input_folder, 'micro', 1, 2, 4, 6, 7, 80, 20, 20000, 2000, 'true', 9])
[base_serie2]=get_matching_serie([input_folder, 'micro', 1, 2, 4, 6, 7, 80, 20, 20000, 2000, 'false'])
series2 = [[base_serie2]+s  for s in series2]
plot_multi_lines(input_folder, output_folder, bench_type, series2, 9, dict2)

dict3={'title':'High local contention, low remote contention','big':True, 'no_title':True, 'x_labels':False, 'y_labels':'Transactions per second', 'y_lim':5000, 'legend_type':'read'}
series3=get_matching_series([input_folder, 'micro', 1, 2, 4, 6, 7, 80, 20, 1000, 40000, 'true', 9])
[base_serie3]=get_matching_serie([input_folder, 'micro', 1, 2, 4, 6, 7, 80, 20, 1000, 40000, 'false'])
series3 = [[base_serie3]+s  for s in series3]
plot_multi_lines(input_folder, output_folder, bench_type, series3, 9, dict3)

dict4={'title':'High local contention, high remote contention','big':True, 'no_title':True, 'x_labels':False, 'y_labels':False, 'y_axis':False, 'y_lim':5000, 'legend_type':'read'}
series4=get_matching_series([input_folder, 'micro', 1, 2, 4, 6, 7, 80, 20, 1000, 2000, 'true', 9])
value_begin = field_end
value_end = value_begin + field_len
diff_fields = sys.argv[3:field_end]
field_values = sys.argv[value_begin:value_end]
rotate_field = sys.argv[value_end]
diff_fields.append(rotate_field)
title = sys.argv[value_end + 1]
legend_text = sys.argv[value_end + 2]

to_plot_list = get_matching_series(sys.argv[1:-2])

d = {
    'legend_type': legend_text,
    'title': title,
    'y_labels': 'Throughput (tps)',
    'x_labels': 'Speculation length',
    'y_lim': False
}
plot_multi_lines(input_folder, th_folder, bench_type, to_plot_list,
                 rotate_field, d)

#os.system('./dataScript/plot_line.py %s %s %s %s' % (input_folder, th_folder, bench_type, to_plot_list))

#' '.join(map(str, flist))))
#str_series = ' '.join(map(str, series))
#for config in series:
#    print(config)
#    config_path = os.path.join(input_folder, config)
#    print(config_path)
#    os.system('./dataScript/plot_node_lat.py %s %s' % (config_path+'/', output_folder))