JvmPerformanceMeter

class JvmPerformanceMeter(name: String, capacity: Int)(source)

Owner-thread JDK timing, allocation, heap-boundary, and process-GC collector. Setup, assertions, and evidence serialization belong outside sample boundaries. Unsupported metrics remain null and failed samples cannot publish successful evidence.

Parameters

name

stable interval identity.

capacity

exact number of required successful samples.

Constructors

Link copied to clipboard
constructor(name: String, capacity: Int)

Functions

Link copied to clipboard
fun begin()

Starts an externally driven sample on the construction owner thread.

Link copied to clipboard
fun end()

Completes an externally driven sample; it does not wait for GPU completion.

Link copied to clipboard
fun result(): JsonObject

Returns detached JSON only after all required successful samples are complete.

Link copied to clipboard
fun sample(operation: () -> Unit)

Records one successful operation, propagating failure without counting a failed sample. A caller operation may fail with any Throwable; poison the partial interval and rethrow.