In [103]:
from util import Analyser
LOG_PATH_ROOT="./"
analyser = Analyser(LOG_PATH_ROOT + "logMain.log")
In [104]:
print(analyser.get_repetitions())
CPU: Intel i7 4.2ghz
CPU Kerne: 6
RAM: 8GB
In [105]:
benchmark = analyser.get_row_benchmark()
benchmark.print_stats()
In [106]:
benchmark = analyser.get_column_benchmark()
benchmark.print_stats()
In [107]:
from util import Comparison
import re
column_benchmark = analyser.get_column_benchmark()
row_benchmark = analyser.get_row_benchmark()
comparison = Comparison(column_benchmark, row_benchmark)
comparison.set_title("Comparison Row- vs. Column Store")
comparison.compare_visually()
In [108]:
comparison.set_title("Comparison Row- vs. Column Store in usec")
comparison.compare_raw()
In [109]:
comparison.compare()
In [110]:
comparison.set_title("Comparison Row- vs. Column Store in msec")
comparison.compare(lambda x: x / 1000)
In [111]:
column_benchmark.set_prefix("column")
row_benchmark.set_prefix("row")
query_stats = column_benchmark.get_query_stats(lambda x: not re.search("\\.", x))
query_stats += row_benchmark.get_query_stats(lambda x: not re.search("\\.", x))
comparison = Comparison(*query_stats)
comparison.set_title("Query Groups - Column vs. Row")
comparison.compare_visually()
In [112]:
comparison.set_title("Query Groups - Column vs. Row in msec")
comparison.compare(lambda x: round(x / 1000, 1))
In [113]:
comparison.set_title("Normalized Query Groups - Column vs. Row")
comparison.compare()
In [114]:
row_benchmark = analyser.get_row_benchmark()
query_stats = row_benchmark.get_query_stats(lambda x: not re.search("\\.", x))
comparison = Comparison(row_benchmark,*query_stats)
comparison.compare_raw()
In [115]:
column_benchmark = analyser.get_column_benchmark()
row_benchmark = analyser.get_row_benchmark()
row_query_stats = row_benchmark.get_query_stats(lambda x: not re.search("\\.", x))
row_comparison = Comparison(*row_query_stats, name="Row Store")
column_query_stats = column_benchmark.get_query_stats(lambda x: not re.search("\\.", x))
column_comparison = Comparison(*column_query_stats, name="Column Store")
row_comparison.set_title("Queries - Row vs. Column in msec")
row_comparison.compare_with(column_comparison, "Average")
In [116]:
column_benchmark = analyser.get_column_benchmark()
row_benchmark = analyser.get_row_benchmark()
row_query_stats = row_benchmark.get_query_stats(lambda x: re.search("\\.", x))
row_comparison = Comparison(*row_query_stats, name="Row Store")
column_query_stats = column_benchmark.get_query_stats(lambda x: re.search("\\.", x))
column_comparison = Comparison(*column_query_stats, name="Column Store")
row_comparison.set_title("Queries - Row vs. Column in msec")
row_comparison.compare_with(column_comparison, "Average",
f=lambda x: round(x / 1000, 2),
ignore=lambda x: x == "in %")
In [117]:
from matplotlib import pyplot as plt, mlab
benchmark = analyser.get_column_benchmark()
plt.plot(benchmark.get_times())
plt.show()
In [118]:
benchmark = analyser.get_row_benchmark()
plt.plot(benchmark.get_times())
plt.show()
In [119]:
from util import display_table
import re
benchmark = analyser.get_column_benchmark()
query_stats = benchmark.get_query_stats(lambda x: not re.search("\\.", x))
comparison = Comparison(*query_stats)
comparison.set_title("Query Group Duration - Column Store")
comparison.compare_visually()
In [120]:
query_stats = benchmark.get_query_stats()
comparison = Comparison(*query_stats)
comparison.set_title("Queries Duration - Column Store")
comparison.compare_visually()
In [121]:
comparison.set_title("Queries Duration in usec - Column Store")
comparison.compare_raw()
In [122]:
comparison.set_title("Normalized Queries Duration - Column Store")
comparison.compare()
In [123]:
query_stats = benchmark.get_query_stats(lambda x: re.search("[13]\\.", x))
comparison = Comparison(*query_stats)
comparison.set_title("Q1, Q3 Queries Duration - Column Store")
comparison.compare_visually()
In [124]:
comparison.set_title("Q1, Q3 Queries Duration in usec - Column Store")
comparison.compare_raw()
In [125]:
comparison.set_title("Normalized Q1, Q3 Queries Duration - Column Store")
comparison.compare()
In [126]:
query_stats = benchmark.get_query_stats(lambda x: re.search("1\\.", x))
comparison = Comparison(*query_stats)
comparison.set_title("Q1 Queries Duration - Column Store")
comparison.compare_visually()
In [127]:
comparison.set_title("Q1 Queries Duration in usec - Column Store")
comparison.compare_raw()
In [128]:
comparison.set_title("Normalized Q1 Queries Duration - Column Store")
comparison.compare()
In [129]:
query_stats = benchmark.get_query_stats(lambda x: re.search("3\\.", x))
comparison = Comparison(*query_stats)
comparison.set_title("Q3 Queries Duration - Column Store")
comparison.compare_visually()
In [130]:
comparison.set_title("Q3 Queries Duration in usec - Column Store")
comparison.compare_raw()
In [131]:
comparison.set_title("Normalized Q3 Queries Duration - Column Store")
comparison.compare()
In [132]:
benchmark = analyser.get_row_benchmark()
query_stats = benchmark.get_query_stats(lambda x: not re.search("\\.", x))
comparison = Comparison(*query_stats)
comparison.set_title("Query Group Duration - Row Store")
comparison.compare_visually()
In [133]:
query_stats = benchmark.get_query_stats()
comparison = Comparison(*query_stats)
comparison.set_title("Queries Duration - Row Store")
comparison.compare_visually()
In [134]:
comparison.set_title("Queries Duration in usec - Row Store")
comparison.compare_raw()
In [135]:
comparison.set_title("Normalized Queries Duration - Row Store")
comparison.compare()
In [136]:
query_stats = benchmark.get_query_stats(lambda x: re.search("[13]\\.", x))
comparison = Comparison(*query_stats)
comparison.set_title("Q1, Q3 Queries Duration - Row Store")
comparison.compare_visually()
In [137]:
comparison.set_title("Q1, Q3 Queries Duration in usec - Row Store")
comparison.compare_raw()
In [138]:
comparison.set_title("Normalized Q1, Q3 Queries Duration - Row Store")
comparison.compare()
In [139]:
query_stats = benchmark.get_query_stats(lambda x: re.search("3\\.", x))
comparison = Comparison(*query_stats)
comparison.set_title("Q3 Queries Duration - Row Store")
comparison.compare_visually()
In [140]:
comparison.set_title("Q3 Queries Duration in usec - Row Store")
comparison.compare_raw()
In [141]:
comparison.set_title("Normalized Q3 Queries Duration - Column Store")
comparison.compare()
In [142]:
query_stats = benchmark.get_query_stats(lambda x: re.search("1\\.", x))
comparison = Comparison(*query_stats)
comparison.set_title("Q1 Queries Duration - Row Store")
comparison.compare_visually()
In [143]:
comparison.set_title("Q1 Queries Duration in usec - Row Store")
comparison.compare_raw()
In [144]:
comparison.set_title("Normalized Q1 Queries Duration - Column Store")
comparison.compare()
In [145]:
column_benchmark = analyser.get_column_benchmark()
index_column_benchmark = analyser.get_column_benchmark_I()
row_benchmark = analyser.get_row_benchmark()
index_row_benchmark = analyser.get_row_benchmark_I()
comparison = Comparison(column_benchmark, index_column_benchmark, row_benchmark, index_row_benchmark)
comparison.compare_raw()
In [146]:
comparison.compare()
In [147]:
column_benchmark = analyser.get_column_benchmark()
index_column_benchmark = analyser.get_column_benchmark_I()
comparison = Comparison(column_benchmark, index_column_benchmark)
comparison.set_title("Comparison of Indices - Column Store")
comparison.compare_visually()
In [148]:
comparison.set_title("Comparison of Indices in usec - Column Store")
comparison.compare_raw()
In [149]:
from util import Analyser
LOG_PATH_ROOT="./"
analyser2 = Analyser(LOG_PATH_ROOT + "logOlap.log")
column_benchmark = analyser2.get_column_benchmark()
index_column_benchmark = analyser2.get_column_benchmark_I()
column_benchmark_o = analyser2.get_column_benchmark_olap()
index_column_benchmark_o = analyser2.get_column_benchmark_I_olap()
query_stats_no = column_benchmark.get_query_stats(lambda x: re.search("1\\.2", x))
query_stats = index_column_benchmark.get_query_stats(lambda x: re.search("1\\.2", x))
query_stats_no_olap = column_benchmark_o.get_query_stats(lambda x: re.search("1\\.2", x))
query_stats_olap = index_column_benchmark_o.get_query_stats(lambda x: re.search("1\\.2", x))
comparison = Comparison(*query_stats_no)
comparison.set_title("No index, no OLAP")
comparison.compare_raw()
comparison2 = Comparison(*query_stats)
comparison2.set_title("Index, no OLAP")
comparison2.compare_raw()
comparison3 = Comparison(*query_stats_no_olap)
comparison3.set_title("No index, OLAP")
comparison3.compare_raw()
comparison4 = Comparison(*query_stats_olap)
comparison4.set_title("Index, OLAP")
comparison4.compare_raw()
In [150]:
comparison = Comparison(index_column_benchmark,column_benchmark, column_benchmark_o, index_column_benchmark_o)
comparison.compare_raw()
In [166]:
from util import Analyser
LOG_PATH_ROOT="./"
analyser = Analyser(LOG_PATH_ROOT + "logMain.log")
r_b = analyser.get_row_benchmark()
i_r_b = analyser.get_row_benchmark_I()
col_b = analyser.get_column_benchmark()
i_col_b = analyser.get_column_benchmark_I()
comparison = Comparison(r_b, i_r_b)
comparison.set_title("Comparison of Indices - Row Store")
comparison.compare_visually()
In [172]:
comparison.set_title("Comparison of Indices in msec - Row Store")
comparison.compare_raw()
q = r_b.get_query_stats(lambda x: not re.search("\\.", x))
q_i = i_r_b.get_query_stats(lambda x: not re.search("\\.", x))
q2 = r_b.get_query_stats(lambda x: re.search("2\\.", x))
q_i2 = i_r_b.get_query_stats(lambda x: re.search("2\\.", x))
q4 = r_b.get_query_stats(lambda x: re.search("4\\.", x))
q_i4 = i_r_b.get_query_stats(lambda x: re.search("4\\.", x))
compQ = Comparison(*q)
compQ.set_title("Queries without indizes")
compQi = Comparison(*q_i)
compQi.set_title("Queries with indizes")
compQ2 = Comparison(*q2)
compQ2.set_title("Query 2 without indizes")
compQi2 = Comparison(*q_i2)
compQi2.set_title("Query 2 with indizes")
compQ4 = Comparison(*q4)
compQ4.set_title("Query 4 without indizes")
compQi4 = Comparison(*q_i4)
compQi4.set_title("Query 4 with indizes")
compQ.compare_raw()
compQi.compare_raw()
compQ2.compare_raw()
compQi2.compare_raw()
compQ4.compare_raw()
compQi4.compare_raw()
compCol.set_title("Comparison of Indices - Column Store") compCol.compare_visually() compCol.compare_raw()
q = col_b.get_query_stats(lambda x: not re.search("\.", x)) q_i = i_col_b.get_query_stats(lambda x: not re.search("\.", x))
q2 = col_b.get_query_stats(lambda x: re.search("2\.", x)) q_i2 = i_col_b.get_query_stats(lambda x: re.search("2\.", x))
q4 = col_b.get_query_stats(lambda x: re.search("4\.", x)) q_i4 = i_col_b.get_query_stats(lambda x: re.search("4\.", x))
compQ = Comparison(q) compQ.set_title("Queries without indizes") compQi = Comparison(q_i) compQi.set_title("Queries with indizes")
compQ2 = Comparison(q2) compQ2.set_title("Query 2 without indizes") compQi2 = Comparison(q_i2) compQi2.set_title("Query 2 with indizes")
compQ4 = Comparison(q4) compQ4.set_title("Query 4 without indizes") compQi4 = Comparison(q_i4) compQi4.set_title("Query 4 with indizes")
compQ.compare_raw() compQi.compare_raw()
compQ2.compare_raw() compQi2.compare_raw()
compQ4.compare_raw() compQi4.compare_raw()
In [ ]:
a6 = Analyser(LOG_PATH_ROOT + "12gb6cores.log")
a4 = Analyser(LOG_PATH_ROOT + "i7-4core.log")
a2 = Analyser(LOG_PATH_ROOT + "i7-2core.log")
aGb12 = Analyser(LOG_PATH_ROOT + "12gb6cores.log")
aGb8 = Analyser(LOG_PATH_ROOT + "8gb6cores.log")
aGb6 = Analyser(LOG_PATH_ROOT + "6gb6cores.log")
In [ ]:
b6 = a6.get_column_benchmark()
b4 = a4.get_column_benchmark()
b2 = a2.get_column_benchmark()
b6.set_name("6 cores")
b4.set_name("4 cores")
b2.set_name("2 cores")
comparison = Comparison(b2, b4, b6)
comparison.set_title("Comparison of CPUs - Column Store")
comparison.compare_visually()
In [ ]:
comparison.set_title("Comparison of CPUs in usec - Column Store")
comparison.compare_raw()
In [ ]:
comparison.set_title("Normalized Comparison of CPUs - Column Store")
comparison.compare()
In [ ]:
b12 = aGb12.get_column_benchmark()
b8 = aGb8.get_column_benchmark()
b6 = aGb6.get_column_benchmark()
b12.set_name("12 Gb")
b8.set_name("8 Gb")
b6.set_name("6 Gb")
comparison = Comparison(b6, b8, b12)
comparison.set_title("Comparison of RAM - Column Store")
comparison.compare_visually()
In [ ]:
comparison.set_title("Comparison of RAM in usec - Column Store")
comparison.compare_raw()
In [ ]:
comparison.set_title("Normalized Comparison of RAM - Column Store")
comparison.compare()
In [ ]:
b6 = a6.get_row_benchmark()
b4 = a4.get_row_benchmark()
b2 = a2.get_row_benchmark()
b6.set_name("6 cores")
b4.set_name("4 cores")
b2.set_name("2 cores")
comparison = Comparison(b2, b4, b6)
comparison.set_title("Comparison of CPUs - Row Store")
comparison.compare_visually()
In [ ]:
comparison.set_title("Comparison of CPUs in usec - Row Store")
comparison.compare_raw()
In [ ]:
b12 = aGb12.get_row_benchmark()
b8 = aGb8.get_row_benchmark()
b6 = aGb6.get_row_benchmark()
b12.set_name("12 Gb")
b8.set_name("8 Gb")
b6.set_name("6 Gb")
comparison = Comparison(b6, b8, b12)
comparison.set_title("Comparison of RAM - Row Store")
comparison.compare_visually()
In [ ]:
comparison.set_title("Comparison of RAM in usec - Row Store")
comparison.compare_raw()
In [ ]:
comparison.set_title("Normalized Comparison of RAM - Row Store")
comparison.compare()