JvmPerformanceEvidence

Shared JVM validation and aggregation for detached collector-bound evidence. Consumers provide workload-specific conditions; they do not implement another comparison engine.

Functions

Link copied to clipboard
fun indexPhases(report: JsonObject, keys: List<String>, expectedCount: Int? = null): Map<List<String>, JsonObject>

Indexes actual phase identities without accepting duplicate or missing registrations. Each key is canonical JSON text: object order and decimal spelling do not change an identity. Exact decimal values remain distinct without Gson's mixed-number equality/hash behavior.

Link copied to clipboard
fun median(values: List<Double>): Double

Aggregates independent finite nonnegative measurements without pooling per-run latency quantiles.

Link copied to clipboard
fun projectContract(value: JsonElement, excludedFields: Set<String>, excludedPrefixes: Set<String> = emptySet()): JsonElement

Projects consumer-declared descriptive exclusions while preserving all other nested controlled inputs.

Link copied to clipboard
fun readReport(path: Path): JsonObject

Reads a bounded strict UTF-8 report and attaches the digest of that exact input snapshot. The source receipt is transport metadata; the original file is never modified.

Link copied to clipboard
fun verifyCollectors(reports: List<JsonObject>, collector: Path): JsonObject

Requires the exact loaded collector archive, independently of its advertised version or filename. Comparison runs from compiled directories are rejected; use the actual measured testkit JAR.

Link copied to clipboard
fun verifyEqual(reports: List<JsonObject>, keys: Set<String>)

Preserves exact controlled conditions and rejects missing fields instead of projecting them away.

Link copied to clipboard
fun verifyRepetitions(reports: List<JsonObject>, count: Int = 3)

Requires successful independent canonical UUID invocations, rejecting copied or partial receipts.