Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/ProfilingUtil.java')
-rw-r--r--extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/ProfilingUtil.java60
1 files changed, 0 insertions, 60 deletions
diff --git a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/ProfilingUtil.java b/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/ProfilingUtil.java
deleted file mode 100644
index db94b48b4b1..00000000000
--- a/extraplugins/epf-richtext/org.eclipse.epf.common/src/org/eclipse/epf/common/utils/ProfilingUtil.java
+++ /dev/null
@@ -1,60 +0,0 @@
-//------------------------------------------------------------------------------
-// Copyright (c) 2005, 2006 IBM Corporation and others.
-// All rights reserved. This program and the accompanying materials
-// are made available under the terms of the Eclipse Public License v1.0
-// which accompanies this distribution, and is available at
-// http://www.eclipse.org/legal/epl-v10.html
-//
-// Contributors:
-// IBM Corporation - initial implementation
-//------------------------------------------------------------------------------
-package org.eclipse.epf.common.utils;
-
-import java.io.PrintStream;
-
-
-/**
- * Utility class for profiling
- *
- * @author Weiping Lu
- * @since 1.0
- */
-
-public class ProfilingUtil {
-
- public static boolean traceFootprint = false;
-
- private static PrintStream output = System.out;
-
- public static void setOutput(PrintStream ps) {
- output = ps;
- }
-
- public static void fullGC() {
- Runtime rt = Runtime.getRuntime();
- long isFree = rt.freeMemory();
- long wasFree;
- do {
- wasFree = isFree;
- rt.runFinalization();
- rt.gc();
- isFree = rt.freeMemory();
- } while (isFree > wasFree);
- }
-
- public static long traceUsedMemory(String location) {
- Runtime rt = Runtime.getRuntime();
- long usedMem = rt.totalMemory() - rt.freeMemory();
- output.println("Footprint> " + location + ": " + usedMem/1000 + " K"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- return usedMem;
- }
-
- public static long traceUsedMemoryDiff(String locationInfo, long currUsed, long PrevUsed) {
- long diff = currUsed - PrevUsed;
- output.println("Footprint> Diff, " + locationInfo + ": " + diff/1000 + " K\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- return diff;
- }
-
-}

Back to the top