Package io.antmedia.statistic
Class GPUUtils
java.lang.Object
io.antmedia.statistic.GPUUtils
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetDecoderUtilization(int deviceNo) Get the decoder utilization of the deviceorg.bytedeco.cuda.nvml.nvmlDevice_stgetDevice(int deviceIndex) intgetDeviceName(int deviceIndex) intgetEncoderUtilization(int deviceNo) Get the encoder utilization of the deviceintgetGPUUtilization(int deviceNo) static GPUUtilsMultiple threads can enter here and may cause an unexpected exception.getMemoryStatus(int deviceNo) intgetMemoryUtilization(int deviceNo) private org.bytedeco.cuda.nvml.nvmlUtilization_tgetUtilization(int deviceNo)
-
Field Details
-
logger
private static org.slf4j.Logger logger -
instance
-
noGPU
private static boolean noGPU -
deviceCount
-
-
Constructor Details
-
GPUUtils
private GPUUtils()
-
-
Method Details
-
getInstance
Multiple threads can enter here and may cause an unexpected exception. So it's synch- Returns:
-
getDeviceCount
public int getDeviceCount() -
getDevice
public org.bytedeco.cuda.nvml.nvmlDevice_st getDevice(int deviceIndex) -
getUtilization
private org.bytedeco.cuda.nvml.nvmlUtilization_t getUtilization(int deviceNo) -
getMemoryStatus
-
getEncoderUtilization
public int getEncoderUtilization(int deviceNo) Get the encoder utilization of the device- Parameters:
deviceNo-- Returns:
- encoder utilization by percentage
-
getDecoderUtilization
public int getDecoderUtilization(int deviceNo) Get the decoder utilization of the device- Parameters:
deviceNo-- Returns:
- decoder utilization by percentage
-
getDeviceName
-
getMemoryUtilization
public int getMemoryUtilization(int deviceNo) -
getGPUUtilization
public int getGPUUtilization(int deviceNo)
-