use of com.axway.ats.common.performance.monitor.beans.BasicReadingBean in project ats-framework by Axway.
the class AtsSystemMonitor method pollReadingInstances.
private List<BasicReadingBean> pollReadingInstances(List<ReadingInstance> readingInstances) throws Exception {
List<BasicReadingBean> redingsResult = new ArrayList<BasicReadingBean>();
for (ReadingInstance readingInstance : readingInstances) {
float value = readingInstance.poll();
BasicReadingBean newResult;
if (readingInstance.isNewInstance()) {
readingInstance.setNewInstanceFlag(false);
// the Test Executor needs to be informed about this reading instance
// we pass back a Full Reading Bean
newResult = readingInstance.getNewCopy();
} else {
// the Test Executor is already aware we are collecting data about this reading instance
newResult = new BasicReadingBean();
newResult.setId(readingInstance.getId());
}
newResult.setValue(String.valueOf(value));
redingsResult.add(newResult);
}
return redingsResult;
}
use of com.axway.ats.common.performance.monitor.beans.BasicReadingBean in project ats-framework by Axway.
the class AtsJvmMonitor method pollReadingInstances.
private List<BasicReadingBean> pollReadingInstances(List<JvmReadingInstance> readingInstances) throws Exception {
List<BasicReadingBean> redingsResult = new ArrayList<BasicReadingBean>();
for (JvmReadingInstance readingInstance : readingInstances) {
float value = readingInstance.poll();
BasicReadingBean newResult;
if (readingInstance.isNewInstance()) {
readingInstance.setNewInstanceFlag(false);
// the Test Executor needs to be informed about this reading instance
// we pass back a Full Reading Bean
newResult = readingInstance.getNewCopy();
} else {
// the Test Executor is already aware we are collecting data about this reading instance
newResult = new BasicReadingBean();
newResult.setId(readingInstance.getId());
}
newResult.setValue(String.valueOf(value));
redingsResult.add(newResult);
}
return redingsResult;
}
Aggregations