GpuPerformanceMeter
class GpuPerformanceMeter(samples: Int, timestampPeriodNanos: Double, scope: String, readTimestamp: (Int) -> Long?) : AutoCloseable(source)
Collects completed native timestamp pairs without inferring GPU work from a CPU clock.
The host owns query allocation, placement, submission, completion and release on its render thread. readTimestamp is borrowed until close; null means the actual query has not completed. Tick conversion uses the loaded device's positive timestampPeriodNanos, never a backend-name assumption. Storage is bounded by samples; the host calls begin before its owner-thread operation and recorded after recording the pair. This collector measures only scope; unrelated host commands inside that boundary are included.