Class IOReportClientFFM
java.lang.Object
oshi.driver.mac.IOReportClientFFM
FFM equivalent of
IOReportClient: manages a single IOReport subscription for GPU Stats and Energy Model
channels, providing per-instance sampling of GPU active ticks, utilization, and power draw.
Returns sentinel values ((0,0) / -1.0) when IOReport is unavailable.
Call close() when done to release all CoreFoundation references.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Releases all CoreFoundation references held by this client.static IOReportClientFFMcreate()Creates a newIOReportClientFFMsubscribed to GPU Stats and Energy Model channels.oshi.hardware.GpuTicksReturns aGpuTickssnapshot of cumulative GPU active and idle ticks.doubleReturns instantaneous GPU utilization as a percentage (0–100), or-1.0if unavailable or closed.doubleReturns instantaneous GPU power in watts, or-1.0if unavailable or closed.
-
Method Details
-
create
Creates a newIOReportClientFFMsubscribed to GPU Stats and Energy Model channels.- Returns:
- a new client, or
nullif IOReport is unavailable or subscription fails
-
sampleGpuTicks
public oshi.hardware.GpuTicks sampleGpuTicks()Returns aGpuTickssnapshot of cumulative GPU active and idle ticks.- Returns:
- GpuTicks snapshot; never null
-
sampleGpuUtilization
public double sampleGpuUtilization()Returns instantaneous GPU utilization as a percentage (0–100), or-1.0if unavailable or closed.- Returns:
- GPU utilization percentage, or -1.0
-
samplePowerWatts
public double samplePowerWatts()Returns instantaneous GPU power in watts, or-1.0if unavailable or closed.- Returns:
- GPU power in watts, or -1.0
-
close
public void close()Releases all CoreFoundation references held by this client. Idempotent.
-