Skip to content

Commit

Permalink
Make workerID go out of scope
Browse files Browse the repository at this point in the history
  • Loading branch information
nck-mlcnv committed Jun 11, 2024
1 parent 069c7ae commit 749dfa7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/aksw/iguana/cc/tasks/impl/Stresstest.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public record Result(
public Stresstest(String suiteID, long stresstestID, Config config, ResponseBodyProcessorInstances responseBodyProcessorInstances, List<Storage> storages, List<Metric> metrics) {

// initialize workers
long workerId = 0;
if (config.warmupWorkers() != null) {
long workerId = 0;
for (HttpWorker.Config workerConfig : config.warmupWorkers()) {
for (int i = 0; i < workerConfig.number(); i++) {
var responseBodyProcessor = (workerConfig.parseResults()) ? responseBodyProcessorInstances.getProcessor(workerConfig.acceptHeader()) : null;
Expand All @@ -53,8 +53,8 @@ public Stresstest(String suiteID, long stresstestID, Config config, ResponseBody
}
}

workerId = 0;
for (HttpWorker.Config workerConfig : config.workers()) {
long workerId = 0;
for (int i = 0; i < workerConfig.number(); i++) {
var responseBodyProcessor = (workerConfig.parseResults()) ? responseBodyProcessorInstances.getProcessor(workerConfig.acceptHeader()) : null;
workers.add(new SPARQLProtocolWorker(workerId++, responseBodyProcessor, (SPARQLProtocolWorker.Config) workerConfig));
Expand Down

0 comments on commit 749dfa7

Please sign in to comment.