MinecraftPerformanceMeter

class MinecraftPerformanceMeter(screen: Any, refresh: () -> Unit = {}) : AutoCloseable(source)

Actual Fabric extraction/render adapter, confined to the measured screen's client thread. Event callbacks and native counters belong to the kit; consumers supply only state changes. GPU completion, model mutation, readiness, and evidence storage are outside extraction samples. Complete operation frames include diagnostic instrumentation and frame pacing, rather than uninstrumented application latency.

Parameters

screen

actual measured Fabric screen, not a preview or replacement presenter.

refresh

application-owned state delivery before extraction.

Constructors

Link copied to clipboard
constructor(screen: Any, refresh: () -> Unit = {})

Properties

Link copied to clipboard

Successful completion includes the following boundary of the final operation frame. Callback failures propagate; elapsed waiting cannot satisfy this condition.

Functions

Link copied to clipboard
fun begin(name: String, plan: PerformancePlan = PerformancePlan(), fixture: NativePerformanceFixture = NativePerformanceFixture(), update: (Int) -> Unit = {})

Starts one interval on the client's owner thread; no test-framework dependency is installed.

Link copied to clipboard
open override fun close()

Clears every host and application callback reference after owner-thread cancellation.

Link copied to clipboard
fun measure(context: Any, name: String, plan: PerformancePlan = PerformancePlan(), fixture: NativePerformanceFixture = NativePerformanceFixture(), update: (Int) -> Unit = {}): JsonObject

Runs with the installed Fabric ClientGameTestContext without coupling its version into the kit's POM. Timeout and callback failures cancel diagnostic ownership on the actual client thread. Arbitrary application and framework failures must cancel monitoring before being propagated.

Link copied to clipboard
fun receipt(): JsonObject

Detached progress for failure evidence; partial intervals never expose timing distributions.

Link copied to clipboard
fun result(): JsonObject

Returns complete detached evidence after a successful client interval.