/** * {@inheritDoc} */ @Override public void gather() { // The timestamp is set in the {@link CpuInformation#reset()} to avoid multiple renewal. It // will not be set on the first execution of {@link CpuInformation#gather()}, but shortly // before. float cpuUsage = this.getOsBean().retrieveCpuUsage(); long cpuTime = this.getOsBean().getProcessCpuTime(); this.cpuInformationData.incrementCount(); this.cpuInformationData.updateProcessCpuTime(cpuTime); this.cpuInformationData.addCpuUsage(cpuUsage); if (cpuUsage < this.cpuInformationData.getMinCpuUsage()) { this.cpuInformationData.setMinCpuUsage(cpuUsage); } if (cpuUsage > this.cpuInformationData.getMaxCpuUsage()) { this.cpuInformationData.setMaxCpuUsage(cpuUsage); } }