use of com.hazelcast.simulator.utils.ThreadSpawner in project hazelcast-simulator by hazelcast.
the class Provisioner method installSimulator.
void installSimulator() {
onlineCheckAgents(properties, registry);
ensureIsRemoteSetup(properties, "install");
long started = System.nanoTime();
logWithRuler("Installing Simulator on %d machines...", registry.agentCount());
ThreadSpawner spawner = new ThreadSpawner("installSimulator", true);
for (final AgentData agent : registry.getAgents()) {
spawner.spawn(new Runnable() {
@Override
public void run() {
log(" Installing Simulator on %s", agent.getPublicAddress());
installSimulator(agent.getPublicAddress());
log(" Finished installing Simulator on %s", agent.getPublicAddress());
}
});
}
spawner.awaitCompletion();
long elapsed = getElapsedSeconds(started);
logWithRuler("Finished installing Simulator on %d machines (%s seconds)", registry.agentCount(), elapsed);
}
use of com.hazelcast.simulator.utils.ThreadSpawner in project hazelcast-simulator by hazelcast.
the class Provisioner method installJava.
void installJava() {
onlineCheckAgents(properties, registry);
ensureIsRemoteSetup(properties, "installJava");
long started = System.nanoTime();
logWithRuler("Installing Java on %d machines...", registry.agentCount());
ThreadSpawner spawner = new ThreadSpawner("installJava", true);
for (final AgentData agent : registry.getAgents()) {
spawner.spawn(new Runnable() {
@Override
public void run() {
log("Installing Java on %s", agent.getPublicAddress());
installJava(agent.getPublicAddress());
}
});
}
spawner.awaitCompletion();
long elapsed = getElapsedSeconds(started);
logWithRuler("Finished installing Java on %d machines (%s seconds)", registry.agentCount(), elapsed);
}
use of com.hazelcast.simulator.utils.ThreadSpawner in project hazelcast-simulator by hazelcast.
the class MapTransactionContextConflictTest method run.
@Run
public void run() {
ThreadSpawner spawner = new ThreadSpawner(name);
for (int i = 0; i < threadCount; i++) {
spawner.spawn(new Worker());
}
spawner.awaitCompletion();
}
use of com.hazelcast.simulator.utils.ThreadSpawner in project hazelcast-simulator by hazelcast.
the class MapDataIntegrityTest method run.
@Run
public void run() {
ThreadSpawner spawner = new ThreadSpawner(name);
for (int i = 0; i < mapIntegrityThreadCount; i++) {
integrityThreads[i] = new MapIntegrityThread();
spawner.spawn(integrityThreads[i]);
}
for (int i = 0; i < stressThreadCount; i++) {
spawner.spawn(new StressThread());
}
spawner.awaitCompletion();
}
use of com.hazelcast.simulator.utils.ThreadSpawner in project hazelcast-simulator by hazelcast.
the class QueueTest method run.
@Run
public void run() {
ThreadSpawner spawner = new ThreadSpawner(name);
for (int queueIndex = 0; queueIndex < queueLength; queueIndex++) {
for (int i = 0; i < threadsPerQueue; i++) {
spawner.spawn(new Worker(queueIndex));
}
}
spawner.awaitCompletion();
}
Aggregations