Adds BSBM benchmark scripts

pull/10/head
Tpt 6 years ago
parent c74de29c0e
commit 8f491e309f
  1. 26
      bench/bsbm-plot.py
  2. 16
      bench/bsbm_blazegraph.sh
  3. 19
      bench/bsbm_graphdb.sh
  4. 15
      bench/bsbm_rudf.sh
  5. 17
      bench/bsbm_virtuoso.sh

@ -0,0 +1,26 @@
import xml.etree.ElementTree as ET
import matplotlib.pyplot as plt
from collections import defaultdict
from glob import glob
def plot_y_per_x_per_plot(data, xlabel, ylabel, file):
for label, xys in data.items():
plt.plot(list(xys.keys()), list(xys.values()), '.', label=label)
plt.legend()
plt.xlabel(xlabel)
plt.ylabel(ylabel)
# plt.yscale('log')
plt.savefig(file)
plt.show()
aqet = defaultdict(dict)
for file in glob('bsbm.explore.*.xml'):
run = file.replace('bsbm.explore.', '').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.explore.png')

@ -0,0 +1,16 @@
#!/usr/bin/env bash
DATASET_SIZE=100000
cd bsbmtools-0.2
./generate -fc -pc ${DATASET_SIZE} -s nt -fn "explore-${DATASET_SIZE}"
wget https://github.com/blazegraph/database/releases/download/BLAZEGRAPH_RELEASE_2_1_5/blazegraph.jar
/usr/lib/jvm/java-8-openjdk-amd64/bin/java -server -jar blazegraph.jar &
sleep 10
curl -f -X POST -H 'Content-Type:text/plain' --data-binary "@explore-${DATASET_SIZE}.nt" http://localhost:9999/blazegraph/sparql
./testdriver -ucf usecases/explore/sparql.txt -o "../bsbm.explore.blazegraph.${DATASET_SIZE}.2.1.5.xml" http://localhost:9999/blazegraph/sparql
./testdriver -ucf usecases/businessIntelligence/sparql.txt -o "../bsbm.businessIntelligence.blazegraph.${DATASET_SIZE}.2.1.5.xml" http://localhost:9999/blazegraph/sparql
kill $!
rm blazegraph.jar
rm blazegraph.jnl
rm "explore-${DATASET_SIZE}.nt"
rm -r td_data

@ -0,0 +1,19 @@
#!/usr/bin/env bash
DATASET_SIZE=100000
cd bsbmtools-0.2
./generate -fc -pc ${DATASET_SIZE} -s nt -fn "explore-${DATASET_SIZE}"
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
../graphdb-free-8.11.0/bin/graphdb -s -Dgraphdb.logger.root.level=WARN &
sleep 10
curl -f -X POST http://localhost:7200/rest/repositories -H 'Content-Type:application/json' -d '
{"id":"test","params":{"ruleset":{"label":"Ruleset","name":"ruleset","value":"empty"},"title":{"label":"Repository title","name":"title","value":"GraphDB Free repository"},"checkForInconsistencies":{"label":"Check for inconsistencies","name":"checkForInconsistencies","value":"false"},"disableSameAs":{"label":"Disable owl:sameAs","name":"disableSameAs","value":"true"},"baseURL":{"label":"Base URL","name":"baseURL","value":"http://example.org/owlim#"},"repositoryType":{"label":"Repository type","name":"repositoryType","value":"file-repository"},"id":{"label":"Repository ID","name":"id","value":"repo-test"},"storageFolder":{"label":"Storage folder","name":"storageFolder","value":"storage"}},"title":"Test","type":"free"}
'
curl -f -X PUT -H 'Content-Type:application/n-triples' --data-binary "@explore-${DATASET_SIZE}.nt" http://localhost:7200/repositories/test/statements
./testdriver -ucf usecases/explore/sparql.txt -o "../bsbm.explore.graphdb.${DATASET_SIZE}.8.11.0.xml" http://localhost:7200/repositories/test
./testdriver -ucf usecases/businessIntelligence/sparql.txt -o "../bsbm.businessIntelligence.graphdb.${DATASET_SIZE}.8.11.0.xml" http://localhost:7200/repositories/test
kill $!
sleep 5
rm -r ../graphdb-free-8.11.0/data
rm "explore-${DATASET_SIZE}.nt"
rm -r td_data

@ -0,0 +1,15 @@
#!/usr/bin/env bash
DATASET_SIZE=100000
cd bsbmtools-0.2
./generate -fc -pc ${DATASET_SIZE} -s nt -fn "explore-${DATASET_SIZE}"
cargo build --release --manifest-path="../../server/Cargo.toml"
./../../target/release/rudf_server --file rudf_data &
sleep 5
curl -f -X POST -H 'Content-Type:application/n-triples' --data-binary "@explore-${DATASET_SIZE}.nt" http://localhost:7878/
./testdriver -ucf usecases/explore/sparql.txt -o "../bsbm.explore.rudf.${DATASET_SIZE}.$(date +'%Y-%m-%d').xml" http://localhost:7878/query
./testdriver -ucf usecases/businessIntelligence/sparql.txt -o "../bsbm.businessIntelligence.rudf.${DATASET_SIZE}.$(date +'%Y-%m-%d').xml" http://localhost:7878/query
kill $!
rm -r rudf_data
rm "explore-${DATASET_SIZE}.nt"
rm -r td_data

@ -0,0 +1,17 @@
#!/usr/bin/env bash
DATASET_SIZE=100000
cd bsbmtools-0.2
./generate -fc -pc ${DATASET_SIZE} -s nt -fn "explore-${DATASET_SIZE}"
cp ../virtuoso-opensource/database/virtuoso.ini.sample virtuoso.ini
mkdir ../database
../virtuoso-opensource/bin/virtuoso-t -f &
sleep 30
curl -f --digest --user dba:dba -H 'Content-Type:application/n-triples' --data-binary "@explore-${DATASET_SIZE}.nt" 'http://localhost:8890/sparql-graph-crud-auth?graph-uri=urn:graph:test'
curl -f -H 'Content-Type:application/sparql-query' --data "SELECT (COUNT(*) AS ?c) WHERE { ?s ?p ?o }" 'http://localhost:8890/sparql?graph-uri=urn:graph:test'
./testdriver -ucf usecases/explore/sparql.txt -o "../bsbm.explore.virtuoso.${DATASET_SIZE}.7.2.5.xml" 'http://localhost:8890/sparql?graph-uri=urn:graph:test'
./testdriver -ucf usecases/businessIntelligence/sparql.txt -o "../bsbm.businessIntelligence.virtuoso.${DATASET_SIZE}.7.2.5.xml" 'http://localhost:8890/sparql?graph-uri=urn:graph:test'
kill $!
rm -r ../database
rm "explore-${DATASET_SIZE}.nt"
rm -r td_data
Loading…
Cancel
Save