Package io.antmedia.statistic
Class GPUUtils
java.lang.Object
io.antmedia.statistic.GPUUtils
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getDecoderUtilization
(int deviceNo) Get the decoder utilization of the deviceorg.bytedeco.cuda.nvml.nvmlDevice_st
getDevice
(int deviceIndex) int
getDeviceName
(int deviceIndex) int
getEncoderUtilization
(int deviceNo) Get the encoder utilization of the deviceint
getGPUUtilization
(int deviceNo) static GPUUtils
Multiple threads can enter here and may cause an unexpected exception.getMemoryStatus
(int deviceNo) int
getMemoryUtilization
(int deviceNo) private org.bytedeco.cuda.nvml.nvmlUtilization_t
getUtilization
(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)
-