You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by mi...@apache.org on 2016/09/11 18:33:18 UTC
svn commit: r1760268 - in /jmeter/trunk: bin/user.properties
src/core/org/apache/jmeter/report/config/ReportGeneratorConfiguration.java
xdocs/changes.xml xdocs/usermanual/generating-dashboard.xml
Author: milamber
Date: Sun Sep 11 18:33:18 2016
New Revision: 1760268
URL: http://svn.apache.org/viewvc?rev=1760268&view=rev
Log:
Add date format property for start/end date filter into Report generator
Add new dedicate section Report/dashboard into changes.xml
Bugzilla Id: 60115
Modified:
jmeter/trunk/bin/user.properties
jmeter/trunk/src/core/org/apache/jmeter/report/config/ReportGeneratorConfiguration.java
jmeter/trunk/xdocs/changes.xml
jmeter/trunk/xdocs/usermanual/generating-dashboard.xml
Modified: jmeter/trunk/bin/user.properties
URL: http://svn.apache.org/viewvc/jmeter/trunk/bin/user.properties?rev=1760268&r1=1760267&r2=1760268&view=diff
==============================================================================
--- jmeter/trunk/bin/user.properties (original)
+++ jmeter/trunk/bin/user.properties Sun Sep 11 18:33:18 2016
@@ -77,9 +77,11 @@
#jmeter.reportgenerator.report_title=Apache JMeter Dashboard
# Used to generate a report based on a date range if needed
-# Date range start date at format yyyyMMddHHmmss
+# Default date format (from SimpleDateFormat Java API and Locale.ENGLISH)
+#jmeter.reportgenerator.date_format=yyyyMMddHHmmss
+# Date range start date using date_format property
#jmeter.reportgenerator.start_date=
-# Date range end date at format yyyyMMddHHmmss
+# Date range end date using date_format property
#jmeter.reportgenerator.end_date=
# Change this parameter if you want to change the granularity of over time graphs.
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/config/ReportGeneratorConfiguration.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/config/ReportGeneratorConfiguration.java?rev=1760268&r1=1760267&r2=1760268&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/config/ReportGeneratorConfiguration.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/config/ReportGeneratorConfiguration.java Sun Sep 11 18:33:18 2016
@@ -22,6 +22,7 @@ import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
+import java.util.Locale;
import java.util.Map;
import java.util.Properties;
import java.util.regex.Pattern;
@@ -42,10 +43,14 @@ public class ReportGeneratorConfiguratio
private static final Logger LOG = LoggingManager.getLoggerForClass();
- private static final String RANGE_DATE_FORMAT = "yyyyMMddHHmmss"; //$NON-NLS-1$
+ private static final String RANGE_DATE_FORMAT_DEFAULT = "yyyyMMddHHmmss"; //$NON-NLS-1$
public static final char KEY_DELIMITER = '.';
public static final String REPORT_GENERATOR_KEY_PREFIX = "jmeter.reportgenerator";
+
+ public static final String REPORT_GENERATOR_KEY_RANGE_DATE_FORMAT = REPORT_GENERATOR_KEY_PREFIX
+ + KEY_DELIMITER + "date_format";
+
public static final String REPORT_GENERATOR_GRAPH_KEY_PREFIX = REPORT_GENERATOR_KEY_PREFIX
+ KEY_DELIMITER + "graph";
public static final String REPORT_GENERATOR_EXPORTER_KEY_PREFIX = REPORT_GENERATOR_KEY_PREFIX
@@ -634,15 +639,21 @@ public class ReportGeneratorConfiguratio
REPORT_GENERATOR_KEY_START_DATE, String.class);
final String endDateValue = getOptionalProperty(props,
REPORT_GENERATOR_KEY_END_DATE, String.class);
- SimpleDateFormat dateFormat = new SimpleDateFormat(RANGE_DATE_FORMAT);
+
+ String rangeDateFormat = getOptionalProperty(props, REPORT_GENERATOR_KEY_RANGE_DATE_FORMAT, String.class);
+ if (StringUtils.isEmpty(rangeDateFormat)) {
+ rangeDateFormat = RANGE_DATE_FORMAT_DEFAULT;
+ }
+ SimpleDateFormat dateFormat = new SimpleDateFormat(rangeDateFormat, Locale.ENGLISH);
+
try {
if(!StringUtils.isEmpty(startDateValue)) {
reportStartDate = dateFormat.parse(startDateValue);
configuration.setStartDate(reportStartDate);
}
} catch (ParseException e) {
- LOG.error("Error parsing property 'REPORT_GENERATOR_KEY_START_DATE' with value:" + startDateValue
- +" using format:"+RANGE_DATE_FORMAT, e);
+ LOG.error("Error parsing property " + REPORT_GENERATOR_KEY_START_DATE + " with value: " + startDateValue
+ + " using format: " + rangeDateFormat, e);
}
try {
if(!StringUtils.isEmpty(endDateValue)) {
@@ -650,11 +661,11 @@ public class ReportGeneratorConfiguratio
configuration.setEndDate(reportEndDate);
}
} catch (ParseException e) {
- LOG.error("Error parsing property 'REPORT_GENERATOR_KEY_START_DATE' with value:" + endDateValue
- +" using format:"+RANGE_DATE_FORMAT, e);
+ LOG.error("Error parsing property " + REPORT_GENERATOR_KEY_END_DATE + " with value: " + endDateValue
+ + " using format: " + rangeDateFormat, e);
}
- LOG.info("Will use date range start date: "+startDateValue+", end date: "+endDateValue);
+ LOG.info("Will use date range start date: " + startDateValue + ", end date: " + endDateValue);
// Find graph identifiers and load a configuration for each
final Map<String, GraphConfiguration> graphConfigurations = configuration
Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1760268&r1=1760267&r2=1760268&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml [utf-8] (original)
+++ jmeter/trunk/xdocs/changes.xml [utf-8] Sun Sep 11 18:33:18 2016
@@ -127,23 +127,27 @@ Summary
<li><pr>214</pr>Add spanish translation for delayed starting of threads. Contributed by Asier Lostal� (asier.lostale at openbravo.com).</li>
</ul>
-<h3>General</h3>
+<h3>Report / Dashboard</h3>
<ul>
- <li><bug>59803</bug>Use <code>isValid()</code> method from jdbc driver, if no validationQuery
- is given in JDBC Connection Configuration.</li>
- <li><bug>59918</bug>Ant generated HTML report is broken (extras folder)</li>
- <li><bug>57493</bug>Create a documentation page for properties</li>
- <li><bug>59924</bug>The log level of XXX package is set to DEBUG if <code>log_level.XXXX</code> property value contains spaces, same for __log function</li>
- <li><bug>59777</bug>Extract slf4j binding into its own jar and make it a jmeter lib</li>
<li><bug>59954</bug>Web Report/Dashboard : Add average metric</li>
<li><bug>59956</bug>Web Report / Dashboard : Add ability to generate a graph for a range of data</li>
<li><bug>60065</bug>Report / Dashboard : Improve Dashboard Error Summary by adding response message to "Type of error". Contributed by Ubik Load Pack (support at ubikloadpack.com)</li>
<li><bug>60079</bug>Report / Dashboard : Add a new "Response Time Overview" graph</li>
<li><bug>60080</bug>Report / Dashboard : Add a new "Connect Time Over Time " graph. Contributed by Ubik Load Pack (support at ubikloadpack.com)</li>
<li><bug>60091</bug>Report / Dashboard : Have a new report containing min/max and percentiles graphs.</li>
- <li><bug>60085</bug>Remove cache for prepared statements, as it didn't work with the current jdbc pool implementation and current jdbc drivers should support caching of prepared statements themselves.</li>
<li><bug>60108</bug>Report / Dashboard : In Requests Summary rounding is too aggressive</li>
<li><bug>60098</bug>Report / Dashboard : Reduce default value for "jmeter.reportgenerator.statistic_window" to reduce memory impact</li>
+ <li><bug>60115</bug>Add date format property for start/end date filter into Report generator</li>
+</ul>
+<h3>General</h3>
+<ul>
+ <li><bug>59803</bug>Use <code>isValid()</code> method from jdbc driver, if no validationQuery
+ is given in JDBC Connection Configuration.</li>
+ <li><bug>59918</bug>Ant generated HTML report is broken (extras folder)</li>
+ <li><bug>57493</bug>Create a documentation page for properties</li>
+ <li><bug>59924</bug>The log level of XXX package is set to DEBUG if <code>log_level.XXXX</code> property value contains spaces, same for __log function</li>
+ <li><bug>59777</bug>Extract slf4j binding into its own jar and make it a jmeter lib</li>
+ <li><bug>60085</bug>Remove cache for prepared statements, as it didn't work with the current jdbc pool implementation and current jdbc drivers should support caching of prepared statements themselves.</li>
</ul>
<ch_section>Non-functional changes</ch_section>
Modified: jmeter/trunk/xdocs/usermanual/generating-dashboard.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/usermanual/generating-dashboard.xml?rev=1760268&r1=1760267&r2=1760268&view=diff
==============================================================================
--- jmeter/trunk/xdocs/usermanual/generating-dashboard.xml (original)
+++ jmeter/trunk/xdocs/usermanual/generating-dashboard.xml Sun Sep 11 18:33:18 2016
@@ -111,50 +111,59 @@ jmeter.save.saveservice.timestamp_format
</note>
<properties>
<property name="report_title" required="No">
- Title used in the generated report.
+ Title used in the generated report.<br/>
Default: "Apache JMeter Dashboard"
</property>
+ <property name="date_format" required="No">
+ Default date format from <a href="http://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html">
+ SimpleDateFormat Java API</a> with Locale.ENGLISH.<br/>
+ Date format is <code>yyyyMMddHHmmss</code><br/>
+ Useful when you would generate a report after the load test, and the results file contains timestamp in
+ another time zone. In this case the date format must include the time zone (zzz).<br/>
+ Example: <code>dd/MM/yyyy HH:mm:ss zzz</code>
+ </property>
<property name="start_date" required="No">
- Start date of the range of data to use for report.
- Date format is <code>yyyyMMddHHmmss</code>
+ Start date of the range of data to use for report.<br/>
+ Date format is defined by date_format property.<br/>
Default: not filled which means data range will be used from the begining
</property>
<property name="end_date" required="No">
- End date of the range of data to use for report.
- Date format is <code>yyyyMMddHHmmss</code>
+ End date of the range of data to use for report.<br/>
+ Date format is defined by date_format property.<br/>
Default: not filled which means data range will be used until the end
</property>
<property name="overall_granularity" required="No">
- Granularity of over time graphs. Data is aggregated to have 1 minute ticks.
+ Granularity of over time graphs. Data is aggregated to have 1 minute ticks.<br/>
Default: "60000" (1 minute)
</property>
<property name="apdex_satisfied_threshold" required="No">
Sets the satisfaction threshold for the
<a href="https://en.wikipedia.org/wiki/Apdex" target="_blank">APDEX</a>
- calculation (in ms).
+ calculation (in ms).<br/>
Default: <code>500</code>
</property>
<property name="apdex_tolerated_threshold" required="No">
Sets the tolerance threshold for the APDEX calculation
- (in ms).
+ (in ms).<br/>
Default: <code>1500</code>
</property>
<property name="sample_filter" required="No">
Sets the filter of samples to keep for generating
graphs and statistics. An empty value deactivates the
- filtering.
- Format: Regular expression.
+ filtering.<br/>
+ Format: Regular expression.<br/>
Default: ""
</property>
<property name="temp_dir" required="No">
Sets the temporary directory used by the generation
process if it needs file I/O
- operations. Default: <code>temp</code>
+ operations.<br/>
+ Default: <code>temp</code>
</property>
<property name="statistic_window" required="No">
Sets the size of the sliding window used by percentile
evaluation. Caution: higher value provides a
- better accuracy but needs more memory.
+ better accuracy but needs more memory.<br/>
Default: <code>20000</code>
</property>
</properties>