Skip to main content

Test-ZrLatency

Measures per-operation read latency against a Zaris store and reports minimum, average, P95, P99, and maximum in milliseconds.

Syntax

Test-ZrLatency -StoreName <string> -Iterations <int> [-ObjectSizeBytes <int>] [-ConnectionString <string>] [-Endpoints <string[]>] [-TimeoutSec <int>]

Description

Test-ZrLatency pre-populates the named Zaris store with test objects, runs a short warm-up pass, then times individual reads to characterize single-operation response times rather than aggregate throughput. Samples are sorted and the minimum, average, P95, P99, and maximum latency are reported in milliseconds.

The cmdlet requires an active connection (Connect-ZrStore) or a one-shot independent connection supplied through -Endpoints. Press Ctrl+C to cancel; no result is written on cancellation.

Parameters

ParameterTypeRequiredDescription
-StoreNameStringYesThe name of the store to measure.
-IterationsInt32YesThe number of read operations to time. Range 1–1000000.
-ObjectSizeBytesInt32NoThe size, in bytes, of the objects pre-populated and read. Range 32–1048576. Default 100.
-ConnectionStringStringNoConnect 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.
-EndpointsString[]NoOne 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.
-TimeoutSecInt32NoConnection timeout, in seconds, for an independent connection. Range 1–120. Default 5.

Returns an object with StoreName, Iterations, ObjectSizeBytes, MinMs, AvgMs, P95Ms, P99Ms, and MaxMs.

Examples

Measure read latency over 10,000 iterations against the "orders" store:

Test-ZrLatency -StoreName "orders" -Iterations 10000

Measure latency with larger 1 KB objects:

Test-ZrLatency -StoreName "orders" -Iterations 5000 -ObjectSizeBytes 1024