BSBM benchmark: plot also business intelligence use care

pull/10/head
Tpt 5 years ago
parent dbf9e6899e
commit 3de166e89c
  1. 16
      bench/bsbm-plot.py

@ -5,6 +5,7 @@ from glob import glob
def plot_y_per_x_per_plot(data, xlabel, ylabel, file):
plt.figure(file)
for label, xys in data.items():
plt.plot(list(xys.keys()), list(xys.values()), '.', label=label)
plt.legend()
@ -12,9 +13,9 @@ def plot_y_per_x_per_plot(data, xlabel, ylabel, file):
plt.ylabel(ylabel)
# plt.yscale('log')
plt.savefig(file)
plt.show()
# BSBM explore
aqet = defaultdict(dict)
for file in glob('bsbm.explore.*.xml'):
run = file.replace('bsbm.explore.', '').replace('.xml', '')
@ -22,5 +23,16 @@ for file in glob('bsbm.explore.*.xml'):
val = float(query.find('aqet').text)
if val > 0:
aqet[run][int(query.attrib['nr'])] = val
plot_y_per_x_per_plot(aqet, 'query id', 'aqet', 'bsbm.explore.png')
# BSBM business intelligence
aqet = defaultdict(dict)
for file in glob('bsbm.businessIntelligence.*.xml'):
run = file.replace('bsbm.businessIntelligence.', '').replace('.xml', '')
for query in ET.parse(file).getroot().find('queries').findall('query'):
val = float(query.find('aqet').text)
if val > 0:
aqet[run][int(query.attrib['nr'])] = val
plot_y_per_x_per_plot(aqet, 'query id', 'aqet', 'bsbm.businessIntelligence.png')
plt.show()

Loading…
Cancel
Save