You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by fs...@apache.org on 2018/02/12 10:08:48 UTC
svn commit: r1823932 - in /jmeter/trunk: ./
src/components/org/apache/jmeter/visualizers/
src/core/org/apache/jmeter/reporters/
src/protocol/http/org/apache/jmeter/protocol/http/proxy/
src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/ s...
Author: fschumacher
Date: Mon Feb 12 10:08:48 2018
New Revision: 1823932
URL: http://svn.apache.org/viewvc?rev=1823932&view=rev
Log:
Get down to a maximum length of 170 chars
Part of #358 on github. Based on contribution by Graham Russell (graham at ham1.co.uk)
Modified:
jmeter/trunk/checkstyle.xml
jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java
jmeter/trunk/src/core/org/apache/jmeter/reporters/Summariser.java
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/LogFilter.java
jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/config/gui/JavaConfigGui.java
jmeter/trunk/test/src/org/apache/jmeter/protocol/http/parser/TestHTMLParser.java
jmeter/trunk/test/src/org/apache/jmeter/testbeans/gui/PackageTest.java
Modified: jmeter/trunk/checkstyle.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/checkstyle.xml?rev=1823932&r1=1823931&r2=1823932&view=diff
==============================================================================
--- jmeter/trunk/checkstyle.xml (original)
+++ jmeter/trunk/checkstyle.xml Mon Feb 12 10:08:48 2018
@@ -170,7 +170,7 @@
</module>
<module name="LineLength">
<!-- TODO: reduce this to 120 -->
- <property name="max" value="175"/>
+ <property name="max" value="170"/>
</module>
<!-- whitespace -->
Modified: jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java?rev=1823932&r1=1823931&r2=1823932&view=diff
==============================================================================
--- jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java (original)
+++ jmeter/trunk/src/components/org/apache/jmeter/visualizers/StatGraphVisualizer.java Mon Feb 12 10:08:48 2018
@@ -264,13 +264,38 @@ public class StatGraphVisualizer extends
public StatGraphVisualizer() {
super();
model = createObjectTableModel();
- eltList.add(new BarGraph(JMeterUtils.getResString("average"), true, new Color(202, 0, 0)));
- eltList.add(new BarGraph(JMeterUtils.getResString("aggregate_report_median"), false, new Color(49, 49, 181)));
- eltList.add(new BarGraph(MessageFormat.format(JMeterUtils.getResString("aggregate_report_xx_pct1_line"),new Object[]{PCT1_LABEL}), false, new Color(42, 121, 42)));
- eltList.add(new BarGraph(MessageFormat.format(JMeterUtils.getResString("aggregate_report_xx_pct2_line"),new Object[]{PCT2_LABEL}), false, new Color(242, 226, 8)));
- eltList.add(new BarGraph(MessageFormat.format(JMeterUtils.getResString("aggregate_report_xx_pct3_line"),new Object[]{PCT3_LABEL}), false, new Color(202, 10 , 232)));
- eltList.add(new BarGraph(JMeterUtils.getResString("aggregate_report_min"), false, Color.LIGHT_GRAY));
- eltList.add(new BarGraph(JMeterUtils.getResString("aggregate_report_max"), false, Color.DARK_GRAY));
+ eltList.add(new BarGraph(JMeterUtils.getResString("average"), true,
+ new Color(202, 0, 0)));
+ eltList.add(new BarGraph(
+ JMeterUtils.getResString("aggregate_report_median"), false,
+ new Color(49, 49, 181)));
+ eltList.add(
+ new BarGraph(
+ MessageFormat.format(
+ JMeterUtils.getResString(
+ "aggregate_report_xx_pct1_line"),
+ new Object[] { PCT1_LABEL }),
+ false, new Color(42, 121, 42)));
+ eltList.add(
+ new BarGraph(
+ MessageFormat.format(
+ JMeterUtils.getResString(
+ "aggregate_report_xx_pct2_line"),
+ new Object[] { PCT2_LABEL }),
+ false, new Color(242, 226, 8)));
+ eltList.add(
+ new BarGraph(
+ MessageFormat.format(
+ JMeterUtils.getResString(
+ "aggregate_report_xx_pct3_line"),
+ new Object[] { PCT3_LABEL }),
+ false, new Color(202, 10, 232)));
+ eltList.add(
+ new BarGraph(JMeterUtils.getResString("aggregate_report_min"),
+ false, Color.LIGHT_GRAY));
+ eltList.add(
+ new BarGraph(JMeterUtils.getResString("aggregate_report_max"),
+ false, Color.DARK_GRAY));
clearData();
init();
}
Modified: jmeter/trunk/src/core/org/apache/jmeter/reporters/Summariser.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/reporters/Summariser.java?rev=1823932&r1=1823931&r2=1823932&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/reporters/Summariser.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/reporters/Summariser.java Mon Feb 12 10:08:48 2018
@@ -82,7 +82,10 @@ public class Summariser extends Abstract
private static final boolean TOOUT = JMeterUtils.getPropDefault("summariser.out", true); //$NON-NLS-1$
/** Ignore TC generated SampleResult in summary */
- private static final boolean IGNORE_TC_GENERATED_SAMPLERESULT = JMeterUtils.getPropDefault("summariser.ignore_transaction_controller_sample_result", true); //$NON-NLS-1$
+ private static final boolean IGNORE_TC_GENERATED_SAMPLERESULT = JMeterUtils
+ .getPropDefault(
+ "summariser.ignore_transaction_controller_sample_result", //$NON-NLS-1$
+ true);
/*
* Ensure that a report is not skipped if we are slightly late in checking
Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java?rev=1823932&r1=1823931&r2=1823932&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Proxy.java Mon Feb 12 10:08:48 2018
@@ -250,9 +250,10 @@ public class Proxy extends Thread {
result = generateErrorResult(result, request, uhe); // Generate result (if nec.) and populate it
} catch (IllegalArgumentException e) {
log.error("{}Â Not implemented (probably used https)", port, e);
- writeErrorToClient(HttpReplyHdr.formNotImplemented("Probably used https instead of http. " +
- "To record https requests, see " +
- "<a href=\"http://jmeter.apache.org/usermanual/component_reference.html#HTTP(S)_Test_Script_Recorder\">HTTP(S) Test Script Recorder documentation</a>"));
+ writeErrorToClient(HttpReplyHdr.formNotImplemented("Probably used https instead of http. "
+ + "To record https requests, see "
+ + "<a href=\"http://jmeter.apache.org/usermanual/component_reference.html#HTTP(S)_Test_Script_Recorder\">"
+ + "HTTP(S) Test Script Recorder documentation</a>"));
result = generateErrorResult(result, request, e); // Generate result (if nec.) and populate it
} catch (Exception e) {
log.error("{}Â Exception when processing sample", port, e);
Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/LogFilter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/LogFilter.java?rev=1823932&r1=1823931&r2=1823932&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/LogFilter.java (original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/util/accesslog/LogFilter.java Mon Feb 12 10:08:48 2018
@@ -43,22 +43,24 @@ import org.slf4j.LoggerFactory;
* <p>
* Example of how to use it is provided in the main method. An example is
* provided below.
- * <pre>
+ * <pre>{@code
* testf = new LogFilter();
- * String[] incl = { "hello.html", "index.html", "/index.jsp" };
- * String[] thefiles = { "/test/hello.jsp", "/test/one/hello.html", "hello.jsp", "hello.htm", "/test/open.jsp",
- * "/test/open.html", "/index.jsp", "/index.jhtml", "newindex.jsp", "oldindex.jsp", "oldindex1.jsp",
- * "oldindex2.jsp", "oldindex3.jsp", "oldindex4.jsp", "oldindex5.jsp", "oldindex6.jsp", "/test/index.htm" };
+ * String[] incl = { "hello.html", "index.html", "/index.jsp" };
+ * String[] theFiles = {
+ * "/test/hello.jsp", "/test/one/hello.html", "hello.jsp", "hello.htm", "/test/open.jsp",
+ * "/test/open.html", "/index.jsp", "/index.jhtml", "newindex.jsp", "oldindex.jsp", "oldindex1.jsp",
+ * "oldindex2.jsp", "oldindex3.jsp", "oldindex4.jsp", "oldindex5.jsp", "oldindex6.jsp", "/test/index.htm"
+ * };
* testf.excludeFiles(incl);
- * System.out.println(" ------------ exclude test -------------");
- * for (int idx = 0; idx < thefiles.length; idx++) {
- * boolean fl = testf.isFiltered(thefiles[idx]);
- * String line = testf.filter(thefiles[idx]);
+ * System.out.println(" ------------ exclude test -------------");
+ * for (String theFile : theFiles) {
+ * boolean fl = testf.isFiltered(theFile);
+ * String line = testf.filter(theFile);
* if (line != null) {
- * System.out.println("the file: " + line);
+ * System.out.println("the file: " + line);
* }
* }
- * </pre>
+ * }</pre>
*
* As a general note. Both isFiltered and filter() have to be called. Calling
* either one will not produce the desired result. isFiltered(string) will tell
Modified: jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/config/gui/JavaConfigGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/config/gui/JavaConfigGui.java?rev=1823932&r1=1823931&r2=1823932&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/config/gui/JavaConfigGui.java (original)
+++ jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/config/gui/JavaConfigGui.java Mon Feb 12 10:08:48 2018
@@ -152,7 +152,10 @@ public class JavaConfigGui extends Abstr
log.debug("Exception getting interfaces.", e);
}
- classNameLabeledChoice = new JLabeledChoice(JMeterUtils.getResString("protocol_java_classname"), possibleClasses.toArray(ArrayUtils.EMPTY_STRING_ARRAY), true, false);
+ classNameLabeledChoice = new JLabeledChoice(
+ JMeterUtils.getResString("protocol_java_classname"),
+ possibleClasses.toArray(ArrayUtils.EMPTY_STRING_ARRAY), true,
+ false);
classNameLabeledChoice.addChangeListener(this);
warningLabel.setForeground(Color.RED);
Modified: jmeter/trunk/test/src/org/apache/jmeter/protocol/http/parser/TestHTMLParser.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/parser/TestHTMLParser.java?rev=1823932&r1=1823931&r2=1823932&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/protocol/http/parser/TestHTMLParser.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/protocol/http/parser/TestHTMLParser.java Mon Feb 12 10:08:48 2018
@@ -49,7 +49,8 @@ public class TestHTMLParser extends JMet
private static final String UA_IE55 = "Mozilla/4.0 (compatible;MSIE 5.5; Windows 98)";
private static final String UA_IE6 = "Mozilla/5.0 (Windows; U; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)";
private static final String UA_IE7 = "Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; en-US)";
- private static final String UA_IE8 = "Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB7.4; InfoPath.2; SV1; .NET CLR 3.3.69573; WOW64; en-US)";
+ private static final String UA_IE8 = "Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; "
+ + "GTB7.4; InfoPath.2; SV1; .NET CLR 3.3.69573; WOW64; en-US)";
private static final String UA_IE9 = "Mozilla/5.0 (Windows; U; MSIE 9.0; WIndows NT 9.0; en-US))";
private static final String UA_IE10 = "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)";
@@ -359,8 +360,11 @@ public class TestHTMLParser extends JMet
public void testSpecificParserList() throws Exception {
HTMLParser p = (HTMLParser) BaseParser.getParser(parserName);
- filetest(p, SPECIFIC_PARSER_TESTS[testNumber].fileName, SPECIFIC_PARSER_TESTS[testNumber].baseURL, SPECIFIC_PARSER_TESTS[testNumber].expectedList,
- new ArrayList<URLString>(), true, SPECIFIC_PARSER_TESTS[testNumber].userAgent);
+ filetest(p, SPECIFIC_PARSER_TESTS[testNumber].fileName,
+ SPECIFIC_PARSER_TESTS[testNumber].baseURL,
+ SPECIFIC_PARSER_TESTS[testNumber].expectedList,
+ new ArrayList<URLString>(), true,
+ SPECIFIC_PARSER_TESTS[testNumber].userAgent);
}
Modified: jmeter/trunk/test/src/org/apache/jmeter/testbeans/gui/PackageTest.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/testbeans/gui/PackageTest.java?rev=1823932&r1=1823931&r2=1823932&view=diff
==============================================================================
--- jmeter/trunk/test/src/org/apache/jmeter/testbeans/gui/PackageTest.java (original)
+++ jmeter/trunk/test/src/org/apache/jmeter/testbeans/gui/PackageTest.java Mon Feb 12 10:08:48 2018
@@ -193,10 +193,10 @@ public final class PackageTest extends J
String[] languages = JMeterMenuBar.getLanguages();
for (String lang : languages) {
final String[] language = lang.split("_");
- if (language.length == 1){
- suite.addTest(new PackageTest(testBeanClass, new Locale(language[0]), defaultBundle));
- } else if (language.length == 2){
- suite.addTest(new PackageTest(testBeanClass, new Locale(language[0], language[1]), defaultBundle));
+ if (language.length == 1) {
+ suite.addTest(new PackageTest(testBeanClass, new Locale(language[0]), defaultBundle));
+ } else if (language.length == 2) {
+ suite.addTest(new PackageTest(testBeanClass, new Locale(language[0], language[1]), defaultBundle));
}
}
}