Test-ZrThroughput
Measures sustained write throughput against a Zaris store and reports total operations, achieved operations per second, and failures.
Syntax
Test-ZrThroughput -StoreName <string> -DurationSec <int> -Concurrency <int> [-ObjectSizeBytes <int>] [-ConnectionString <string>] [-Endpoints <string[]>] [-TimeoutSec <int>]
Description
Test-ZrThroughput drives a continuous write-only workload against the named Zaris store for a fixed duration at the requested concurrency, then reports the total operations, achieved operations per second, and failure count. If a store is already connected, its name must match -StoreName; otherwise the command fails with a store-mismatch error.
The cmdlet requires an active connection (Connect-ZrStore) or a one-shot independent connection supplied through -Endpoints. The run stops when -DurationSec elapses or on Ctrl+C; no result is written on cancellation.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
-StoreName | String | Yes | The name of the store to measure. Must match the connected store when one is active. |
-DurationSec | Int32 | Yes | How long, in seconds, to run the throughput workload. Range 1–3600. |
-Concurrency | Int32 | Yes | The number of concurrent workers issuing writes. Range 1–1024. |
-ObjectSizeBytes | Int32 | No | The size, in bytes, of the objects written during the workload. Range 32–1048576. Default 100. |
-ConnectionString | String | No | Connect via a Zaris connection string, e.g. zaris://host:7861/store; an alternative to -StoreName + -Endpoints for a one-shot connection. Ignored when a Connect-ZrStore session is active. |
-Endpoints | String[] | No | One or more store node endpoints (host:port) for a one-shot independent connection. Only the first endpoint is used as the seed. Ignored when a Connect-ZrStore session is active. |
-TimeoutSec | Int32 | No | Connection timeout, in seconds, for an independent connection. Range 1–120. Default 5. |
Returns an object with StoreName, DurationSecRequested, DurationSecActual, Concurrency, ObjectSizeBytes, TotalOperations, OpsPerSecond, and Failures.
Examples
Measure write throughput for 30 seconds using 64 concurrent workers:
Test-ZrThroughput -StoreName "orders" -DurationSec 30 -Concurrency 64
Measure throughput with larger 512-byte values:
Test-ZrThroughput -StoreName "orders" -DurationSec 30 -Concurrency 32 -ObjectSizeBytes 512