From 701d8852226068a99397c01a8213b97c1370c52f Mon Sep 17 00:00:00 2001 From: Jamie Doornbos Date: Wed, 9 Sep 2009 23:59:02 +0000 Subject: [PATCH] Keep track of the total number of units run independently of Stats so it is not reset every 3 minutes by pulse. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5941 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/presents/server/ReportingInvoker.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/java/com/threerings/presents/server/ReportingInvoker.java b/src/java/com/threerings/presents/server/ReportingInvoker.java index 9b1768f22..a737166e8 100644 --- a/src/java/com/threerings/presents/server/ReportingInvoker.java +++ b/src/java/com/threerings/presents/server/ReportingInvoker.java @@ -82,6 +82,7 @@ public class ReportingInvoker extends Invoker _current.maxQueueSize = queueSize; } _current.unitsRun++; + _totalUnitsRun++; // note the currently invoking unit _currentUnit = unit; @@ -111,6 +112,7 @@ public class ReportingInvoker extends Invoker Stats stats = getStats(reset); buf.append("- Max queue size: ").append(stats.maxQueueSize).append("\n"); buf.append("- Units executed: ").append(stats.unitsRun); + buf.append("- Total units executed: ").append(_totalUnitsRun); long runPerSec = stats.unitsRun/Math.max(1, sinceLast/1000); buf.append(" (").append(runPerSec).append("/s)\n"); if (_currentUnit != null) { @@ -147,6 +149,9 @@ public class ReportingInvoker extends Invoker /** Used to track runtime statistics. */ protected Stats _recent = new Stats(), _current = _recent; + /** The total number of units run. */ + protected int _totalUnitsRun; + /** Records the currently invoking unit. */ protected Object _currentUnit;