Interface PerformanceSnapshot
public interface PerformanceSnapshot
Read-only report of retained performance samples.
This is Experimental API. Snapshots are created by the runtime and obtained through
ziviDomeLive.getPerformanceSnapshot().
A snapshot is immutable. Creating one allocates and sorts retained sample copies, so obtain it outside the interval being measured.
API stability: Experimental.
- Since:
- 2.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceRead-only aggregate values for one metric over retained frames. -
Method Summary
Modifier and TypeMethodDescriptionintgetCalls(PerformanceMetric metric, int frameIndex) longlonggetDurationNanos(PerformanceMetric metric, int frameIndex) intgetGpuCalls(PerformanceMetric metric, int frameIndex) longgetGpuDurationNanos(PerformanceMetric metric, int frameIndex) getGpuStatistics(PerformanceMetric metric) Aggregates GPU values for one metric over retained frames.longlonggetStatistics(PerformanceMetric metric) Aggregates CPU-observed values for one metric over retained frames.intlonglongboolean
-
Method Details
-
getRequestedMode
PerformanceMode getRequestedMode()- Returns:
- profiling mode requested when this collection session was enabled
-
getEffectiveMode
PerformanceMode getEffectiveMode()- Returns:
- mode effectively used after runtime capability fallback
-
getTotalFrames
long getTotalFrames()- Returns:
- completed frames since the latest statistics reset, including overwritten frames
-
getStoredFrames
int getStoredFrames()- Returns:
- chronological frames retained by the configured ring-buffer capacity
-
getOverwrittenFrames
long getOverwrittenFrames()- Returns:
- completed frames displaced from the bounded ring buffer
-
getStatistics
Aggregates CPU-observed values for one metric over retained frames.- Parameters:
metric- non-null metric- Returns:
- immutable aggregate statistics
- Throws:
IllegalArgumentException- whenmetricis null
-
getGpuStatistics
Aggregates GPU values for one metric over retained frames. Metrics without GPU instrumentation return an empty aggregate, never CPU values.- Parameters:
metric- non-null metric- Returns:
- immutable GPU aggregate statistics
- Throws:
IllegalArgumentException- whenmetricis null
-
hasGpuTimings
boolean hasGpuTimings()- Returns:
- whether at least one retained render-pipeline GPU sample is available
-
getDurationNanos
- Parameters:
metric- non-null sampled metricframeIndex- zero-based chronological retained-frame index- Returns:
- CPU-observed duration in nanoseconds; zero means no recorded duration
- Throws:
IllegalArgumentException- whenmetricis nullIndexOutOfBoundsException- whenframeIndexis not retained
-
getCalls
- Parameters:
metric- non-null sampled metricframeIndex- zero-based chronological retained-frame index- Returns:
- calls recorded for that metric and frame
- Throws:
IllegalArgumentException- whenmetricis nullIndexOutOfBoundsException- whenframeIndexis not retained
-
getGpuDurationNanos
- Parameters:
metric- non-null sampled metricframeIndex- zero-based chronological retained-frame index- Returns:
- GPU duration in nanoseconds; zero may mean unavailable rather than zero GPU cost
- Throws:
IllegalArgumentException- whenmetricis nullIndexOutOfBoundsException- whenframeIndexis not retained
-
getGpuCalls
- Parameters:
metric- non-null sampled metricframeIndex- zero-based chronological retained-frame index- Returns:
- GPU results recorded for the frame; zero means unavailable
- Throws:
IllegalArgumentException- whenmetricis nullIndexOutOfBoundsException- whenframeIndexis not retained
-
getInvariantViolations
long getInvariantViolations()- Returns:
- total render-graph invariant violations detected in the collection session
-
getCubemapCaptureViolations
long getCubemapCaptureViolations()- Returns:
- cubemap-capture invariant violations detected in the collection session
-
getUnexpectedPassViolations
long getUnexpectedPassViolations()- Returns:
- unexpected render-pass violations detected in the collection session
-
getDiagnostics
- Returns:
- immutable human-readable collection diagnostics
-
getGpuTimerPolicy
GpuTimerPolicy getGpuTimerPolicy()- Returns:
- GPU timer ownership and fallback policy requested for the session
-
getGpuTimerBackend
GpuTimerBackend getGpuTimerBackend()- Returns:
- GPU measurement backend effectively used, or
GpuTimerBackend.NONE
-
getGpuTimerArchitecture
GpuTimerArchitecture getGpuTimerArchitecture()- Returns:
- normalized host/renderer architecture recorded during backend selection
-