Package org.acemq.workloads.endurance
Class ClientLauncher
java.lang.Object
org.acemq.workloads.endurance.ClientLauncher
Starts the standing loads, or adopts ones already running, reports on them, and stops them.
The one place that knows how a load is launched:
endurance and loads both go
through it.
Each load leaves the two files scripts/chaos-drill.sh workload up always left:
workload-<client>.pid and workload-<client>.jsonl in the state directory, so
a chaos drill's client timeline, the console's Standing loads view and either command see a
load started by any of them as the load it is.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA load being watched: its pid, and whether this call started it.static final classA load could not be started or stopped.static final recordWhat a load is doing right now. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstart()Starts every configured client that is not already running, adopts those that are, and waits until each one has written its first sample.status()voidstop(List<ClientLauncher.Client> clients) Stops what this run started.voidstopAll()Stops every configured client found by its pid file, whoever started it, and removes stale pid files.
-
Constructor Details
-
ClientLauncher
-
-
Method Details
-
start
public List<ClientLauncher.Client> start() throws ClientLauncher.LaunchException, InterruptedExceptionStarts every configured client that is not already running, adopts those that are, and waits until each one has written its first sample.- Returns:
- every configured client, running and sampling
- Throws:
ClientLauncher.LaunchException- naming every client that could not be built, could not be started, exited, or wrote no sample withinstartupSeconds, each with its last lines of output; whatever this call had started is stopped againInterruptedException
-
status
- Returns:
- each configured client's state, read from its pid file and sample file
-
stopAll
Stops every configured client found by its pid file, whoever started it, and removes stale pid files.- Throws:
ClientLauncher.LaunchException- if a load survived both signals; the rest are still stopped
-
stop
Stops what this run started. Adopted loads are left alone; they were somebody else's.
-