Skip to content

Commit

Permalink
- Corrected arithmetic error affecting pollsCompletedPerSec and,
Browse files Browse the repository at this point in the history
  on RRD-based installs, metricsPersistedPerSec
- Bumped version to 1.3
  • Loading branch information
Jeff Gehlbach committed Aug 23, 2021
1 parent 4229e26 commit 1d0f81e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.opennms.tools</groupId>
<artifactId>brannock</artifactId>
<version>1.1</version>
<version>1.3</version>
<name>OpenNMS Features Brannock</name>
<packaging>bundle</packaging>
<build>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/opennms/netmgt/brannock/Brannock.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ private Double derivePollsPerSec() {
if (m_vmUptime != null &&
m_vmUptime != 0 &&
m_pollerTasksCompleted != null) {
pps = m_pollerTasksCompleted.doubleValue() / m_vmUptime.doubleValue() / 1000.0;
pps = m_pollerTasksCompleted.doubleValue() * 1000.0 / m_vmUptime.doubleValue();
} else {
pps = Double.MIN_VALUE;
}
Expand All @@ -148,7 +148,7 @@ private Double deriveMetricsPerSec() {
} else if (m_vmUptime != null &&
m_enqueuedOps != null &&
m_enqueuedOps > 0) {
mps = m_enqueuedOps.doubleValue() / m_vmUptime.doubleValue() / 1000.0;
mps = m_enqueuedOps.doubleValue() * 1000.0 / m_vmUptime.doubleValue();
} else if (m_enqueuedOps == 0) {
mps = new Double(0);
} else {
Expand Down

0 comments on commit 1d0f81e

Please sign in to comment.