Skip to content

Commit

Permalink
fix StresstestResultProcessor requiring a dataset name for a connection
Browse files Browse the repository at this point in the history
  • Loading branch information
nck-mlcnv committed Oct 24, 2023
1 parent 5a308e8 commit 6c76288
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,12 @@ public void calculateAndSaveMetrics(Calendar start, Calendar end) {

Resource workerRes = iresFactory.getWorkerResource(worker);
Resource connectionRes = IRES.getResource(config.connection().name());
Resource datasetRes = IRES.getResource(config.connection().dataset().name());
if (config.connection().dataset() != null) {
Resource datasetRes = IRES.getResource(config.connection().dataset().name());
m.add(connectionRes, IPROP.dataset, datasetRes);
m.add(datasetRes, RDFS.label, ResourceFactory.createTypedLiteral(config.connection().dataset().name()));
m.add(datasetRes, RDF.type, IONT.dataset);
}

m.add(taskRes, IPROP.workerResult, workerRes);
m.add(workerRes, RDF.type, IONT.worker);
Expand All @@ -123,10 +128,6 @@ public void calculateAndSaveMetrics(Calendar start, Calendar end) {
if (config.connection().version() != null) {
m.add(connectionRes, IPROP.version, ResourceFactory.createTypedLiteral(config.connection().version()));
}
m.add(connectionRes, IPROP.dataset, datasetRes);

m.add(datasetRes, RDFS.label, ResourceFactory.createTypedLiteral(config.connection().dataset().name()));
m.add(datasetRes, RDF.type, IONT.dataset);
}

// Connect task and workers to the Query nodes, that store the triple stats.
Expand Down Expand Up @@ -171,7 +172,7 @@ public void calculateAndSaveMetrics(Calendar start, Calendar end) {
storage.storeResult(m);
}

// Store results of language processors
// Store results of language processors (this shouldn't throw an error if the map is empty)
for (var languageProcessor: lpResults.get().keySet()) {
for (var data : lpResults.get().get(languageProcessor)) {
for (var storage : storages) {
Expand Down

0 comments on commit 6c76288

Please sign in to comment.