DO NOT REPLY [Bug 48372] multibyte data getting corrupted with HTTP POST - when used JMeter 2.3.4
https://issues.apache.org/bugzilla/show_bug.cgi?id=48372 Sebb s...@apache.org changed: What|Removed |Added Status|NEW |NEEDINFO --- Comment #6 from Sebb s...@apache.org 2009-12-14 05:13:07 UTC --- Do I understand you correctly? Is it only the response that differs between 2.3RC4 and 2.3.4? What do the corresponding Sampler Result pages show? Just noticed that the image of the View Results Tree in 2.3.4 looks completely different from normal. The buttons are rounded, and the tabs look completely different. Also the test tree looks different. Are you sure you are using the official build of JMeter 2.3.4? Are you using the same version of Java for both tests, if so which? -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
svn commit: r890526 - in /jakarta/jmeter/trunk: docs/images/screenshots/ src/core/org/apache/jmeter/control/ src/core/org/apache/jmeter/control/gui/ src/core/org/apache/jmeter/resources/ xdocs/ xdocs/
Author: sebb Date: Mon Dec 14 22:52:28 2009 New Revision: 890526 URL: http://svn.apache.org/viewvc?rev=890526view=rev Log: Bug 41418 - Exclude timer duration from Transaction Controller runtime in report Modified: jakarta/jmeter/trunk/docs/images/screenshots/transactioncontroller.png jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/TransactionController.java jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/gui/TransactionControllerGui.java jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties jakarta/jmeter/trunk/xdocs/changes.xml jakarta/jmeter/trunk/xdocs/images/screenshots/transactioncontroller.png jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml Modified: jakarta/jmeter/trunk/docs/images/screenshots/transactioncontroller.png URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/docs/images/screenshots/transactioncontroller.png?rev=890526r1=890525r2=890526view=diff == Binary files - no diff available. Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/TransactionController.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/TransactionController.java?rev=890526r1=890525r2=890526view=diff == --- jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/TransactionController.java (original) +++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/TransactionController.java Mon Dec 14 22:52:28 2009 @@ -56,8 +56,20 @@ private transient int noFailingSamples; +/** + * Cumulated pause time to excluse timer and post/pre processor times + */ +private transient long pauseTime; + +/** + * Previous end time + */ +private transient long prevEndTime; + private static final String PARENT = TransactionController.parent;// $NON-NLS-1$ +private final static String INCLUDE_TIMERS = TransactionController.includeTimers;// $NON-NLS-1$ + /** * Creates a Transaction Controller */ @@ -152,6 +164,8 @@ // Assume success res.setSuccessful(true); res.sampleStart(); +prevEndTime = res.getStartTime();//??? +pauseTime = 0; } Sampler returnValue = super.next(); @@ -159,7 +173,8 @@ if (returnValue == null) // Must be the end of the controller { if (res != null) { -res.sampleEnd(); +res.setIdleTime(pauseTime+res.getIdleTime()); + res.sampleEnd(); res.setResponseMessage(Number of samples in transaction : + calls + , number of failing samples : + noFailingSamples); if(res.isSuccessful()) { res.setResponseCodeOK(); @@ -196,6 +211,10 @@ SampleResult sampleResult = se.getResult(); res.setThreadName(sampleResult.getThreadName()); res.setBytes(res.getBytes() + sampleResult.getBytes()); +if (!isIncludeTimers()) {// Accumulate waiting time for later + pauseTime += sampleResult.getEndTime() - sampleResult.getTime() - prevEndTime; + prevEndTime = sampleResult.getEndTime(); +} if(!sampleResult.isSuccessful()) { res.setSuccessful(false); noFailingSamples++; @@ -212,4 +231,22 @@ public void sampleStopped(SampleEvent e) { } + +/** + * Whether to include timers and pre/post processor time in overall sample. + * @param includeTimers + */ +public void setIncludeTimers(boolean includeTimers) { +setProperty(INCLUDE_TIMERS, includeTimers, true); // default true for compatibility +} + +/** + * Whether to include timer and pre/post processor time in overall sample. + * + * @return boolean (defaults to true for backwards compatibility) + */ +public boolean isIncludeTimers() { + return getPropertyAsBoolean(INCLUDE_TIMERS, true); +} + } Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/gui/TransactionControllerGui.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/gui/TransactionControllerGui.java?rev=890526r1=890525r2=890526view=diff == --- jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/gui/TransactionControllerGui.java (original) +++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/control/gui/TransactionControllerGui.java Mon Dec 14 22:52:28 2009 @@ -32,6 +32,8 @@ public class TransactionControllerGui extends AbstractControllerGui { private JCheckBox parent; // If selected, then generate parent sample, otherwise as per original
DO NOT REPLY [Bug 41418] Excludes timer duration from Transaction Controller runtime in report
https://issues.apache.org/bugzilla/show_bug.cgi?id=41418 Sebb s...@apache.org changed: What|Removed |Added Status|NEEDINFO|RESOLVED Resolution||FIXED --- Comment #13 from Sebb s...@apache.org 2009-12-14 14:54:06 UTC --- Thanks for the patch; it seems to work fine. Patch committed to SVN: URL: http://svn.apache.org/viewvc?rev=890526view=rev Log: Bug 41418 - Exclude timer duration from Transaction Controller runtime in report -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
svn commit: r890544 - in /jakarta/jmeter/trunk: src/core/org/apache/jmeter/resources/messages.properties src/functions/org/apache/jmeter/functions/FileToString.java xdocs/usermanual/functions.xml
Author: sebb Date: Mon Dec 14 23:12:57 2009 New Revision: 890544 URL: http://svn.apache.org/viewvc?rev=890544view=rev Log: Add optional encoding parameter to FileToString function Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/FileToString.java jakarta/jmeter/trunk/xdocs/usermanual/functions.xml Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties?rev=890544r1=890543r2=890544view=diff == --- jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties (original) +++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties Mon Dec 14 23:12:57 2009 @@ -799,7 +799,8 @@ stopping_test=Shutting down all test threads. Please be patient. stopping_test_failed=One or more test threads won't exit; see log file. stopping_test_title=Stopping Test -string_from_file_file_name=Enter full path to file +string_from_file_encoding=File encoding if not the platform default (opt) +string_from_file_file_name=Enter path (absolute or relative) to file string_from_file_seq_final=Final file sequence number (opt) string_from_file_seq_start=Start file sequence number (opt) summariser_title=Generate Summary Results Modified: jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/FileToString.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/FileToString.java?rev=890544r1=890543r2=890544view=diff == --- jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/FileToString.java (original) +++ jakarta/jmeter/trunk/src/functions/org/apache/jmeter/functions/FileToString.java Mon Dec 14 23:12:57 2009 @@ -39,6 +39,7 @@ * * Parameters: * - file name + * - file encoding (optional) * - variable name (optional) * * Returns: @@ -58,14 +59,17 @@ static { desc.add(JMeterUtils.getResString(string_from_file_file_name));//$NON-NLS-1$ + desc.add(JMeterUtils.getResString(string_from_file_encoding));//$NON-NLS-1$ desc.add(JMeterUtils.getResString(function_name_paropt));//$NON-NLS-1$ } private static final int MIN_PARAM_COUNT = 1; -private static final int MAX_PARAM_COUNT = 2; +private static final int MAX_PARAM_COUNT = 3; -private static final int PARAM_NAME = 2; +private static final int ENCODING = 2; + +private static final int PARAM_NAME = 3; private Object[] values; @@ -79,6 +83,11 @@ String fileName = ((CompoundVariable) values[0]).execute(); +String encoding = null;//means platform default +if (values.length = ENCODING) { +encoding = ((CompoundVariable) values[ENCODING - 1]).execute().trim(); +} + String myName = ;//$NON-NLS-1$ if (values.length = PARAM_NAME) { myName = ((CompoundVariable) values[PARAM_NAME - 1]).execute().trim(); @@ -87,7 +96,7 @@ String myValue = ERR_IND; try { -myValue = FileUtils.readFileToString(new File(fileName), null); +myValue = FileUtils.readFileToString(new File(fileName), encoding); } catch (IOException e) { log.warn(Could not read file: +fileName+ +e.getMessage()); throw new JMeterStopThreadException(End of sequence); Modified: jakarta/jmeter/trunk/xdocs/usermanual/functions.xml URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/usermanual/functions.xml?rev=890544r1=890543r2=890544view=diff == --- jakarta/jmeter/trunk/xdocs/usermanual/functions.xml (original) +++ jakarta/jmeter/trunk/xdocs/usermanual/functions.xml Mon Dec 14 23:12:57 2009 @@ -1105,11 +1105,14 @@ property name=File Name required=YesPath to the file name. (The path can be relative to the JMeter launch directory) /property +property name=File encoding if not the platform default required=No +The encoding to be used to read the file. If not specified, the platform default is used. +/property property name=Variable Name required=No A reference name - refName - for reusing the value created by this function. Stored values are of the form ${refName}. /property /properties -pThe file name parameter and reference name parameter (if supplied) are resolved every time the function is executed./p +pThe file name, encoding and reference name parameters are resolved every time the function is executed./p /component /subsection
svn commit: r890577 - /jakarta/jmeter/trunk/test/src/org/apache/jorphan/math/TestStatCalculator.java
Author: sebb Date: Tue Dec 15 00:15:20 2009 New Revision: 890577 URL: http://svn.apache.org/viewvc?rev=890577view=rev Log: Ensure initial min and max are correct Modified: jakarta/jmeter/trunk/test/src/org/apache/jorphan/math/TestStatCalculator.java Modified: jakarta/jmeter/trunk/test/src/org/apache/jorphan/math/TestStatCalculator.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jorphan/math/TestStatCalculator.java?rev=890577r1=890576r2=890577view=diff == --- jakarta/jmeter/trunk/test/src/org/apache/jorphan/math/TestStatCalculator.java (original) +++ jakarta/jmeter/trunk/test/src/org/apache/jorphan/math/TestStatCalculator.java Tue Dec 15 00:15:20 2009 @@ -33,9 +33,6 @@ super(); } -/** - * @param arg0 - */ public TestStatCalculator(String arg0) { super(arg0); } @@ -60,6 +57,8 @@ assertEquals(9, calc.getPercentPoint(0.899).intValue()); } public void testCalculation() { +assertEquals(Long.MIN_VALUE, calc.getMax().longValue()); +assertEquals(Long.MAX_VALUE, calc.getMin().longValue()); calc.addValue(18); calc.addValue(10); calc.addValue(9); @@ -91,6 +90,8 @@ public void testInteger(){ StatCalculatorInteger calci = new StatCalculatorInteger(); +assertEquals(Integer.MIN_VALUE, calci.getMax().intValue()); +assertEquals(Integer.MAX_VALUE, calci.getMin().intValue()); calci.addValue(0); calci.addValue(2); calci.addValue(2); - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
svn commit: r890589 - in /jakarta/jmeter/trunk: src/jorphan/org/apache/jorphan/math/StatCalculator.java xdocs/changes.xml
Author: sebb Date: Tue Dec 15 00:53:43 2009 New Revision: 890589 URL: http://svn.apache.org/viewvc?rev=890589view=rev Log: Bug 48259 - Improve StatCalculator performance by using HashMap Modified: jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java jakarta/jmeter/trunk/xdocs/changes.xml Modified: jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java?rev=890589r1=890588r2=890589view=diff == --- jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java (original) +++ jakarta/jmeter/trunk/src/jorphan/org/apache/jorphan/math/StatCalculator.java Tue Dec 15 00:53:43 2009 @@ -18,11 +18,10 @@ package org.apache.jorphan.math; -import java.util.ArrayList; -import java.util.Collections; import java.util.HashMap; -import java.util.Iterator; -import java.util.List; +import java.util.TreeSet; + +import org.apache.commons.lang.mutable.MutableLong; /** * This class serves as a way to calculate the median, max, min etc. of a list of values. @@ -31,8 +30,10 @@ */ public abstract class StatCalculatorT extends Number Comparable? super T { -private final ListT values = new ArrayListT(); +// key is the type to collect (usually long), value = count of entries +private final HashMapT, MutableLong valuesMap = new HashMapT, MutableLong(); +// Running values, updated for each sample private double sum = 0; private double sumOfSquares = 0; @@ -43,13 +44,19 @@ private int count = 0; +private T min; + +private T max; + +private transient TreeSetT sortedKeys; // cached sorted set + private long bytes = 0; private final T ZERO; -private final T MAX_VALUE; +private final T MAX_VALUE; // e.g. Long.MAX_VALUE -private final T MIN_VALUE; +private final T MIN_VALUE; // e.g. Long.MIN_VALUE /** * This constructor is used to set up particular values for the generic class instance. @@ -58,20 +65,27 @@ * @param min - value to return for minimum if there are no values * @param max - value to return for maximum if there are no values */ -public StatCalculator(T zero, T min, T max) { +public StatCalculator(final T zero, final T min, final T max) { super(); ZERO = zero; MAX_VALUE = max; MIN_VALUE = min; +this.min = MAX_VALUE; +this.max = MIN_VALUE; +sortedKeys = null; } public void clear() { -values.clear(); +valuesMap.clear(); +sortedKeys = null; sum = 0; sumOfSquares = 0; mean = 0; deviation = 0; count = 0; +bytes = 0; +max = MIN_VALUE; +min = MAX_VALUE; } @@ -80,17 +94,13 @@ } public void addAll(StatCalculatorT calc) { -IteratorT iter = calc.values.iterator(); -while (iter.hasNext()) { -addValue(iter.next()); +for (T val : calc.valuesMap.keySet()) { +addValue(val); } } public T getMedian() { -if (count 0) { -return values.get((int) (values.size() * .5)); -} -return ZERO; +return getPercentPoint(0.5); } public long getTotalBytes() { @@ -107,10 +117,7 @@ * @return number of values less than the percentage */ public T getPercentPoint(float percent) { -if (count 0) { -return values.get((int) (values.size() * percent)); -} -return ZERO; +return getPercentPoint((double) percent); } /** @@ -120,42 +127,45 @@ * are below, the remaining 10% are above. * * @param percent - * @return number of values less than the percentage + * @return the value which %percent% of the values are less than */ public T getPercentPoint(double percent) { -if (count 0) { -return values.get((int) (values.size() * percent)); +if (count = 0) { +return ZERO; +} +if (percent = 1.0) { +return getMax(); } -return ZERO; + +// use Math.round () instead of simple (long) to provide correct value rounding +long target = Math.round (count * percent); +if (sortedKeys == null){ +sortedKeys = new TreeSetT (valuesMap.keySet()); +} +for (T val : sortedKeys) { +target -= valuesMap.get(val).longValue(); +if (target = 0){ +return val; +} +} +return ZERO; // TODO should this be getMin()? } /** * Returns the distribution of the values in the list. * - * TODO round values to reduce the number of distinct entries. - *
DO NOT REPLY [Bug 48259] Improve StatCalculator performance by using HashMap
https://issues.apache.org/bugzilla/show_bug.cgi?id=48259 Sebb s...@apache.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #1 from Sebb s...@apache.org 2009-12-14 16:59:20 UTC --- Thanks for the patch. This has been applied to SVN: URL: http://svn.apache.org/viewvc?rev=890589view=rev Log: Bug 48259 - Improve StatCalculator performance by using HashMap I made a few changes: - instead of sorting the keys and using last or first to get max and min the code keeps track of the values. - the sorted TreeSet is cached - use MutableLong (Commons LANG) instead of Long -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
DO NOT REPLY [Bug 48372] multibyte data getting corrupted with HTTP POST - when used JMeter 2.3.4
https://issues.apache.org/bugzilla/show_bug.cgi?id=48372 jml jmltestacco...@gmail.com changed: What|Removed |Added Status|NEEDINFO|NEW --- Comment #7 from jml jmltestacco...@gmail.com 2009-12-14 20:38:01 UTC --- Please find my comments below for the questions you had asked : Is it only the response that differs between 2.3RC4 and 2.3.4? the multibyte content inside the response is seen garbled with 2.3.4 , whereas in 2.3RC4 its proper. here is the overview : * iam sending a HTTP POST request(i have explained already how the request is formed and sent, as shown in sample jmx file). * then checking the response received (i.e iam viewing this under the View result tree , under that the node called HTTP response. I have shown this in attached screenshots) * in that response it has multibyte content(like calendar names etc in non-english) . problem is -those multibyte data is garbled in response(when in 2.3.4) What do the corresponding Sampler Result pages show? i did not understand this question clearly -- i have sent the screen shots for result - i.e of the view result tree. That shows how the result is seen. Just noticed that the image of the View Results Tree in 2.3.4 looks completely different from normal. The buttons are rounded, and the tabs look completely different. Also the test tree looks different. Are you sure you are using the official build of JMeter 2.3.4? i accessed this page for download : http://jakarta.apache.org/site/downloads/downloads_jmeter.cgi on this page : i clicked the Binary- 2.3.4.zip link and downloaded the zip file . is this not the official release of 2.3.4 ? Are you using the same version of Java for both tests, if so which? yes. same version of Java all the time. I mean, i have my terminal set with JAVA_HOME to version 1.5.0_13. On same terminal i open the jmeter gui --for both versions. am i correct in understanding that jmeter takes java as per the terminal setting- or do i need to set that explicitly anywhere for 2.3.4 ? -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org