You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by se...@apache.org on 2012/08/30 21:09:43 UTC
svn commit: r1379070 - in /jmeter/trunk:
src/core/org/apache/jmeter/gui/action/ src/core/org/apache/jmeter/gui/util/
src/core/org/apache/jmeter/resources/ xdocs/
Author: sebb
Date: Thu Aug 30 19:09:42 2012
New Revision: 1379070
URL: http://svn.apache.org/viewvc?rev=1379070&view=rev
Log:
Add support for HeapDump to the JMeter GUI client
Modified:
jmeter/trunk/src/core/org/apache/jmeter/gui/action/ActionNames.java
jmeter/trunk/src/core/org/apache/jmeter/gui/action/What.java
jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java
jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
jmeter/trunk/xdocs/changes.xml
Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/ActionNames.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/ActionNames.java?rev=1379070&r1=1379069&r2=1379070&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/action/ActionNames.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/ActionNames.java Thu Aug 30 19:09:42 2012
@@ -57,6 +57,7 @@ public class ActionNames {
public static final String EXPAND_ALL = "expand all"; // $NON-NLS-1$
public static final String FUNCTIONS = "functions"; // $NON-NLS-1$
public static final String HELP = "help"; // $NON-NLS-1$
+ public static final String HEAP_DUMP = "heap_dump"; // $NON-NLS-1$
public static final String INSERT_AFTER = "drag_n_drop.insert_after";//$NON-NLS-1$
public static final String INSERT_BEFORE = "drag_n_drop.insert_before";//$NON-NLS-1$
public static final String LAF_PREFIX = "laf:"; // Look and Feel prefix
Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/action/What.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/action/What.java?rev=1379070&r1=1379069&r2=1379070&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/action/What.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/action/What.java Thu Aug 30 19:09:42 2012
@@ -23,11 +23,14 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
+import javax.swing.JOptionPane;
+
import org.apache.jmeter.exceptions.IllegalUserActionException;
import org.apache.jmeter.gui.GuiPackage;
import org.apache.jmeter.gui.tree.JMeterTreeNode;
import org.apache.jmeter.testelement.TestElement;
import org.apache.jorphan.logging.LoggingManager;
+import org.apache.jorphan.util.HeapDumper;
import org.apache.log.Logger;
/**
@@ -48,6 +51,7 @@ public class What implements Command {
commands.add(ActionNames.WHAT_CLASS);
commands.add(ActionNames.DEBUG_ON);
commands.add(ActionNames.DEBUG_OFF);
+ commands.add(ActionNames.HEAP_DUMP);
commandSet = Collections.unmodifiableSet(commands);
}
@@ -64,6 +68,13 @@ public class What implements Command {
LoggingManager.setPriorityFullName("DEBUG",te.getClass().getName());//$NON-NLS-1$
} else if (ActionNames.DEBUG_OFF.equals(e.getActionCommand())){
LoggingManager.setPriorityFullName("INFO",te.getClass().getName());//$NON-NLS-1$
+ } else if (ActionNames.HEAP_DUMP.equals(e.getActionCommand())){
+ try {
+ String s = HeapDumper.dumpHeap();
+ JOptionPane.showMessageDialog(null, "Created "+s, "HeapDump", JOptionPane.INFORMATION_MESSAGE);
+ } catch (Exception ex) {
+ JOptionPane.showMessageDialog(null, ex.toString(), "HeapDump", JOptionPane.ERROR_MESSAGE);
+ }
}
}
Modified: jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java?rev=1379070&r1=1379069&r2=1379070&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/gui/util/JMeterMenuBar.java Thu Aug 30 19:09:42 2012
@@ -253,6 +253,8 @@ public class JMeterMenuBar extends JMenu
JMenuItem resetDebug = makeMenuItemRes("debug_off", ActionNames.DEBUG_OFF, KeyStrokes.DEBUG_OFF);//$NON-NLS-1$
+ JMenuItem heapDump = makeMenuItemRes("heap_dump", ActionNames.HEAP_DUMP);//$NON-NLS-1$
+
help_about = makeMenuItemRes("about", 'A', ActionNames.ABOUT); //$NON-NLS-1$
helpMenu.add(contextHelp);
@@ -260,6 +262,7 @@ public class JMeterMenuBar extends JMenu
helpMenu.add(whatClass);
helpMenu.add(setDebug);
helpMenu.add(resetDebug);
+ helpMenu.add(heapDump);
helpMenu.addSeparator();
helpMenu.add(help_about);
}
Modified: jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties?rev=1379070&r1=1379069&r2=1379070&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties Thu Aug 30 19:09:42 2012
@@ -353,6 +353,7 @@ grouping_no_groups=Do not group samplers
grouping_store_first_only=Store 1st sampler of each group only
header_manager_title=HTTP Header Manager
headers_stored=Headers Stored in the Header Manager
+heap_dump=Create a heap dump
help=Help
help_node=What's this node?
html_assertion_file=Write JTidy report to file
Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1379070&r1=1379069&r2=1379070&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Thu Aug 30 19:09:42 2012
@@ -190,7 +190,7 @@ Cookie Manager has now the default HC3.1
<li><bugzilla>52601</bugzilla> - CTRL + F for the new Find feature</li>
<li><bugzilla>53796</bugzilla> - TestCompiler uses static Set which can grow huge</li>
<li><bugzilla>53673</bugzilla> - Add JMeter version in the jmx file</li>
-<li>Add support for HeapDump to the JMeter non-GUI client</li>
+<li>Add support for HeapDump to the JMeter non-GUI and GUI client</li>
</ul>
<h2>Non-functional changes</h2>