public class MetricManager extends Object
NOPMetricManager will be bound.| 限定符和类型 | 字段和说明 |
|---|---|
static IMetricManager |
NOP_METRIC_MANAGER |
| 构造器和说明 |
|---|
MetricManager() |
| 限定符和类型 | 方法和说明 |
|---|---|
static ClusterHistogram |
getClusterHistogram(String group,
MetricName name)
Create a
ClusterHistogram metric in given group, and name
if not exist, an instance will be created. |
static ClusterHistogram |
getClusterHistogram(String group,
MetricName name,
long[] buckets)
Create a
ClusterHistogram metric in given group, and name
if not exist, an instance will be created. |
static Compass |
getCompass(String group,
MetricName name)
Create a
Compass metric in given group, and name. |
static Compass |
getCompass(String group,
MetricName name,
ReservoirType type)
Create a
Compass metric in given group, name, and ReservoirType type. |
static Counter |
getCounter(String group,
MetricName name)
Create a
Counter metric in given group, and name. |
static FastCompass |
getFastCompass(String group,
MetricName name)
Create a
FastCompass metric in given group, and name
if not exist, an instance will be created. |
static Histogram |
getHistogram(String group,
MetricName name)
Create a
Histogram metric in given group, and name. |
static Histogram |
getHistogram(String group,
MetricName name,
ReservoirType type)
Create a
Histogram metric in given group, name, and ReservoirType type. |
static IMetricManager |
getIMetricManager()
get dynamically bound
IMetricManager instance |
static Meter |
getMeter(String group,
MetricName name)
Create a
Meter metric in given group, and name. |
static Timer |
getTimer(String group,
MetricName name)
Create a
Timer metric in given group, and name. |
static Timer |
getTimer(String group,
MetricName name,
ReservoirType type)
Create a
Timer metric in given group, name, and ReservoirType type. |
static void |
register(String group,
MetricName name,
Metric metric)
Register a customized metric to specified group.
|
public static final IMetricManager NOP_METRIC_MANAGER
public static Meter getMeter(String group, MetricName name)
Meter metric in given group, and name.
if not exist, an instance will be created.
根据给定的group和name, 获取一个Meter实例,如果不存在则会创建
Meter(计量器)主要用于统计调用qps, 包括最近1min, 5min, 15min的移动平均qpsgroup - the group of MetricRegistryname - the name of the metricpublic static Counter getCounter(String group, MetricName name)
Counter metric in given group, and name.
if not exist, an instance will be created.
根据给定的group和name, 获取一个Counter实例,如果不存在则会创建
Counter(计数器), 主要用于用于计数,支持+1, -1, +n, -n等操作group - the group of MetricRegistryname - the name of the metricpublic static Histogram getHistogram(String group, MetricName name)
Histogram metric in given group, and name.
if not exist, an instance will be created.
根据给定的group和name, 获取一个Histogram实例,如果不存在则会创建
Histogram(直方图), 主要用于统计分布情况,例如调用rt分布,
能够迅速了解统计指标的最大值,最小值,平均值,方差,70%,85%,95%分位数等信息group - the group of MetricRegistryname - the name of the metricpublic static Histogram getHistogram(String group, MetricName name, ReservoirType type)
Histogram metric in given group, name, and ReservoirType type.
if not exist, an instance will be created.
根据给定的group和name和type, 获取一个Histogram实例,如果不存在则会创建
Histogram(直方图), 主要用于统计分布情况,例如调用rt分布,
能够迅速了解统计指标的最大值,最小值,平均值,方差,70%,85%,95%分位数等信息group - the group of MetricRegistryname - the name of the metrictype - the type of the ReservoirTypepublic static Timer getTimer(String group, MetricName name)
Timer metric in given group, and name.
if not exist, an instance will be created.
根据给定的group和name, 获取一个Timer实例,如果不存在则会创建
Timer(计时器), 主要用于给定指标的qps, rt分布, 可以理解为Meter+Histogram
能够方便的统计某指标的qps, 和rt的最大值,最小值,平均值,方差,70%,85%,95%分位数等信息group - the group of MetricRegistryname - the name of the metricpublic static Timer getTimer(String group, MetricName name, ReservoirType type)
Timer metric in given group, name, and ReservoirType type.
if not exist, an instance will be created.
根据给定的group, name, type, 获取一个Timer实例,如果不存在则会创建
Timer(计时器), 主要用于给定指标的qps, rt分布, 可以理解为Meter+Histogram
能够方便的统计某指标的qps, 和rt的最大值,最小值,平均值,方差,70%, 85%, 95%分位数等信息group - the group of MetricRegistryname - the name of the metrictype - the type of reservoirpublic static Compass getCompass(String group, MetricName name)
Compass metric in given group, and name.
if not exist, an instance will be created.
根据给定的group和name, 获取一个Compass实例,如果不存在则会创建
Compass(罗盘), 主要用于统计给定指标的qps, rt分布,调用成功次数,以及错误码分布等信息group - the group of MetricRegistryname - the name of the metricpublic static Compass getCompass(String group, MetricName name, ReservoirType type)
Compass metric in given group, name, and ReservoirType type.
if not exist, an instance will be created.
根据给定的group, name和type, 获取一个Compass实例,如果不存在则会创建
Compass(罗盘), 主要用于统计给定指标的qps, rt分布,调用成功次数,以及错误码分布等信息group - the group of MetricRegistryname - the name of the metricpublic static FastCompass getFastCompass(String group, MetricName name)
FastCompass metric in given group, and name
if not exist, an instance will be created.
根据给定的group和name, 获取一个FastCompass实例,如果不存在则会创建
FastCompass, 主要用于在高吞吐率场景下,统计给定指标的qps, 平均rt,成功率,以及错误码等指标group - the group of MetricRegistryname - the name of the metricFastCompasspublic static ClusterHistogram getClusterHistogram(String group, MetricName name, long[] buckets)
ClusterHistogram metric in given group, and name
if not exist, an instance will be created.
根据给定的group和name, 获取一个ClusterHistogram实例,如果不存在则会创建
ClusterHistogram, 主要用于集群分位数统计group - the group of MetricRegistryname - the name of the metricClusterHistogrampublic static ClusterHistogram getClusterHistogram(String group, MetricName name)
ClusterHistogram metric in given group, and name
if not exist, an instance will be created.
根据给定的group和name, 获取一个ClusterHistogram实例,如果不存在则会创建
ClusterHistogram, 主要用于集群分位数统计group - the group of MetricRegistryname - the name of the metricClusterHistogrampublic static void register(String group, MetricName name, Metric metric)
group - the group name of MetricRegistrymetric - the metric to registerpublic static IMetricManager getIMetricManager()
IMetricManager instanceIMetricManager instance boundCopyright © 2019. All rights reserved.