com.jamonapi.Monitor.avg()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(108)

本文整理了Java中com.jamonapi.Monitor.avg()方法的一些代码示例,展示了Monitor.avg()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Monitor.avg()方法的具体详情如下:
包路径:com.jamonapi.Monitor
类名称:Monitor
方法名:avg

Monitor.avg介绍

[英]Used due to the fact when activity tracking is turned on it goes through the jamon web filter and does a start, then turns on activity tracking and in stop performs a decrement (even though no increment was done in start) this results in potential negative values. Note this can't happen with the activity measure for this object as it is always enabled. it can only happen for primary and global active. note bigger numbers are also slightly off however the values won't be negative and will be consistently off by less than 1.
[中]之所以使用,是因为当“活动跟踪”打开时,它会通过jamon web筛选器进行启动,然后打开“活动跟踪”,并在“停止”中执行减量(即使在“开始”中没有执行增量),这会导致潜在的负值。注意,此对象的活动度量不能发生这种情况,因为它始终处于启用状态。这只能发生在主活动和全局活动的情况下。注:较大的数字也会略微偏离,但数值不会为负值,且始终偏离小于1。

代码示例

代码示例来源:origin: com.jamonapi/com.springsource.com.jamonapi

public double getAvg() {
  if (monData.enabled)
    return avg(monData.total);
  else
    return 0;
}

代码示例来源:origin: stevensouza/jamonapi

public double getAvg() {
  if (monData.enabled)
    return avg(monData.total);
  else
    return 0;
}

代码示例来源:origin: stevensouza/jamonapi

public double getAvgActive() {
  if (monData.enabled) {
    /* can be two ways to get active. For ranges thisActiveTotal is used and for nonranges totalActive is used.
     * This is because the ranges show how many of that range are active (thisActiveTotal) and totalActive
     * shows how many are active for the entire monitor
     */
    if (monData.trackActivity) {
      return avg(monData.thisActiveTotal);
    } else
      return avg(monData.totalActive);
  } else
    return 0;
}

代码示例来源:origin: com.jamonapi/com.springsource.com.jamonapi

public double getAvgActive() {
  if (monData.enabled) {
    // can be two ways to get active. For ranges
    // thisActiveTotal is used and for nonranges
    // totalActive is used.
    if (monData.trackActivity) {
      return avg(monData.thisActiveTotal);
    } else
      return avg(monData.totalActive);
  } else
    return 0;
}

代码示例来源:origin: com.jamonapi/com.springsource.com.jamonapi

public double getAvgGlobalActive() {
  return avg(monData.allActiveTotal);
}

代码示例来源:origin: stevensouza/jamonapi

/** Used due to the fact when activity tracking is turned on it goes through the jamon web filter and does a start,
 * then turns on activity tracking and in stop performs a decrement (even though no increment was done in start)
 * this results in potential negative values.  Note this can't happen with the activity measure for this object as it
 * is always enabled. it can only happen for primary and global active.  note bigger numbers are also slightly off
 * however the values won't be negative and will be consistently off by less than 1.
 * 
 * @param value
 * @return average
 */
private double avgNoNeg(double value) {
  double v=avg(value);
  return (v<=0) ? 0 : v;
}

代码示例来源:origin: com.jamonapi/com.springsource.com.jamonapi

public double getAvgPrimaryActive() {
  return avg(monData.primaryActiveTotal);
}

相关文章