/** * Gets the last value. * * @return last value * * @see com.jamonapi.Monitor#getLastValue() */ public double getLastValue() { return monitor.getLastValue(); }
/** * Gets the last value. * * @return last value * * @see com.jamonapi.Monitor#getLastValue() */ @Override public double getLastValue() { return monitor.getLastValue(); }
/** Pass in list and add monitor data to the end of it */ public Object[] getData(List dataList, Monitor mon) { dataList.add(new Double(mon.getLastValue())); dataList.add(new Double(mon.getActive())); dataList.add(mon.getLastAccess()); return dataList.toArray(); }
/** Return an array with spaces for the values in header and values populated for monitor data - last value, active and last access */ public Object[] getData(Monitor mon) { Object[] retData=new Object[header.length];// all but the 2 values will be null and will be replaced by caller. retData[lastValueIndex]=new Double(mon.getLastValue()); retData[activeIndex]=new Double(mon.getActive()); retData[dateIndex]=mon.getLastAccess(); return retData; }
public double getLastValue() { Date date=getLastAccess(); for (int i=0;i<numRows;i++) { if (date.compareTo(monitors[i].getLastAccess())>=0) // date>=getLastAccess) return monitors[i].getLastValue(); } return 0; }
@Override public double getLastValue() { Date date=getLastAccess(); for (int i=0;i<numRows;i++) { if (date.compareTo(monitors[i].getLastAccess())>=0) // date>=getLastAccess) return monitors[i].getLastValue(); } return 0; }
/** Ranges are implemented as JAMonListeners */ public void processEvent(Monitor mon) { double value=mon.getLastValue(); getFrequencyDist(value).add(value); }
/** Ranges are implemented as JAMonListeners */ public void processEvent(Monitor mon) { double value=mon.getLastValue(); getFrequencyDist(value).add(value); }
b.append(getMonKey() + ": ("); b.append("LastValue="); b.append(getLastValue()); b.append(", Hits="); b.append(getHits());
b.append(getMonKey() + ": ("); b.append("LastValue="); b.append(getLastValue()); b.append(", Hits="); b.append(getHits());
return new Double(getStdDev()); else if (VALUE.equalsIgnoreCase(key) || LASTVALUE.equalsIgnoreCase(key)) return new Double(getLastValue()); else if (LASTACCESS.equalsIgnoreCase(key)) return getLastAccess();
templates = templateGenerator.buildTemplates(question); monitor.stop(); logger.trace("Done in " + monitor.getLastValue() + "ms."); if(templates.isEmpty()){ throw new NoTemplateFoundException(); Map<Template, Map<Slot, Collection<Entity>>> template2Allocations = entityDisambiguation.performEntityDisambiguation(templates); monitor.stop(); logger.trace("Done in " + monitor.getLastValue() + "ms."); Map<Template, List<TemplateInstantiation>> template2Instantiations = instantiateTemplates(template2Allocations); monitor.stop(); logger.trace("Done in " + monitor.getLastValue() + "ms."); Ranking ranking = rankingComputation.computeRanking(template2Instantiations, template2Allocations, parameters); monitor.stop(); logger.trace("Done in " + monitor.getLastValue() + "ms.");
private void runIterative() { // get the candidates Set<OWLClass> candidates = reasoner.getNonEmptyOWLClasses(); // check for each candidate how often the subject belongs to it int i = 1; Monitor mon = MonitorFactory.getTimeMonitor("dom-class-time"); for (OWLClass candidate : candidates) { mon.start(); logger.debug("Candidate:" + candidate); progressMonitor.learningProgressChanged(axiomType, i++, candidates.size()); // get total number of instances of B int cntB = reasoner.getPopularity(candidate); if(cntB == 0){// skip empty classes logger.debug("Cannot compute domain statements for empty candidate class " + candidate); continue; } // get number of instances of (A AND B) SUBJECTS_OF_TYPE_COUNT_QUERY.setIri("type", candidate.toStringID()); int cntAB = executeSelectQuery(SUBJECTS_OF_TYPE_COUNT_QUERY.toString()).next().getLiteral("cnt").getInt(); logger.debug("Candidate:" + candidate + "\npopularity:" + cntB + "\noverlap:" + cntAB); // compute score AxiomScore score = computeScore(popularity, cntB, cntAB); currentlyBestAxioms.add( new EvaluatedAxiom<>( df.getOWLObjectPropertyDomainAxiom(entityToDescribe, candidate), score)); mon.stop(); logger.debug(candidate + " analyzed in " + mon.getLastValue()); } }
public FinalizedMonitor(Monitor m){ header = (String)m.getMonKey().getValue(MonKey.LABEL_HEADER); units = (String)m.getMonKey().getValue(MonKey.UNITS_HEADER); avg = m.getAvg(); hits = m.getHits(); stdDev = m.getStdDev(); lastValue = m.getLastValue(); max = m.getMax(); min = m.getMin(); total = m.getTotal(); }
Model cbd = cbdGen.getConciseBoundedDescription(resource, maxTreeDepth); mon.stop(); logger.info("got {} triples in {}ms.", cbd.size(), mon.getLastValue()); RDFResourceTree tree = queryTreeFactory.getQueryTree(resource, cbd, maxTreeDepth); mon.stop(); logger.info("generating query tree for {} took {}ms.", resource, mon.getLastValue());
Model cbd = cbdGen.getConciseBoundedDescription(resource, cbdStructure); mon.stop(); logger.info("got {} triples in {}ms.", cbd.size(), mon.getLastValue()); RDFResourceTree tree = queryTreeFactory.getQueryTree(resource, cbd, maxTreeDepth); mon.stop(); logger.info("generating query tree for {} took {}ms.", resource, mon.getLastValue());
/** * @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() + ";"; }
/** * 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() + ";"; }
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(); }
String message = name + " execution time: " + mon.stop().getLastValue(); System.out.println(message);