Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/357.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 滴管频率_Java_Dropwizard_Graphite_Gauge - Fatal编程技术网

Java 滴管频率

Java 滴管频率,java,dropwizard,graphite,gauge,Java,Dropwizard,Graphite,Gauge,我正在代码中使用DropGauge向导功能,如下所示: private AtomicInteger heapUsageAfterCollectionThresholdExceeded; new Gauge<Integer>() { @Override public Integer getValue() { return heapUsageThresholdExceeded.get(); }

我正在代码中使用DropGauge向导功能,如下所示:

    private AtomicInteger heapUsageAfterCollectionThresholdExceeded;

       new Gauge<Integer>() {
        @Override
        public Integer getValue() {
            return heapUsageThresholdExceeded.get();
        }
private-AtomicInteger-heapusageAfterCollectionThreshold超过;
新仪表(){
@凌驾
公共整数getValue(){
返回heapusagethresholds已超过。get();
}
现在开始将HeapusAgeSThresholdExcepended的值推送到graphite。我希望在graphite中看到整数值。但在graphite中,我看到该值报告为小数点值(0.15)。我有以下问题:

  • 为什么整数仪表报告为十进制值
  • drop wizard多久测量/推送一次注册仪表的度量值

  • 参考:

    回答第二个问题,这取决于报告指标的频率。时间为1分钟

    您可以在配置文件中指定频率。例如-

    metrics:
      reporters:
        - type: graphite
          host: localhost
          port: 2003
          prefix: example
          frequency: 1m