This commit was manufactured by cvs2svn to create branch 'perf_30'.

Cherrypick from master 2004-12-03 21:23:59 UTC Darin Wright <darin> 'Bug 78166 - [performance test] console':
    org.eclipse.jdt.debug.tests/testprograms/Console80Chars.java
    org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfConsoleTests.java
diff --git a/org.eclipse.jdt.debug.tests/testprograms/Console80Chars.java b/org.eclipse.jdt.debug.tests/testprograms/Console80Chars.java
new file mode 100644
index 0000000..839b0c6
--- /dev/null
+++ b/org.eclipse.jdt.debug.tests/testprograms/Console80Chars.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2003 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+/**
+ * Print variable number of 80char (+2) lines of output
+ */
+public class Console80Chars {
+
+	public static void main(String[] args) {
+	    int lines = Integer.parseInt(args[0]);
+	    System.err.println(" - THE BEGINING - ");
+		for (int i = 0; i < lines; i++) {
+			System.out.println("0---------1--------2--------3-------4--------5--------6--------7--------8");
+		}
+		System.err.println(" - THE END - ");
+	}
+}
diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfConsoleTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfConsoleTests.java
new file mode 100644
index 0000000..f37feff
--- /dev/null
+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/PerfConsoleTests.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2000, 2004 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Common Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/cpl-v10.html
+ * 
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jdt.debug.tests.performance;
+
+import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.jdt.debug.core.IJavaLineBreakpoint;
+import org.eclipse.jdt.debug.core.IJavaThread;
+import org.eclipse.jdt.debug.tests.AbstractDebugPerformanceTest;
+import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+
+/**
+ * Tests performance of the console.
+ */
+public class PerfConsoleTests extends AbstractDebugPerformanceTest {
+	
+	public PerfConsoleTests(String name) {
+		super(name);
+	}
+
+	public void testDefault10k() throws Exception {
+		runFixedWidthTest(10000);		
+	}
+	
+	public void testDefault100k() throws Exception {
+		runFixedWidthTest(100000);		
+	}
+		
+	protected void runFixedWidthTest(int lines) throws Exception {
+	    String typeName = "Console80Chars";
+	    ILaunchConfiguration configuration = getLaunchConfiguration(typeName);
+	    ILaunchConfigurationWorkingCopy workingCopy = configuration.getWorkingCopy();
+	    workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, Integer.toString(lines));
+	    IJavaLineBreakpoint bp = createLineBreakpoint(18, typeName);
+	    createLineBreakpoint(23, typeName);
+	    IJavaThread thread = null;
+	    try {
+	        thread= launchAndSuspend(workingCopy);
+	        startMeasuring();
+	        thread = resume(thread, 360000);
+			stopMeasuring();
+			commitMeasurements();
+			assertPerformance();	        
+	    } finally {
+	        terminateAndRemove(thread);
+	        removeAllBreakpoints();
+	    }
+	}
+}
\ No newline at end of file