Skip to content

Commit

Permalink
fix(RPM): correct average RPM calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
peteyycz authored and gergelyke committed Nov 17, 2015
1 parent ce3e36c commit 24d2d1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/providers/httpTransaction/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ HttpTransaction.prototype.onServerSend = function (data) {
};

HttpTransaction.prototype.calculateAvgResponseTime = function (responseTime) {
return (this.avgResponseTime * this.avgRequestCount) +
responseTime / this.avgRequestCount++ || null;
return ((this.avgResponseTime * this.avgRequestCount) +
responseTime) / ++this.avgRequestCount || null;
};

HttpTransaction.prototype.collectStatusCode = function (trace) {
Expand Down

0 comments on commit 24d2d1e

Please sign in to comment.