use of org.camunda.bpm.qa.performance.engine.loadgenerator.tasks.DeployFileTask in project camunda-bpm-platform by camunda.
the class StartProcessInstancesInDirectory method main.
public static void main(String[] args) throws InterruptedException {
ProcessEngine processEngine = PerfTestProcessEngine.getInstance();
final LoadGeneratorConfiguration config = new LoadGeneratorConfiguration();
final List<String> deployableFiles = findDeployableFiles(new File("."));
final Runnable[] setupTasks = new Runnable[deployableFiles.size()];
for (int i = 0; i < deployableFiles.size(); i++) {
setupTasks[i] = new DeployFileTask(processEngine, deployableFiles.get(i));
}
config.setSetupTasks(setupTasks);
final List<String> processKeys = extractProcessDefinitionKeys(deployableFiles);
final Runnable[] workerRunnables = new Runnable[processKeys.size()];
for (int i = 0; i < processKeys.size(); i++) {
workerRunnables[i] = new StartProcessInstanceTask(processEngine, processKeys.get(i));
}
config.setWorkerTasks(workerRunnables);
final LoadGenerator loadGenerator = new LoadGenerator(config);
loadGenerator.execute();
}
Aggregations