geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ecr...@apache.org
Subject svn commit: r601401 - in /geronimo/sandbox/monitoring/client/client-war/src/main/java/org/apache/geronimo/plugins/monitoring/client: GraphsBuilder.java MRCConnector.java
Date Wed, 05 Dec 2007 16:35:39 GMT
Author: ecraig
Date: Wed Dec  5 08:35:39 2007
New Revision: 601401

URL: http://svn.apache.org/viewvc?rev=601401&view=rev
Log:
GERONIMO-3675
monitoring client incorrectly pads graph's statistics

Patch by Viet Nguyen

Modified:
    geronimo/sandbox/monitoring/client/client-war/src/main/java/org/apache/geronimo/plugins/monitoring/client/GraphsBuilder.java
    geronimo/sandbox/monitoring/client/client-war/src/main/java/org/apache/geronimo/plugins/monitoring/client/MRCConnector.java

Modified: geronimo/sandbox/monitoring/client/client-war/src/main/java/org/apache/geronimo/plugins/monitoring/client/GraphsBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/monitoring/client/client-war/src/main/java/org/apache/geronimo/plugins/monitoring/client/GraphsBuilder.java?rev=601401&r1=601400&r2=601401&view=diff
==============================================================================
--- geronimo/sandbox/monitoring/client/client-war/src/main/java/org/apache/geronimo/plugins/monitoring/client/GraphsBuilder.java
(original)
+++ geronimo/sandbox/monitoring/client/client-war/src/main/java/org/apache/geronimo/plugins/monitoring/client/GraphsBuilder.java
Wed Dec  5 08:35:39 2007
@@ -101,11 +101,10 @@
                     snapCount = 17;
                 else
                 {
-                    if (((timeFrame / 1440) <= 7) && ((timeFrame / 60) > 24)
-                            && snapCount >= 14)
-                    {
-                        if ((timeFrame / 1440) == 7)
-                            snapCount = 16;
+                    if (((timeFrame / 1440) == 7) && ((timeFrame / 60) > 24) &&
snapCount >= 14) {
+                        snapCount = 16;
+                    } else {
+                        snapCount = 12; // default for anything else
                     }
                 }
 

Modified: geronimo/sandbox/monitoring/client/client-war/src/main/java/org/apache/geronimo/plugins/monitoring/client/MRCConnector.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/monitoring/client/client-war/src/main/java/org/apache/geronimo/plugins/monitoring/client/MRCConnector.java?rev=601401&r1=601400&r2=601401&view=diff
==============================================================================
--- geronimo/sandbox/monitoring/client/client-war/src/main/java/org/apache/geronimo/plugins/monitoring/client/MRCConnector.java
(original)
+++ geronimo/sandbox/monitoring/client/client-war/src/main/java/org/apache/geronimo/plugins/monitoring/client/MRCConnector.java
Wed Dec  5 08:35:39 2007
@@ -352,15 +352,15 @@
             Long tempLong2 = tempArray.get(i - 1);
             // here is where we will in missing data
             while (((((Long) tempLong1 / 1000) / 60)
-                    - (((Long) tempLong2 / 1000) / 60) > (((getSnapshotDuration() / 1000)
/ 60) * skipCount)))
+                    - (((Long) tempLong2 / 1000) / 60) > (((getSnapshotDuration() / 1000)
/ 60) * skipCount))
+                    && i > 0)
             {
 
-                tempLong1 = tempLong1
-                        - (getSnapshotDuration() * skipCount);
-                snapshotList.put(tempLong1, new Long(0));
+                tempLong1 = tempLong1 - (getSnapshotDuration() * skipCount);
                 snapshotList.remove(tempArray.get(0));
+                snapshotList.put(tempLong1, new Long(0));
                 tempArray.remove(0);
-                tempLong2 = tempArray.get(i - 1);
+                i--;
             }
         }
         return snapshotList;



Mime
View raw message