Class CpuUsageMetrics
- java.lang.Object
-
- org.apache.iotdb.metrics.metricsets.cpu.CpuUsageMetrics
-
- All Implemented Interfaces:
IMetricSet
public class CpuUsageMetrics extends Object implements IMetricSet
-
-
Field Summary
Fields Modifier and Type Field Description protected AbstractMetricServicemetricServiceprotected Map<Long,String>threadIdToModuleCacheprotected Map<Long,String>threadIdToPoolCacheprotected UnaryOperator<String>threadNameToModuleprotected UnaryOperator<String>threadNameToPool
-
Constructor Summary
Constructors Constructor Description CpuUsageMetrics(List<String> modules, List<String> pools, UnaryOperator<String> threadNameToModule, UnaryOperator<String> threadNameToPool)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbindTo(AbstractMetricService metricService)bind metrics to metricManager and init environment.Map<String,Double>getModuleCpuUsage()Map<String,Double>getModuleUserTimePercentage()Map<String,Double>getPoolCpuUsage()Map<String,Double>getPoolUserCpuPercentage()voidunbindFrom(AbstractMetricService metricService)remove metrics from metricManager and clear environment.
-
-
-
Field Detail
-
metricService
protected AbstractMetricService metricService
-
threadNameToModule
protected final UnaryOperator<String> threadNameToModule
-
threadNameToPool
protected final UnaryOperator<String> threadNameToPool
-
-
Constructor Detail
-
CpuUsageMetrics
public CpuUsageMetrics(List<String> modules, List<String> pools, UnaryOperator<String> threadNameToModule, UnaryOperator<String> threadNameToPool)
-
-
Method Detail
-
bindTo
public void bindTo(AbstractMetricService metricService)
Description copied from interface:IMetricSetbind metrics to metricManager and init environment.- Specified by:
bindToin interfaceIMetricSet
-
unbindFrom
public void unbindFrom(AbstractMetricService metricService)
Description copied from interface:IMetricSetremove metrics from metricManager and clear environment.- Specified by:
unbindFromin interfaceIMetricSet
-
-