commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1509574 - in /commons/sandbox/monitoring/trunk: aop/src/main/java/org/apache/commons/monitoring/aop/ aop/src/test/java/org/apache/commons/monitoring/aop/ aspectj/src/test/java/org/apache/commons/monitoring/aspectj/ cdi/src/test/java/org/ap...
Date Fri, 02 Aug 2013 07:42:16 GMT
Author: rmannibucau
Date: Fri Aug  2 07:42:15 2013
New Revision: 1509574

URL: http://svn.apache.org/r1509574
Log:
adding gauge concept (= way to get a measure)

Added:
    commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/Role.java
      - copied, changed from r1509549, commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counter/Role.java
    commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counters/
      - copied from r1509549, commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counter/
    commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/gauges/
    commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/gauges/DefaultGaugeRepository.java
    commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/gauges/Gauge.java
    commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/gauges/GaugeRepository.java
    commons/sandbox/monitoring/trunk/core/src/test/java/org/apache/commons/monitoring/counters/
      - copied from r1509549, commons/sandbox/monitoring/trunk/core/src/test/java/org/apache/commons/monitoring/counter/
    commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/listener/
    commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/listener/CleanupListener.java
    commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/jvm/CPUGauge.java
    commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/jvm/MemoryGauge.java
    commons/sandbox/monitoring/trunk/reporting/src/main/resources/META-INF/services/org.apache.commons.monitoring.gauges.Gauge
Removed:
    commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counter/
    commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counters/Role.java
    commons/sandbox/monitoring/trunk/core/src/test/java/org/apache/commons/monitoring/counter/
Modified:
    commons/sandbox/monitoring/trunk/aop/src/main/java/org/apache/commons/monitoring/aop/AbstractPerformanceInterceptor.java
    commons/sandbox/monitoring/trunk/aop/src/test/java/org/apache/commons/monitoring/aop/MonitoringProxyFactoryTest.java
    commons/sandbox/monitoring/trunk/aspectj/src/test/java/org/apache/commons/monitoring/aspectj/AspectJMonitoringTest.java
    commons/sandbox/monitoring/trunk/cdi/src/test/java/org/apache/commons/monitoring/cdi/CommonsMonitoringInterceptorTest.java
    commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/configuration/Configuration.java
    commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counters/Counter.java
    commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counters/DefaultCounter.java
    commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counters/Unit.java
    commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counters/queuemanager/DefaultMetricQueueManager.java
    commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counters/queuemanager/MetricQueueManager.java
    commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/repositories/DefaultRepository.java
    commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/repositories/Repository.java
    commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/stopwatches/CounterStopWatch.java
    commons/sandbox/monitoring/trunk/core/src/test/java/org/apache/commons/monitoring/UnitTest.java
    commons/sandbox/monitoring/trunk/core/src/test/java/org/apache/commons/monitoring/counters/CounterBench.java
    commons/sandbox/monitoring/trunk/jdbc/src/main/java/org/apache/commons/monitoring/jdbc/MonitoredConnection.java
    commons/sandbox/monitoring/trunk/jdbc/src/main/java/org/apache/commons/monitoring/jdbc/MonitoredDataSource.java
    commons/sandbox/monitoring/trunk/jdbc/src/main/java/org/apache/commons/monitoring/jdbc/MonitoredPreparedStatement.java
    commons/sandbox/monitoring/trunk/jdbc/src/main/java/org/apache/commons/monitoring/jdbc/MonitoredStatement.java
    commons/sandbox/monitoring/trunk/jdbc/src/main/java/org/apache/commons/monitoring/jdbc/MonitoringDriver.java
    commons/sandbox/monitoring/trunk/jdbc/src/test/java/org/apache/commons/monitoring/jdbc/HsqlDBTest.java
    commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/PluginRepository.java
    commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/jvm/JVMHandler.java
    commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/jvm/JVMPlugin.java
    commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/CSVFormat.java
    commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/HTMLFormat.java
    commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/JSONFormat.java
    commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/MapFormat.java
    commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/MetricData.java
    commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/XMLFormat.java
    commons/sandbox/monitoring/trunk/reporting/src/main/resources/META-INF/services/org.apache.commons.monitoring.reporting.web.plugin.Plugin
    commons/sandbox/monitoring/trunk/reporting/src/main/resources/templates/jvm/jvm.vm
    commons/sandbox/monitoring/trunk/reporting/src/main/webapp/WEB-INF/web.xml
    commons/sandbox/monitoring/trunk/reporting/src/test/java/org/apache/commons/monitoring/reporting/FormatsTest.java
    commons/sandbox/monitoring/trunk/spring/src/test/java/org/apache/commons/monitoring/spring/SpringMonitoringTest.java
    commons/sandbox/monitoring/trunk/src/site/xdoc/web.xml
    commons/sandbox/monitoring/trunk/web/src/main/java/org/apache/commons/monitoring/web/jsp/StartTag.java
    commons/sandbox/monitoring/trunk/web/src/main/java/org/apache/commons/monitoring/web/servlet/MonitoringFilter.java

Modified: commons/sandbox/monitoring/trunk/aop/src/main/java/org/apache/commons/monitoring/aop/AbstractPerformanceInterceptor.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/aop/src/main/java/org/apache/commons/monitoring/aop/AbstractPerformanceInterceptor.java?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/aop/src/main/java/org/apache/commons/monitoring/aop/AbstractPerformanceInterceptor.java (original)
+++ commons/sandbox/monitoring/trunk/aop/src/main/java/org/apache/commons/monitoring/aop/AbstractPerformanceInterceptor.java Fri Aug  2 07:42:15 2013
@@ -17,8 +17,8 @@
 
 package org.apache.commons.monitoring.aop;
 
-import org.apache.commons.monitoring.counter.Role;
-import org.apache.commons.monitoring.counter.Counter;
+import org.apache.commons.monitoring.Role;
+import org.apache.commons.monitoring.counters.Counter;
 import org.apache.commons.monitoring.repositories.Repository;
 import org.apache.commons.monitoring.stopwatches.StopWatch;
 

Modified: commons/sandbox/monitoring/trunk/aop/src/test/java/org/apache/commons/monitoring/aop/MonitoringProxyFactoryTest.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/aop/src/test/java/org/apache/commons/monitoring/aop/MonitoringProxyFactoryTest.java?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/aop/src/test/java/org/apache/commons/monitoring/aop/MonitoringProxyFactoryTest.java (original)
+++ commons/sandbox/monitoring/trunk/aop/src/test/java/org/apache/commons/monitoring/aop/MonitoringProxyFactoryTest.java Fri Aug  2 07:42:15 2013
@@ -16,8 +16,8 @@
  */
 package org.apache.commons.monitoring.aop;
 
-import org.apache.commons.monitoring.counter.Role;
-import org.apache.commons.monitoring.counter.Counter;
+import org.apache.commons.monitoring.Role;
+import org.apache.commons.monitoring.counters.Counter;
 import org.apache.commons.monitoring.repositories.Repository;
 import org.junit.Test;
 

Modified: commons/sandbox/monitoring/trunk/aspectj/src/test/java/org/apache/commons/monitoring/aspectj/AspectJMonitoringTest.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/aspectj/src/test/java/org/apache/commons/monitoring/aspectj/AspectJMonitoringTest.java?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/aspectj/src/test/java/org/apache/commons/monitoring/aspectj/AspectJMonitoringTest.java (original)
+++ commons/sandbox/monitoring/trunk/aspectj/src/test/java/org/apache/commons/monitoring/aspectj/AspectJMonitoringTest.java Fri Aug  2 07:42:15 2013
@@ -16,8 +16,8 @@
  */
 package org.apache.commons.monitoring.aspectj;
 
-import org.apache.commons.monitoring.counter.Role;
-import org.apache.commons.monitoring.counter.Counter;
+import org.apache.commons.monitoring.Role;
+import org.apache.commons.monitoring.counters.Counter;
 import org.apache.commons.monitoring.repositories.Repository;
 import org.junit.Test;
 

Modified: commons/sandbox/monitoring/trunk/cdi/src/test/java/org/apache/commons/monitoring/cdi/CommonsMonitoringInterceptorTest.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/cdi/src/test/java/org/apache/commons/monitoring/cdi/CommonsMonitoringInterceptorTest.java?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/cdi/src/test/java/org/apache/commons/monitoring/cdi/CommonsMonitoringInterceptorTest.java (original)
+++ commons/sandbox/monitoring/trunk/cdi/src/test/java/org/apache/commons/monitoring/cdi/CommonsMonitoringInterceptorTest.java Fri Aug  2 07:42:15 2013
@@ -16,8 +16,8 @@
  */
 package org.apache.commons.monitoring.cdi;
 
-import org.apache.commons.monitoring.counter.Role;
-import org.apache.commons.monitoring.counter.Counter;
+import org.apache.commons.monitoring.Role;
+import org.apache.commons.monitoring.counters.Counter;
 import org.apache.commons.monitoring.repositories.Repository;
 import org.apache.webbeans.cditest.CdiTestContainer;
 import org.apache.webbeans.cditest.CdiTestContainerLoader;

Copied: commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/Role.java (from r1509549, commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counter/Role.java)
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/Role.java?p2=commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/Role.java&p1=commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counter/Role.java&r1=1509549&r2=1509574&rev=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counter/Role.java (original)
+++ commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/Role.java Fri Aug  2 07:42:15 2013
@@ -15,9 +15,11 @@
  * limitations under the License.
  */
 
-package org.apache.commons.monitoring.counter;
+package org.apache.commons.monitoring;
 
-import static org.apache.commons.monitoring.counter.Unit.Time.NANOSECOND;
+import org.apache.commons.monitoring.counters.Unit;
+
+import static org.apache.commons.monitoring.counters.Unit.Time.NANOSECOND;
 
 /**
  * As a monitored resource may have multipe Metrics, each one has a dedicated 'role' that

Modified: commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/configuration/Configuration.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/configuration/Configuration.java?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/configuration/Configuration.java (original)
+++ commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/configuration/Configuration.java Fri Aug  2 07:42:15 2013
@@ -83,7 +83,7 @@ public final class Configuration {
                 if (m.getAnnotation(Created.class) != null) {
                     m.invoke(instance);
                 } else if (m.getAnnotation(Destroying.class) != null) {
-                    if (shutdownHook == null == is(COMMONS_MONITORING_PREFIX + ".shutdown.hook", false)) {
+                    if (shutdownHook == null == is(COMMONS_MONITORING_PREFIX + ".shutdown.hook", true)) {
                         shutdownHook = new Thread() {
                             @Override
                             public void run() {
@@ -106,6 +106,10 @@ public final class Configuration {
         return Boolean.parseBoolean(getProperty(key, Boolean.toString(defaultValue)));
     }
 
+    public static int getInteger(final String key, final int defaultValue) {
+        return Integer.parseInt(getProperty(key, Integer.toString(defaultValue)));
+    }
+
     public static String getProperty(final String key, final String defaultValue) {
         return PROPERTIES.getProperty(key, defaultValue);
     }

Modified: commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counters/Counter.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counters/Counter.java?rev=1509574&r1=1509549&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counters/Counter.java (original)
+++ commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counters/Counter.java Fri Aug  2 07:42:15 2013
@@ -15,7 +15,9 @@
  * limitations under the License.
  */
 
-package org.apache.commons.monitoring.counter;
+package org.apache.commons.monitoring.counters;
+
+import org.apache.commons.monitoring.Role;
 
 import java.util.concurrent.atomic.AtomicInteger;
 

Modified: commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counters/DefaultCounter.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counters/DefaultCounter.java?rev=1509574&r1=1509549&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counters/DefaultCounter.java (original)
+++ commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counters/DefaultCounter.java Fri Aug  2 07:42:15 2013
@@ -14,11 +14,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.monitoring.counter;
+package org.apache.commons.monitoring.counters;
 
 import org.apache.commons.math.stat.descriptive.SummaryStatistics;
 import org.apache.commons.monitoring.configuration.Configuration;
-import org.apache.commons.monitoring.counter.queuemanager.MetricQueueManager;
+import org.apache.commons.monitoring.counters.queuemanager.MetricQueueManager;
 
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.locks.Lock;

Modified: commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counters/Unit.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counters/Unit.java?rev=1509574&r1=1509549&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counters/Unit.java (original)
+++ commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counters/Unit.java Fri Aug  2 07:42:15 2013
@@ -15,7 +15,7 @@
  * limitations under the License.
  */
 
-package org.apache.commons.monitoring.counter;
+package org.apache.commons.monitoring.counters;
 
 import java.util.ArrayList;
 import java.util.Collections;

Modified: commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counters/queuemanager/DefaultMetricQueueManager.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counters/queuemanager/DefaultMetricQueueManager.java?rev=1509574&r1=1509549&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counters/queuemanager/DefaultMetricQueueManager.java (original)
+++ commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counters/queuemanager/DefaultMetricQueueManager.java Fri Aug  2 07:42:15 2013
@@ -14,10 +14,10 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.monitoring.counter.queuemanager;
+package org.apache.commons.monitoring.counters.queuemanager;
 
-import org.apache.commons.monitoring.counter.Counter;
-import org.apache.commons.monitoring.counter.DefaultCounter;
+import org.apache.commons.monitoring.counters.Counter;
+import org.apache.commons.monitoring.counters.DefaultCounter;
 
 import java.util.concurrent.locks.Lock;
 
@@ -45,7 +45,7 @@ import com.lmax.disruptor.RingBuffer;
 import com.lmax.disruptor.SleepingWaitStrategy;
 import com.lmax.disruptor.dsl.Disruptor;
 import com.lmax.disruptor.dsl.ProducerType;
-import org.apache.commons.monitoring.counter.DefaultCounter;
+import org.apache.commons.monitoring.counters.DefaultCounter;
 import org.apache.commons.monitoring.util.DaemonThreadFactory;
 
 import java.io.IOException;

Modified: commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counters/queuemanager/MetricQueueManager.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counters/queuemanager/MetricQueueManager.java?rev=1509574&r1=1509549&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counters/queuemanager/MetricQueueManager.java (original)
+++ commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/counters/queuemanager/MetricQueueManager.java Fri Aug  2 07:42:15 2013
@@ -14,9 +14,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.monitoring.counter.queuemanager;
+package org.apache.commons.monitoring.counters.queuemanager;
 
-import org.apache.commons.monitoring.counter.Counter;
+import org.apache.commons.monitoring.counters.Counter;
 
 public interface MetricQueueManager {
     void add(Counter baseMetrics, double delta);

Added: commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/gauges/DefaultGaugeRepository.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/gauges/DefaultGaugeRepository.java?rev=1509574&view=auto
==============================================================================
--- commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/gauges/DefaultGaugeRepository.java (added)
+++ commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/gauges/DefaultGaugeRepository.java Fri Aug  2 07:42:15 2013
@@ -0,0 +1,123 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.monitoring.gauges;
+
+import org.apache.commons.monitoring.Role;
+import org.apache.commons.monitoring.configuration.Configuration;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.ServiceLoader;
+import java.util.Timer;
+import java.util.TimerTask;
+import java.util.concurrent.ConcurrentHashMap;
+
+public final class DefaultGaugeRepository implements GaugeRepository {
+    private static final int MAX_SIZE = Configuration.getInteger(Configuration.COMMONS_MONITORING_PREFIX + "gauge.max-size", 150000);
+
+    private final Map<Role, Timer> timers = new ConcurrentHashMap<Role, Timer>();
+    private final Map<Role, FixedSizedMap> values = new ConcurrentHashMap<Role, FixedSizedMap>();
+
+    @Override
+    public void start(final Map<Role, Map<Long, Double>> initialData) {
+        if (initialData != null) {
+            for (final Map.Entry<Role, Map<Long, Double>> entry : initialData.entrySet()) {
+                values.put(entry.getKey(), new FixedSizedMap(entry.getValue()));
+            }
+        }
+
+        startFoundGaugeTimers();
+    }
+
+    @Override
+    public void stop() {
+        for (final Timer timer : timers.values()) {
+            timer.cancel();
+        }
+        timers.clear();
+    }
+
+    @Override
+    public Map<Long, Double> getValues(final Role role) {
+        return values.get(role).copy();
+    }
+
+    protected void startFoundGaugeTimers() {
+        for (final Gauge gauge : findGauges()) {
+            final Role role = gauge.role();
+
+            final FixedSizedMap gaugeValues = new FixedSizedMap();
+            this.values.put(role, gaugeValues);
+
+            final Timer timer = new Timer("gauge-" + role.getName() + "-timer", true);
+            timers.put(role, timer);
+            timer.scheduleAtFixedRate(new GaugeTask(gauge, gaugeValues), 0, gauge.period());
+        }
+    }
+
+    protected ServiceLoader<Gauge> findGauges() {
+        // core (where gauge is) is often in an upper classloader so don't use Gauge classloader
+        return ServiceLoader.load(Gauge.class, Thread.currentThread().getContextClassLoader());
+    }
+
+    @Override
+    public void stopGauge(final Role role) {
+        final Timer timer = timers.get(role);
+        if (timer != null) {
+            timer.cancel();
+        }
+    }
+
+    private static class GaugeTask extends TimerTask {
+        private final Gauge gauge;
+        private final FixedSizedMap values;
+
+        public GaugeTask(final Gauge gauge, FixedSizedMap values) {
+            this.gauge = gauge;
+            this.values = values;
+        }
+
+        @Override
+        public void run() {
+            values.add(gauge.value());
+        }
+    }
+
+    // no perf issues here normally since add is called not that often
+    protected static class FixedSizedMap extends LinkedHashMap<Long, Double> {
+        protected FixedSizedMap() {
+            super(MAX_SIZE);
+        }
+
+        protected FixedSizedMap(final Map<Long, Double> value) {
+            super(value);
+        }
+
+        public synchronized void add(final double value) {
+            put(System.nanoTime(), value);
+        }
+
+        @Override
+        protected boolean removeEldestEntry(final Map.Entry<Long, Double> eldest) {
+            return size() > MAX_SIZE;
+        }
+
+        public synchronized Map<Long, Double> copy() {
+            return Map.class.cast(super.clone());
+        }
+    }
+}

Added: commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/gauges/Gauge.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/gauges/Gauge.java?rev=1509574&view=auto
==============================================================================
--- commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/gauges/Gauge.java (added)
+++ commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/gauges/Gauge.java Fri Aug  2 07:42:15 2013
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.monitoring.gauges;
+
+import org.apache.commons.monitoring.Role;
+
+public interface Gauge {
+    Role role();
+    double value();
+    long period();
+}

Added: commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/gauges/GaugeRepository.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/gauges/GaugeRepository.java?rev=1509574&view=auto
==============================================================================
--- commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/gauges/GaugeRepository.java (added)
+++ commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/gauges/GaugeRepository.java Fri Aug  2 07:42:15 2013
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.monitoring.gauges;
+
+import org.apache.commons.monitoring.Role;
+
+import java.util.Map;
+
+public interface GaugeRepository {
+    void start(Map<Role, Map<Long, Double>> initialData);
+
+    void stop();
+
+    Map<Long, Double> getValues(Role role);
+
+    void stopGauge(Role role);
+}

Modified: commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/repositories/DefaultRepository.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/repositories/DefaultRepository.java?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/repositories/DefaultRepository.java (original)
+++ commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/repositories/DefaultRepository.java Fri Aug  2 07:42:15 2013
@@ -17,18 +17,34 @@
 
 package org.apache.commons.monitoring.repositories;
 
-import org.apache.commons.monitoring.counter.Counter;
-import org.apache.commons.monitoring.counter.DefaultCounter;
+import org.apache.commons.monitoring.Role;
+import org.apache.commons.monitoring.configuration.Configuration;
+import org.apache.commons.monitoring.counters.Counter;
+import org.apache.commons.monitoring.counters.DefaultCounter;
+import org.apache.commons.monitoring.gauges.DefaultGaugeRepository;
 import org.apache.commons.monitoring.stopwatches.CounterStopWatch;
 import org.apache.commons.monitoring.stopwatches.StopWatch;
 
 import java.util.Iterator;
+import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 
 public class DefaultRepository implements Repository {
+    private final DefaultGaugeRepository gaugeRepository = new DefaultGaugeRepository();
     private final ConcurrentMap<Counter.Key, Counter> counters = new ConcurrentHashMap<Counter.Key, Counter>(50);
 
+    @Configuration.Created
+    public void startGaugeTimers() {
+        gaugeRepository.start(null); // no persistence
+    }
+
+    @Configuration.Destroying
+    public void stopGaugeTimers() {
+        gaugeRepository.stop();
+    }
+
+    @Override
     public Counter getCounter(final Counter.Key key) {
         Counter monitor = counters.get(key);
         if (monitor == null) {
@@ -55,4 +71,14 @@ public class DefaultRepository implement
     public Iterator<Counter> iterator() {
         return counters.values().iterator();
     }
+
+    @Override
+    public Map<Long, Double> getGaugeValues(final Role role) {
+        return gaugeRepository.getValues(role);
+    }
+
+    @Override
+    public void stopGauge(final Role role) {
+        gaugeRepository.stopGauge(role);
+    }
 }

Modified: commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/repositories/Repository.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/repositories/Repository.java?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/repositories/Repository.java (original)
+++ commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/repositories/Repository.java Fri Aug  2 07:42:15 2013
@@ -17,34 +17,23 @@
 
 package org.apache.commons.monitoring.repositories;
 
+import org.apache.commons.monitoring.Role;
 import org.apache.commons.monitoring.configuration.Configuration;
-import org.apache.commons.monitoring.counter.Counter;
+import org.apache.commons.monitoring.counters.Counter;
 import org.apache.commons.monitoring.stopwatches.StopWatch;
 
-/**
- * The repository maintains a set of monitors and ensure unicity. It creates monitors on-demand
- * based on requested Keys. After creation, the counter Key cannot be updated.
- *
- * @author <a href="mailto:nicolas@apache.org">Nicolas De Loof</a>
- */
+import java.util.Map;
+
 public interface Repository extends Iterable<Counter> {
     static final Repository INSTANCE = Configuration.newInstance(Repository.class);
 
-    /**
-     * Retrieve or create a counter it's key
-     */
     Counter getCounter(Counter.Key key);
 
-    /**
-     * Reset the repository : all existing monitors are destroyed and data are lost.
-     */
     void clear();
 
-    /**
-     * Start a StopWatch to counter execution
-     *
-     * @param counter the counter associated with the process
-     * @return a running StopWatch
-     */
     StopWatch start(Counter counter);
+
+    Map<Long, Double> getGaugeValues(Role role);
+
+    void stopGauge(Role role);
 }

Modified: commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/stopwatches/CounterStopWatch.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/stopwatches/CounterStopWatch.java?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/stopwatches/CounterStopWatch.java (original)
+++ commons/sandbox/monitoring/trunk/core/src/main/java/org/apache/commons/monitoring/stopwatches/CounterStopWatch.java Fri Aug  2 07:42:15 2013
@@ -17,11 +17,11 @@
 
 package org.apache.commons.monitoring.stopwatches;
 
-import org.apache.commons.monitoring.counter.Counter;
+import org.apache.commons.monitoring.counters.Counter;
 
 import java.util.concurrent.atomic.AtomicInteger;
 
-import static org.apache.commons.monitoring.counter.Unit.Time.NANOSECOND;
+import static org.apache.commons.monitoring.counters.Unit.Time.NANOSECOND;
 
 /**
  * Simple implementation of StopWatch that estimate monitored element execution time.

Modified: commons/sandbox/monitoring/trunk/core/src/test/java/org/apache/commons/monitoring/UnitTest.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/core/src/test/java/org/apache/commons/monitoring/UnitTest.java?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/core/src/test/java/org/apache/commons/monitoring/UnitTest.java (original)
+++ commons/sandbox/monitoring/trunk/core/src/test/java/org/apache/commons/monitoring/UnitTest.java Fri Aug  2 07:42:15 2013
@@ -19,11 +19,11 @@ package org.apache.commons.monitoring;
 
 import org.junit.Test;
 
-import static org.apache.commons.monitoring.counter.Unit.Time.HOUR;
-import static org.apache.commons.monitoring.counter.Unit.Time.MICROSECOND;
-import static org.apache.commons.monitoring.counter.Unit.Time.MILLISECOND;
-import static org.apache.commons.monitoring.counter.Unit.Time.NANOSECOND;
-import static org.apache.commons.monitoring.counter.Unit.Time.SECOND;
+import static org.apache.commons.monitoring.counters.Unit.Time.HOUR;
+import static org.apache.commons.monitoring.counters.Unit.Time.MICROSECOND;
+import static org.apache.commons.monitoring.counters.Unit.Time.MILLISECOND;
+import static org.apache.commons.monitoring.counters.Unit.Time.NANOSECOND;
+import static org.apache.commons.monitoring.counters.Unit.Time.SECOND;
 import static org.junit.Assert.assertEquals;
 
 /**

Modified: commons/sandbox/monitoring/trunk/core/src/test/java/org/apache/commons/monitoring/counters/CounterBench.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/core/src/test/java/org/apache/commons/monitoring/counters/CounterBench.java?rev=1509574&r1=1509549&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/core/src/test/java/org/apache/commons/monitoring/counters/CounterBench.java (original)
+++ commons/sandbox/monitoring/trunk/core/src/test/java/org/apache/commons/monitoring/counters/CounterBench.java Fri Aug  2 07:42:15 2013
@@ -14,8 +14,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.monitoring.counter;
+package org.apache.commons.monitoring.counters;
 
+import org.apache.commons.monitoring.Role;
 import org.junit.Test;
 
 import java.util.concurrent.ExecutorService;

Modified: commons/sandbox/monitoring/trunk/jdbc/src/main/java/org/apache/commons/monitoring/jdbc/MonitoredConnection.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/jdbc/src/main/java/org/apache/commons/monitoring/jdbc/MonitoredConnection.java?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/jdbc/src/main/java/org/apache/commons/monitoring/jdbc/MonitoredConnection.java (original)
+++ commons/sandbox/monitoring/trunk/jdbc/src/main/java/org/apache/commons/monitoring/jdbc/MonitoredConnection.java Fri Aug  2 07:42:15 2013
@@ -17,7 +17,7 @@
 
 package org.apache.commons.monitoring.jdbc;
 
-import org.apache.commons.monitoring.counter.Counter;
+import org.apache.commons.monitoring.counters.Counter;
 import org.apache.commons.monitoring.stopwatches.CounterStopWatch;
 import org.apache.commons.monitoring.stopwatches.StopWatch;
 import org.apache.commons.monitoring.util.ClassLoaders;

Modified: commons/sandbox/monitoring/trunk/jdbc/src/main/java/org/apache/commons/monitoring/jdbc/MonitoredDataSource.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/jdbc/src/main/java/org/apache/commons/monitoring/jdbc/MonitoredDataSource.java?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/jdbc/src/main/java/org/apache/commons/monitoring/jdbc/MonitoredDataSource.java (original)
+++ commons/sandbox/monitoring/trunk/jdbc/src/main/java/org/apache/commons/monitoring/jdbc/MonitoredDataSource.java Fri Aug  2 07:42:15 2013
@@ -18,8 +18,8 @@
 package org.apache.commons.monitoring.jdbc;
 
 
-import org.apache.commons.monitoring.counter.Role;
-import org.apache.commons.monitoring.counter.Counter;
+import org.apache.commons.monitoring.Role;
+import org.apache.commons.monitoring.counters.Counter;
 import org.apache.commons.monitoring.repositories.Repository;
 
 import javax.sql.DataSource;

Modified: commons/sandbox/monitoring/trunk/jdbc/src/main/java/org/apache/commons/monitoring/jdbc/MonitoredPreparedStatement.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/jdbc/src/main/java/org/apache/commons/monitoring/jdbc/MonitoredPreparedStatement.java?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/jdbc/src/main/java/org/apache/commons/monitoring/jdbc/MonitoredPreparedStatement.java (original)
+++ commons/sandbox/monitoring/trunk/jdbc/src/main/java/org/apache/commons/monitoring/jdbc/MonitoredPreparedStatement.java Fri Aug  2 07:42:15 2013
@@ -16,8 +16,8 @@
  */
 package org.apache.commons.monitoring.jdbc;
 
-import org.apache.commons.monitoring.counter.Role;
-import org.apache.commons.monitoring.counter.Counter;
+import org.apache.commons.monitoring.Role;
+import org.apache.commons.monitoring.counters.Counter;
 import org.apache.commons.monitoring.repositories.Repository;
 import org.apache.commons.monitoring.stopwatches.StopWatch;
 

Modified: commons/sandbox/monitoring/trunk/jdbc/src/main/java/org/apache/commons/monitoring/jdbc/MonitoredStatement.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/jdbc/src/main/java/org/apache/commons/monitoring/jdbc/MonitoredStatement.java?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/jdbc/src/main/java/org/apache/commons/monitoring/jdbc/MonitoredStatement.java (original)
+++ commons/sandbox/monitoring/trunk/jdbc/src/main/java/org/apache/commons/monitoring/jdbc/MonitoredStatement.java Fri Aug  2 07:42:15 2013
@@ -17,8 +17,8 @@
 
 package org.apache.commons.monitoring.jdbc;
 
-import org.apache.commons.monitoring.counter.Role;
-import org.apache.commons.monitoring.counter.Counter;
+import org.apache.commons.monitoring.Role;
+import org.apache.commons.monitoring.counters.Counter;
 import org.apache.commons.monitoring.repositories.Repository;
 import org.apache.commons.monitoring.stopwatches.StopWatch;
 

Modified: commons/sandbox/monitoring/trunk/jdbc/src/main/java/org/apache/commons/monitoring/jdbc/MonitoringDriver.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/jdbc/src/main/java/org/apache/commons/monitoring/jdbc/MonitoringDriver.java?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/jdbc/src/main/java/org/apache/commons/monitoring/jdbc/MonitoringDriver.java (original)
+++ commons/sandbox/monitoring/trunk/jdbc/src/main/java/org/apache/commons/monitoring/jdbc/MonitoringDriver.java Fri Aug  2 07:42:15 2013
@@ -16,8 +16,8 @@
  */
 package org.apache.commons.monitoring.jdbc;
 
-import org.apache.commons.monitoring.counter.Role;
-import org.apache.commons.monitoring.counter.Counter;
+import org.apache.commons.monitoring.Role;
+import org.apache.commons.monitoring.counters.Counter;
 import org.apache.commons.monitoring.repositories.Repository;
 
 import java.sql.Connection;

Modified: commons/sandbox/monitoring/trunk/jdbc/src/test/java/org/apache/commons/monitoring/jdbc/HsqlDBTest.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/jdbc/src/test/java/org/apache/commons/monitoring/jdbc/HsqlDBTest.java?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/jdbc/src/test/java/org/apache/commons/monitoring/jdbc/HsqlDBTest.java (original)
+++ commons/sandbox/monitoring/trunk/jdbc/src/test/java/org/apache/commons/monitoring/jdbc/HsqlDBTest.java Fri Aug  2 07:42:15 2013
@@ -16,8 +16,8 @@
  */
 package org.apache.commons.monitoring.jdbc;
 
-import org.apache.commons.monitoring.counter.Role;
-import org.apache.commons.monitoring.counter.Counter;
+import org.apache.commons.monitoring.Role;
+import org.apache.commons.monitoring.counters.Counter;
 import org.apache.commons.monitoring.repositories.Repository;
 import org.hsqldb.jdbcDriver;
 import org.junit.BeforeClass;

Added: commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/listener/CleanupListener.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/listener/CleanupListener.java?rev=1509574&view=auto
==============================================================================
--- commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/listener/CleanupListener.java (added)
+++ commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/listener/CleanupListener.java Fri Aug  2 07:42:15 2013
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.monitoring.reporting.web.listener;
+
+import org.apache.commons.monitoring.reporting.web.plugin.jvm.CPUGauge;
+import org.apache.commons.monitoring.reporting.web.plugin.jvm.MemoryGauge;
+import org.apache.commons.monitoring.repositories.Repository;
+
+import javax.servlet.ServletContextEvent;
+import javax.servlet.ServletContextListener;
+
+public class CleanupListener implements ServletContextListener {
+    @Override
+    public void contextInitialized(final ServletContextEvent sce) {
+        // no-op
+    }
+
+    @Override
+    public void contextDestroyed(final ServletContextEvent sce) {
+        Repository.INSTANCE.stopGauge(CPUGauge.CPU);
+        Repository.INSTANCE.stopGauge(MemoryGauge.MEMORY);
+    }
+}

Modified: commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/PluginRepository.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/PluginRepository.java?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/PluginRepository.java (original)
+++ commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/PluginRepository.java Fri Aug  2 07:42:15 2013
@@ -24,7 +24,7 @@ import java.util.Collection;
 import java.util.ServiceLoader;
 import java.util.concurrent.CopyOnWriteArrayList;
 
-public class PluginRepository {
+public final class PluginRepository {
     public static Collection<PluginInfo> PLUGIN_INFO = new CopyOnWriteArrayList<PluginInfo>();
 
     static {
@@ -50,6 +50,10 @@ public class PluginRepository {
         }
     }
 
+    private PluginRepository() {
+        // no-op
+    }
+
     public static class PluginInfo {
         private final String url;
         private final Handler handler;

Added: commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/jvm/CPUGauge.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/jvm/CPUGauge.java?rev=1509574&view=auto
==============================================================================
--- commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/jvm/CPUGauge.java (added)
+++ commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/jvm/CPUGauge.java Fri Aug  2 07:42:15 2013
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.monitoring.reporting.web.plugin.jvm;
+
+import org.apache.commons.monitoring.Role;
+import org.apache.commons.monitoring.counters.Unit;
+import org.apache.commons.monitoring.gauges.Gauge;
+
+import java.lang.management.ManagementFactory;
+import java.lang.management.OperatingSystemMXBean;
+
+public class CPUGauge implements Gauge {
+    public static final Role CPU = new Role("CPU", Unit.UNARY);
+
+    private static final OperatingSystemMXBean SYSTEM_MX_BEAN = ManagementFactory.getOperatingSystemMXBean();
+
+    @Override
+    public Role role() {
+        return CPU;
+    }
+
+    @Override
+    public double value() {
+        return SYSTEM_MX_BEAN.getSystemLoadAverage();
+    }
+
+    @Override
+    public long period() {
+        return 60000;
+    }
+}

Modified: commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/jvm/JVMHandler.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/jvm/JVMHandler.java?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/jvm/JVMHandler.java (original)
+++ commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/jvm/JVMHandler.java Fri Aug  2 07:42:15 2013
@@ -29,8 +29,8 @@ public class JVMHandler extends HandlerR
 
     protected Map<String,?> getVariables() {
         return new MapBuilder<String, Object>()
-            .set("cpu", Repository.INSTANCE.getCounter(JVMPlugin.CPU_KEY).getMean())
-            .set("memory", Repository.INSTANCE.getCounter(JVMPlugin.MEMORY_KEY).getMean())
+            .set("cpu", Repository.INSTANCE.getGaugeValues(CPUGauge.CPU))
+            .set("memory", Repository.INSTANCE.getGaugeValues(MemoryGauge.MEMORY))
             .build();
     }
 }

Modified: commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/jvm/JVMPlugin.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/jvm/JVMPlugin.java?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/jvm/JVMPlugin.java (original)
+++ commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/jvm/JVMPlugin.java Fri Aug  2 07:42:15 2013
@@ -16,60 +16,10 @@
  */
 package org.apache.commons.monitoring.reporting.web.plugin.jvm;
 
-import org.apache.commons.monitoring.configuration.Configuration;
-import org.apache.commons.monitoring.counter.Counter;
-import org.apache.commons.monitoring.counter.Role;
-import org.apache.commons.monitoring.counter.Unit;
 import org.apache.commons.monitoring.reporting.web.handler.Handler;
 import org.apache.commons.monitoring.reporting.web.plugin.Plugin;
-import org.apache.commons.monitoring.repositories.Repository;
-
-import java.lang.management.ManagementFactory;
-import java.lang.management.MemoryMXBean;
-import java.lang.management.OperatingSystemMXBean;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Timer;
-import java.util.TimerTask;
 
 public class JVMPlugin implements Plugin {
-    public static final Counter.Key CPU_KEY = new Counter.Key(new Role("cpu", Unit.Time.MILLISECOND), "CPU");
-    public static final Counter.Key MEMORY_KEY = new Counter.Key(new Role("memory", Unit.Time.MILLISECOND), "Memory");
-
-    private static final OperatingSystemMXBean SYSTEM_MX_BEAN = ManagementFactory.getOperatingSystemMXBean();
-    private static final MemoryMXBean MEMORY_MX_BEAN = ManagementFactory.getMemoryMXBean();
-
-    private final Timer timer;
-
-    // TODO: limit size + make it accessible to the jvm handler
-    private final Collection<Double> cpuHistory = new ArrayList<Double>();
-    private final Collection<Long> memHistory = new ArrayList<Long>();
-
-    public JVMPlugin() {
-        // TODO: save values in a sized list (= historical values)
-        final Counter cpu = Repository.INSTANCE.getCounter(CPU_KEY);
-        final Counter memory = Repository.INSTANCE.getCounter(MEMORY_KEY);
-
-        timer = new Timer("monitoring-jvm", true);
-        timer.scheduleAtFixedRate(new TimerTask() {
-            @Override
-            public void run() {
-                final double systemLoadAverage = SYSTEM_MX_BEAN.getSystemLoadAverage();
-                cpu.add(systemLoadAverage);
-                cpuHistory.add(systemLoadAverage);
-
-                final long used = MEMORY_MX_BEAN.getHeapMemoryUsage().getUsed();
-                memory.add(used);
-                memHistory.add(used);
-            }
-        }, 0L, Long.parseLong(Configuration.getProperty(Configuration.COMMONS_MONITORING_PREFIX + "jvm.rate", "60000")));
-    }
-
-    @Configuration.Destroying
-    public void stop() {
-        timer.cancel();
-    }
-
     @Override
     public String name() {
         return "JVM";

Added: commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/jvm/MemoryGauge.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/jvm/MemoryGauge.java?rev=1509574&view=auto
==============================================================================
--- commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/jvm/MemoryGauge.java (added)
+++ commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/jvm/MemoryGauge.java Fri Aug  2 07:42:15 2013
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.monitoring.reporting.web.plugin.jvm;
+
+import org.apache.commons.monitoring.Role;
+import org.apache.commons.monitoring.counters.Unit;
+import org.apache.commons.monitoring.gauges.Gauge;
+
+import java.lang.management.ManagementFactory;
+import java.lang.management.MemoryMXBean;
+
+public class MemoryGauge implements Gauge {
+    public static final Role MEMORY = new Role("Memory", Unit.UNARY);
+
+    private static final MemoryMXBean MEMORY_MX_BEAN = ManagementFactory.getMemoryMXBean();
+
+    @Override
+    public Role role() {
+        return MEMORY;
+    }
+
+    @Override
+    public double value() {
+        return MEMORY_MX_BEAN.getHeapMemoryUsage().getUsed();
+    }
+
+    @Override
+    public long period() {
+        return 60000;
+    }
+}

Modified: commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/CSVFormat.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/CSVFormat.java?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/CSVFormat.java (original)
+++ commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/CSVFormat.java Fri Aug  2 07:42:15 2013
@@ -17,7 +17,7 @@
 package org.apache.commons.monitoring.reporting.web.plugin.report.format;
 
 import org.apache.commons.monitoring.configuration.Configuration;
-import org.apache.commons.monitoring.counter.Unit;
+import org.apache.commons.monitoring.counters.Unit;
 
 import java.io.PrintWriter;
 import java.util.Collection;

Modified: commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/HTMLFormat.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/HTMLFormat.java?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/HTMLFormat.java (original)
+++ commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/HTMLFormat.java Fri Aug  2 07:42:15 2013
@@ -16,7 +16,7 @@
  */
 package org.apache.commons.monitoring.reporting.web.plugin.report.format;
 
-import org.apache.commons.monitoring.counter.Unit;
+import org.apache.commons.monitoring.counters.Unit;
 import org.apache.commons.monitoring.reporting.web.template.MapBuilder;
 import org.apache.commons.monitoring.reporting.web.template.Templates;
 

Modified: commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/JSONFormat.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/JSONFormat.java?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/JSONFormat.java (original)
+++ commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/JSONFormat.java Fri Aug  2 07:42:15 2013
@@ -17,7 +17,7 @@
 
 package org.apache.commons.monitoring.reporting.web.plugin.report.format;
 
-import org.apache.commons.monitoring.counter.Counter;
+import org.apache.commons.monitoring.counters.Counter;
 import org.apache.commons.monitoring.repositories.Repository;
 
 import java.io.PrintWriter;

Modified: commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/MapFormat.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/MapFormat.java?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/MapFormat.java (original)
+++ commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/MapFormat.java Fri Aug  2 07:42:15 2013
@@ -16,8 +16,8 @@
  */
 package org.apache.commons.monitoring.reporting.web.plugin.report.format;
 
-import org.apache.commons.monitoring.counter.Counter;
-import org.apache.commons.monitoring.counter.Unit;
+import org.apache.commons.monitoring.counters.Counter;
+import org.apache.commons.monitoring.counters.Unit;
 import org.apache.commons.monitoring.repositories.Repository;
 
 import java.util.ArrayList;

Modified: commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/MetricData.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/MetricData.java?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/MetricData.java (original)
+++ commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/MetricData.java Fri Aug  2 07:42:15 2013
@@ -17,7 +17,7 @@
 
 package org.apache.commons.monitoring.reporting.web.plugin.report.format;
 
-import org.apache.commons.monitoring.counter.Counter;
+import org.apache.commons.monitoring.counters.Counter;
 
 /**
  * An enum to acces data from a Counter based on the property name. Can be used to avoid reflection on Counter

Modified: commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/XMLFormat.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/XMLFormat.java?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/XMLFormat.java (original)
+++ commons/sandbox/monitoring/trunk/reporting/src/main/java/org/apache/commons/monitoring/reporting/web/plugin/report/format/XMLFormat.java Fri Aug  2 07:42:15 2013
@@ -17,7 +17,7 @@
 
 package org.apache.commons.monitoring.reporting.web.plugin.report.format;
 
-import org.apache.commons.monitoring.counter.Counter;
+import org.apache.commons.monitoring.counters.Counter;
 import org.apache.commons.monitoring.repositories.Repository;
 
 import java.io.PrintWriter;

Added: commons/sandbox/monitoring/trunk/reporting/src/main/resources/META-INF/services/org.apache.commons.monitoring.gauges.Gauge
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/reporting/src/main/resources/META-INF/services/org.apache.commons.monitoring.gauges.Gauge?rev=1509574&view=auto
==============================================================================
--- commons/sandbox/monitoring/trunk/reporting/src/main/resources/META-INF/services/org.apache.commons.monitoring.gauges.Gauge (added)
+++ commons/sandbox/monitoring/trunk/reporting/src/main/resources/META-INF/services/org.apache.commons.monitoring.gauges.Gauge Fri Aug  2 07:42:15 2013
@@ -0,0 +1,2 @@
+org.apache.commons.monitoring.reporting.web.plugin.jvm.CPUGauge
+org.apache.commons.monitoring.reporting.web.plugin.jvm.MemoryGauge

Modified: commons/sandbox/monitoring/trunk/reporting/src/main/resources/META-INF/services/org.apache.commons.monitoring.reporting.web.plugin.Plugin
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/reporting/src/main/resources/META-INF/services/org.apache.commons.monitoring.reporting.web.plugin.Plugin?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/reporting/src/main/resources/META-INF/services/org.apache.commons.monitoring.reporting.web.plugin.Plugin (original)
+++ commons/sandbox/monitoring/trunk/reporting/src/main/resources/META-INF/services/org.apache.commons.monitoring.reporting.web.plugin.Plugin Fri Aug  2 07:42:15 2013
@@ -1,2 +1,3 @@
 org.apache.commons.monitoring.reporting.web.plugin.report.ReportPlugin
 org.apache.commons.monitoring.reporting.web.plugin.jmx.JMXPlugin
+org.apache.commons.monitoring.reporting.web.plugin.jvm.JVMPlugin

Modified: commons/sandbox/monitoring/trunk/reporting/src/main/resources/templates/jvm/jvm.vm
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/reporting/src/main/resources/templates/jvm/jvm.vm?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/reporting/src/main/resources/templates/jvm/jvm.vm (original)
+++ commons/sandbox/monitoring/trunk/reporting/src/main/resources/templates/jvm/jvm.vm Fri Aug  2 07:42:15 2013
@@ -14,5 +14,26 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 *#
-Memory mean: $memory
-CPU mean: $cpu
+#macro(printMap $name $map)
+    <section>
+        <div class="page-header">
+            <h2>$name:</h2>
+        </div>
+        <table class="table table-bordered">
+            <thead>
+                <tr><td>Time (ns)</td><td>Value</td></tr>
+            </thead>
+            <tbody>
+                #foreach ($entry in $map.entrySet())
+                    <tr>
+                        <td>$entry.key</td>
+                        <td>$entry.value</td>
+                    </tr>
+                #end
+            </tbody>
+        </table>
+    </section>
+#end
+
+#printMap("Memory", $memory)
+#printMap("CPU", $cpu)

Modified: commons/sandbox/monitoring/trunk/reporting/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/reporting/src/main/webapp/WEB-INF/web.xml?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/reporting/src/main/webapp/WEB-INF/web.xml (original)
+++ commons/sandbox/monitoring/trunk/reporting/src/main/webapp/WEB-INF/web.xml Fri Aug  2 07:42:15 2013
@@ -20,6 +20,10 @@
          xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
          version="2.5">
 
+  <listener>
+    <listener-class>org.apache.commons.monitoring.reporting.web.listener.CleanupListener</listener-class>
+  </listener>
+
   <filter>
     <filter-name>Monitoring</filter-name>
     <filter-class>org.apache.commons.monitoring.reporting.web.MonitoringController</filter-class>
@@ -29,4 +33,5 @@
     <filter-name>Monitoring</filter-name>
     <url-pattern>/*</url-pattern>
   </filter-mapping>
+
 </web-app>

Modified: commons/sandbox/monitoring/trunk/reporting/src/test/java/org/apache/commons/monitoring/reporting/FormatsTest.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/reporting/src/test/java/org/apache/commons/monitoring/reporting/FormatsTest.java?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/reporting/src/test/java/org/apache/commons/monitoring/reporting/FormatsTest.java (original)
+++ commons/sandbox/monitoring/trunk/reporting/src/test/java/org/apache/commons/monitoring/reporting/FormatsTest.java Fri Aug  2 07:42:15 2013
@@ -17,8 +17,8 @@
 
 package org.apache.commons.monitoring.reporting;
 
-import org.apache.commons.monitoring.counter.Role;
-import org.apache.commons.monitoring.counter.Counter;
+import org.apache.commons.monitoring.Role;
+import org.apache.commons.monitoring.counters.Counter;
 import org.apache.commons.monitoring.reporting.web.plugin.report.format.CSVFormat;
 import org.apache.commons.monitoring.reporting.web.plugin.report.format.Format;
 import org.apache.commons.monitoring.repositories.Repository;

Modified: commons/sandbox/monitoring/trunk/spring/src/test/java/org/apache/commons/monitoring/spring/SpringMonitoringTest.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/spring/src/test/java/org/apache/commons/monitoring/spring/SpringMonitoringTest.java?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/spring/src/test/java/org/apache/commons/monitoring/spring/SpringMonitoringTest.java (original)
+++ commons/sandbox/monitoring/trunk/spring/src/test/java/org/apache/commons/monitoring/spring/SpringMonitoringTest.java Fri Aug  2 07:42:15 2013
@@ -16,8 +16,8 @@
  */
 package org.apache.commons.monitoring.spring;
 
-import org.apache.commons.monitoring.counter.Role;
-import org.apache.commons.monitoring.counter.Counter;
+import org.apache.commons.monitoring.Role;
+import org.apache.commons.monitoring.counters.Counter;
 import org.apache.commons.monitoring.repositories.Repository;
 import org.apache.commons.monitoring.spring.service.MyService;
 import org.junit.Test;

Modified: commons/sandbox/monitoring/trunk/src/site/xdoc/web.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/src/site/xdoc/web.xml?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/src/site/xdoc/web.xml (original)
+++ commons/sandbox/monitoring/trunk/src/site/xdoc/web.xml Fri Aug  2 07:42:15 2013
@@ -111,7 +111,7 @@
               (milliseconds),
               <tt>s</tt>
               (seconds) ... Please refer to the
-              <code>org.apache.commons.monitoring.counter.Unit</code>
+              <code>org.apache.commons.monitoring.counters.Unit</code>
               javadoc for more infos on units.
             </li>
           </ul>

Modified: commons/sandbox/monitoring/trunk/web/src/main/java/org/apache/commons/monitoring/web/jsp/StartTag.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/web/src/main/java/org/apache/commons/monitoring/web/jsp/StartTag.java?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/web/src/main/java/org/apache/commons/monitoring/web/jsp/StartTag.java (original)
+++ commons/sandbox/monitoring/trunk/web/src/main/java/org/apache/commons/monitoring/web/jsp/StartTag.java Fri Aug  2 07:42:15 2013
@@ -17,8 +17,8 @@
 
 package org.apache.commons.monitoring.web.jsp;
 
-import org.apache.commons.monitoring.counter.Role;
-import org.apache.commons.monitoring.counter.Counter;
+import org.apache.commons.monitoring.Role;
+import org.apache.commons.monitoring.counters.Counter;
 import org.apache.commons.monitoring.repositories.Repository;
 import org.apache.commons.monitoring.stopwatches.StopWatch;
 

Modified: commons/sandbox/monitoring/trunk/web/src/main/java/org/apache/commons/monitoring/web/servlet/MonitoringFilter.java
URL: http://svn.apache.org/viewvc/commons/sandbox/monitoring/trunk/web/src/main/java/org/apache/commons/monitoring/web/servlet/MonitoringFilter.java?rev=1509574&r1=1509573&r2=1509574&view=diff
==============================================================================
--- commons/sandbox/monitoring/trunk/web/src/main/java/org/apache/commons/monitoring/web/servlet/MonitoringFilter.java (original)
+++ commons/sandbox/monitoring/trunk/web/src/main/java/org/apache/commons/monitoring/web/servlet/MonitoringFilter.java Fri Aug  2 07:42:15 2013
@@ -16,8 +16,8 @@
  */
 package org.apache.commons.monitoring.web.servlet;
 
-import org.apache.commons.monitoring.counter.Role;
-import org.apache.commons.monitoring.counter.Counter;
+import org.apache.commons.monitoring.Role;
+import org.apache.commons.monitoring.counters.Counter;
 import org.apache.commons.monitoring.repositories.Repository;
 import org.apache.commons.monitoring.stopwatches.StopWatch;
 



Mime
View raw message