mirror of https://github.com/apache/jmeter.git
Add support for HeapDump to the JMeter GUI client
git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1379070 13f79535-47bb-0310-9956-ffa450edef68
Former-commit-id: 1aa4b04a72
This commit is contained in:
parent
33a41e35ad
commit
c8192b1c76
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -253,6 +253,8 @@ public class JMeterMenuBar extends JMenuBar implements LocaleChangeListener {
|
|||
|
||||
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 JMenuBar implements LocaleChangeListener {
|
|||
helpMenu.add(whatClass);
|
||||
helpMenu.add(setDebug);
|
||||
helpMenu.add(resetDebug);
|
||||
helpMenu.add(heapDump);
|
||||
helpMenu.addSeparator();
|
||||
helpMenu.add(help_about);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ Cookie Manager has now the default HC3.1 implementation and a new choice HC4 imp
|
|||
<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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue