diff --git a/source/java/org/alfresco/util/perf/AbstractPerformanceMonitor.java b/source/java/org/alfresco/util/perf/AbstractPerformanceMonitor.java
deleted file mode 100644
index 732afc5800..0000000000
--- a/source/java/org/alfresco/util/perf/AbstractPerformanceMonitor.java
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * Copyright (C) 2005-2010 Alfresco Software Limited.
- *
- * This file is part of Alfresco
- *
- * Alfresco is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Alfresco is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Alfresco. If not, see
- * Logging output is managed down to either the entity or entity-invocation level as follows: - *
- *
- * performance.summary.method - * performance.summary.vm - * AND - * performance.targetEntityName - * performance.targetEntityName.methodName - *- *
- * The following examples illustrate how it can be used: - *
- *
- * performance.summary.method=DEBUG - * performance.myBean=DEBUG - * --> Output method invocation statistic on each call to myBean - * - * performance.summary.vm=DEBUG - * performance.myBean.doSomething=DEBUG - * --> Output summary for doSomething() invocations on myBean when VM terminates - * - * performance=DEBUG - * --> Output all performance data - after each invocation and upon VM closure - *- *
- *
- * @author Derek Hulley
- */
-public abstract class AbstractPerformanceMonitor
-{
- /** logger for method level performance summaries */
- private static final Log methodSummaryLogger = LogFactory.getLog("performance.summary.method");
- /** logger for VM level performance summaries */
- private static final Log vmSummaryLogger = LogFactory.getLog("performance.summary.vm");
-
- private final String entityName;
- /** VM level summary */
- private SortedMap
- * This class is thread safe.
- *
- * Usage:
- *
- * The timer is only started if the logging levels are enabled.
- *
- * @see #stop()
- */
- public void start()
- {
- if (!log)
- {
- // don't bother timing
- return;
- }
- // overwrite the thread's timer
- ITimer timer = TimerFactory.newTimer();
- threadLocalTimer.set(timer);
- // start the timer
- timer.start();
- }
-
- /**
- * Threadsafe method to stop the timer.
- *
- * @see #start()
- */
- public void stop()
- {
- if (!log)
- {
- // don't bother timing
- return;
- }
- // get the thread's timer
- ITimer timer = threadLocalTimer.get();
- if (timer == null)
- {
- // begin not called on the thread
- return;
- }
- // time it
- timer.stop();
- recordStats(methodName, timer.getDuration());
-
- // drop the thread's timer
- threadLocalTimer.set(null);
- }
-}
diff --git a/source/java/org/alfresco/util/perf/PerformanceMonitorAdvice.java b/source/java/org/alfresco/util/perf/PerformanceMonitorAdvice.java
deleted file mode 100644
index 1aa0c38c00..0000000000
--- a/source/java/org/alfresco/util/perf/PerformanceMonitorAdvice.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2005-2010 Alfresco Software Limited.
- *
- * This file is part of Alfresco
- *
- * Alfresco is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * Alfresco is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with Alfresco. If not, see
- *
- *
- * @param methodName the name of the method against which to store the results
- * @param delayMs
- */
- protected void recordStats(String methodName, double delayMs)
- {
- Log methodLogger = LogFactory.getLog("performance." + entityName + "." + methodName);
- if (!methodLogger.isDebugEnabled())
- {
- // no recording for this method
- return;
- }
-
- DecimalFormat format = new DecimalFormat ();
- format.setMinimumFractionDigits (3);
- format.setMaximumFractionDigits (3);
-
- // must we log on a per-method call?
- if (methodSummaryLogger.isDebugEnabled())
- {
- methodLogger.debug("Executed " + entityName + "#" + methodName + " in " + format.format(delayMs) + "ms");
- }
- if (vmSummaryLogger.isDebugEnabled())
- {
- synchronized(this) // only synchronize if absolutely necessary
- {
- // get stats
- MethodStats methodStats = stats.get(methodName);
- if (methodStats == null)
- {
- methodStats = new MethodStats();
- stats.put(methodName, methodStats);
- }
- methodStats.record(delayMs);
- }
- }
- }
-
- /**
- * Stores the execution count and total execution time for any method
- */
- private class MethodStats
- {
- private int count;
- private double totalTimeMs;
-
- /**
- * Records the time for a method to execute and bumps up the execution count
- *
- * @param delayMs the time the method took to execute in milliseconds
- */
- public void record(double delayMs)
- {
- count++;
- totalTimeMs += delayMs;
- }
-
- public String toString()
- {
- DecimalFormat format = new DecimalFormat ();
- format.setMinimumFractionDigits (3);
- format.setMaximumFractionDigits (3);
- double averageMs = totalTimeMs / (long) count;
- return ("Executed " + count + " times, averaging " + format.format(averageMs) + "ms per call");
- }
- }
-
- /**
- * Dumps the output of all recorded method statistics
- */
- private class ShutdownThread extends Thread
- {
- public void run()
- {
- String beanName = AbstractPerformanceMonitor.this.entityName;
-
- // prevent multiple ShutdownThread instances interleaving their output
- synchronized(ShutdownThread.class)
- {
- vmSummaryLogger.debug("\n==================== " + beanName.toUpperCase() + " ===================");
- Set
- * private PerformanceMonitor somethingTimer = new PerformanceMonitor("mytest", "doSomething");
- * ...
- * ...
- * private void doSomething()
- * {
- * somethingTimer.start();
- * ...
- * ...
- * somethingTimer.stop();
- * }
- *
- *
- * @author Derek Hulley
- */
-public class PerformanceMonitor extends AbstractPerformanceMonitor
-{
- private String methodName;
- private ThreadLocal