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

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

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

Monitor.getUnits介绍

[英]Returns the units for the monitor
[中]返回监视器的单位

代码示例

代码示例来源:origin: org.patterntesting/patterntesting-rt

/**
 * Gets the units.
 *
 * @return units
 *
 * @see com.jamonapi.Monitor#getUnits()
 */
@Override
public String getUnits() {
  return monitor.getUnits();
}

代码示例来源:origin: net.sf.patterntesting/patterntesting-rt

/**
 * Gets the units.
 *
 * @return units
 *
 * @see com.jamonapi.Monitor#getUnits()
 */
public String getUnits() {
  return monitor.getUnits();
}

代码示例来源:origin: SmartDataAnalytics/DL-Learner

public static String convMonitorToString (Monitor m) {
  String retVal = m.getLabel()+"|\t";
  String unit = m.getUnits();
  retVal+=unit+"|\t";
  long content = new Double(m.getTotal()).longValue();
  content = content / (1000*1000);
  String contentstr = (unit.equals(MS))? Helper.prettyPrintNanoSeconds(content ) : m.getHits()+"" ;
  retVal+= "total:"+contentstr+"|\t";
  
  long avg = new Double(m.getAvg()).longValue();
  avg = avg / (1000*1000);
  String avgstr = (unit.equals(MS))? Helper.prettyPrintNanoSeconds(avg ) : avg+"" ;
  retVal+= "avg:"+avgstr+"|\t";
  
  return retVal;
}

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

return getLabel();
else if (MonKey.UNITS_HEADER.equalsIgnoreCase(key))
  return getUnits();
else
  return null;

代码示例来源:origin: org.patterntesting/patterntesting-rt

/**
 * To short string.
 *
 * @return the string
 * @see patterntesting.runtime.monitor.ProfileMonitor#toShortString()
 */
@Override
public String toShortString() {
  return "Hits=" + (long) monitor.getHits() + ", Avg=" + monitor.getAvg() + ", Total=" + monitor.getTotal()
      + ", Max=" + monitor.getMax() + ", Unit=" + monitor.getUnits();
}

代码示例来源:origin: net.sf.patterntesting/patterntesting-rt

/**
 * @see patterntesting.runtime.monitor.ProfileMonitor#toShortString()
 */
public String toShortString() {
  return "Hits=" + (long) monitor.getHits() + ", Avg=" + monitor.getAvg()
    + ", Total=" + monitor.getTotal() + ", Max=" + monitor.getMax()
    + ", Unit=" + monitor.getUnits();
}

代码示例来源:origin: org.wicketstuff/wicketstuff-jamon

/**
   * Construct.
   * 
   * @param id
   *            The id.
   * @param monitorLabel
   *            The label of the {@link Monitor} to show the details of.
   */
  public JamonMonitorDetailsPanel(String id, String monitorLabel)
  {
    super(id);
    setOutputMarkupId(true);
    final Monitor monitor = getApplication().getMetaData(MonitoringRepositoryKey.KEY)
      .findMonitorByLabel(monitorLabel);
    FrequencyDist[] frequencyDists = monitor.getRange().getFrequencyDists();
    add(new FrequencyListView(ID_OF_LIST_VIEW, asList(frequencyDists)));
    add(new Label(ID_OF_TITLE,
      format("Detail of Monitor %s in %s", monitorLabel, monitor.getUnits())));
  }
}

代码示例来源:origin: net.sf.patterntesting/patterntesting-rt

/**
 * @see patterntesting.runtime.monitor.ProfileMonitor#toCsvString()
 */
public String toCsvString() {
  return monitor.getLabel() + "; " + monitor.getUnits() + "; "
      + monitor.getLastValue() + "; " + (long) monitor.getHits()
      + "; " + monitor.getAvg() + "; " + monitor.getTotal() + "; "
      + monitor.getMin() + "; " + monitor.getMax() + "; "
      + monitor.getActive() + "; " + monitor.getAvgActive() + "; "
      + monitor.getMaxActive() + "; " + monitor.getFirstAccess()
      + "; " + monitor.getLastAccess() + ";";
}

代码示例来源:origin: org.patterntesting/patterntesting-rt

/**
 * To csv string.
 *
 * @return the string
 * @see patterntesting.runtime.monitor.ProfileMonitor#toCsvString()
 */
@Override
public String toCsvString() {
  return '"' + monitor.getLabel() + "\"; " + monitor.getUnits() + "; " + monitor.getLastValue() + "; "
      + (long) monitor.getHits() + "; " + monitor.getAvg() + "; " + monitor.getTotal() + "; "
      + monitor.getMin() + "; " + monitor.getMax() + "; " + monitor.getActive() + "; "
      + monitor.getAvgActive() + "; " + monitor.getMaxActive() + "; " + monitor.getFirstAccess() + "; "
      + monitor.getLastAccess() + ";";
}

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

public MonitorDelta(Monitor mon) {
  label = mon.getLabel();
  units = mon.getUnits();
  hits = mon.getHits();
  total = mon.getTotal();
  avg = mon.getAvg();
  min = mon.getMin();
  max = mon.getMax();
  stdDev = mon.getStdDev();
  firstAccess = mon.getFirstAccess();
  lastAccess = mon.getLastAccess();
  lastValue = mon.getLastValue();
  active = mon.getActive();
  maxActive = mon.getMaxActive();
  avgActive = mon.getAvgActive();
}

相关文章