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 2015/12/10 19:55:23 UTC
svn commit: r1719183 [1/5] - in /jmeter/trunk/src/core/org/apache/jmeter: ./
report/config/ report/core/ report/dashboard/ report/processor/
report/processor/graph/ report/processor/graph/impl/
Author: fschumacher
Date: Thu Dec 10 18:55:22 2015
New Revision: 1719183
URL: http://svn.apache.org/viewvc?rev=1719183&view=rev
Log:
whitespace police (reformat with eclipse)
Modified:
jmeter/trunk/src/core/org/apache/jmeter/JMeter.java
jmeter/trunk/src/core/org/apache/jmeter/report/config/ReportGeneratorConfiguration.java
jmeter/trunk/src/core/org/apache/jmeter/report/core/ArgumentNullException.java
jmeter/trunk/src/core/org/apache/jmeter/report/core/ControllerSamplePredicate.java
jmeter/trunk/src/core/org/apache/jmeter/report/core/CsvFile.java
jmeter/trunk/src/core/org/apache/jmeter/report/core/CsvSampleWriter.java
jmeter/trunk/src/core/org/apache/jmeter/report/core/JsonUtil.java
jmeter/trunk/src/core/org/apache/jmeter/report/core/Sample.java
jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleBuilder.java
jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleException.java
jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleMetaDataParser.java
jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleMetadata.java
jmeter/trunk/src/core/org/apache/jmeter/report/core/TimeHelper.java
jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/AbstractDataExporter.java
jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/DataExporter.java
jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/ExportException.java
jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/GenerationException.java
jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/HtmlTemplateExporter.java
jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/JsonizerVisitor.java
jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/ReportGenerator.java
jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/TemplateVisitor.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/AbstractAggregatorFactory.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/AbstractSampleConsumer.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/AbstractSampleProcessor.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/AbstractSampleSource.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/AbstractSummaryConsumer.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/AggregateConsumer.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/ApdexSummaryConsumer.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/ApdexSummaryData.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/ApdexThresholdsInfo.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/CsvFileSampleSource.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/ErrorsSummaryConsumer.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/ExternalSampleSorter.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/FieldSampleComparator.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/FilterConsumer.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/Job.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/ListResultData.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/MapResultData.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/MaxAggregator.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/MeanAggregator.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/MeanAggregatorFactory.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/MedianAggregatorFactory.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/MinAggregator.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/NormalizerSampleConsumer.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/PercentileAggregator.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/PercentileAggregatorFactory.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/RequestsSummaryConsumer.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/SampleContext.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/StatisticsSummaryData.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/TaggerConsumer.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/AbstractGraphConsumer.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/AbstractOverTimeGraphConsumer.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/AbstractSeriesSelector.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/AbstractVersusRequestsGraphConsumer.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/CodeSeriesSelector.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/CountValueSelector.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/ElapsedTimeValueSelector.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GroupData.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GroupInfo.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/IndexedNameSelector.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/LatencyValueSelector.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/NameSeriesSelector.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ActiveThreadsGraphConsumer.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/BytesThroughputGraphConsumer.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/CodesPerSecondGraphConsumer.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/HitsPerSecondGraphConsumer.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/LatencyOverTimeGraphConsumer.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/LatencyVSRequestGraphConsumer.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ResponseTimeDistributionGraphConsumer.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ResponseTimeOverTimeGraphConsumer.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ResponseTimePerSampleGraphConsumer.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ResponseTimePercentilesGraphConsumer.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ResponseTimeVSRequestGraphConsumer.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/TimeVSThreadGraphConsumer.java
jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/TransactionsPerSecondGraphConsumer.java
Modified: jmeter/trunk/src/core/org/apache/jmeter/JMeter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/JMeter.java?rev=1719183&r1=1719182&r2=1719183&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/JMeter.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/JMeter.java Thu Dec 10 18:55:22 2015
@@ -208,14 +208,14 @@ public class JMeter implements JMeterPlu
new CLOptionDescriptor("homedir", CLOptionDescriptor.ARGUMENT_REQUIRED, JMETER_HOME_OPT,
"the jmeter home directory to use"),
new CLOptionDescriptor("remoteexit", CLOptionDescriptor.ARGUMENT_DISALLOWED, REMOTE_STOP,
- "Exit the remote servers at end of test (non-GUI)"),
+ "Exit the remote servers at end of test (non-GUI)"),
new CLOptionDescriptor("reportonly",
- CLOptionDescriptor.ARGUMENT_REQUIRED, REPORT_GENERATING_OPT,
- "generate report dashboard only"),
+ CLOptionDescriptor.ARGUMENT_REQUIRED, REPORT_GENERATING_OPT,
+ "generate report dashboard only"),
new CLOptionDescriptor("reportatendofloadtests",
- CLOptionDescriptor.ARGUMENT_DISALLOWED, REPORT_AT_END_OPT,
- "generate report dashboard after load test")
- };
+ CLOptionDescriptor.ARGUMENT_DISALLOWED, REPORT_AT_END_OPT,
+ "generate report dashboard after load test")
+ };
public JMeter() {
}
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=1719183&r1=1719182&r2=1719183&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 Thu Dec 10 18:55:22 2015
@@ -43,29 +43,29 @@ public class ReportGeneratorConfiguratio
public static final char KEY_DELIMITER = '.';
public static final String REPORT_GENERATOR_KEY_PREFIX = "jmeter.reportgenerator";
public static final String REPORT_GENERATOR_GRAPH_KEY_PREFIX = REPORT_GENERATOR_KEY_PREFIX
- + KEY_DELIMITER + "graph";
+ + KEY_DELIMITER + "graph";
public static final String REPORT_GENERATOR_EXPORTER_KEY_PREFIX = REPORT_GENERATOR_KEY_PREFIX
- + KEY_DELIMITER + "exporter";
+ + KEY_DELIMITER + "exporter";
// Temporary directory
private static final String REPORT_GENERATOR_KEY_TEMP_DIR = REPORT_GENERATOR_KEY_PREFIX
- + KEY_DELIMITER + "temp_dir";
+ + KEY_DELIMITER + "temp_dir";
private static final File REPORT_GENERATOR_KEY_TEMP_DIR_DEFAULT = new File(
- "temp");
+ "temp");
// Apdex Satified Threshold
private static final String REPORT_GENERATOR_KEY_APDEX_SATISFIED_THRESHOLD = REPORT_GENERATOR_KEY_PREFIX
- + KEY_DELIMITER + "apdex_statisfied_threshold";
+ + KEY_DELIMITER + "apdex_statisfied_threshold";
private static final long REPORT_GENERATOR_KEY_APDEX_SATISFIED_THRESHOLD_DEFAULT = 500L;
// Apdex Tolerated Threshold
private static final String REPORT_GENERATOR_KEY_APDEX_TOLERATED_THRESHOLD = REPORT_GENERATOR_KEY_PREFIX
- + KEY_DELIMITER + "apdex_tolerated_threshold";
+ + KEY_DELIMITER + "apdex_tolerated_threshold";
private static final long REPORT_GENERATOR_KEY_APDEX_TOLERATED_THRESHOLD_DEFAULT = 1500L;
// Sample Filter
private static final String REPORT_GENERATOR_KEY_SAMPLE_FILTER = REPORT_GENERATOR_KEY_PREFIX
- + KEY_DELIMITER + "sample_filter";
+ + KEY_DELIMITER + "sample_filter";
private static final String LOAD_EXPORTER_FMT = "Load configuration for exporter \"%s\"";
private static final String LOAD_GRAPH_FMT = "Load configuration for graph \"%s\"";
@@ -113,10 +113,10 @@ public class ReportGeneratorConfiguratio
* the generic type
*/
private interface SubConfigurationFactory<TSubConfiguration> {
- TSubConfiguration createSubConfiguration();
+ TSubConfiguration createSubConfiguration();
- void initialize(String subConfId, TSubConfiguration subConfiguration)
- throws ConfigurationException;
+ void initialize(String subConfId, TSubConfiguration subConfiguration)
+ throws ConfigurationException;
}
private String sampleFilter;
@@ -133,7 +133,7 @@ public class ReportGeneratorConfiguratio
* @return the overall sample filter
*/
public final String getSampleFilter() {
- return sampleFilter;
+ return sampleFilter;
}
/**
@@ -143,17 +143,17 @@ public class ReportGeneratorConfiguratio
* the new overall sample filter
*/
public final void setSampleFilter(String sampleFilter) {
- if (Objects.equals(this.sampleFilter, sampleFilter) == false) {
- this.sampleFilter = sampleFilter;
- filteredSamples.clear();
- if (sampleFilter != null) {
- String[] items = sampleFilter.split(",");
- int count = items.length;
- for (int index = 0; index < count; index++) {
- filteredSamples.add(items[index].trim());
- }
- }
- }
+ if (Objects.equals(this.sampleFilter, sampleFilter) == false) {
+ this.sampleFilter = sampleFilter;
+ filteredSamples.clear();
+ if (sampleFilter != null) {
+ String[] items = sampleFilter.split(",");
+ int count = items.length;
+ for (int index = 0; index < count; index++) {
+ filteredSamples.add(items[index].trim());
+ }
+ }
+ }
}
/**
@@ -162,7 +162,7 @@ public class ReportGeneratorConfiguratio
* @return the temporary directory
*/
public final File getTempDirectory() {
- return tempDirectory;
+ return tempDirectory;
}
/**
@@ -172,7 +172,7 @@ public class ReportGeneratorConfiguratio
* the temporary directory to set
*/
public final void setTempDirectory(File tempDirectory) {
- this.tempDirectory = tempDirectory;
+ this.tempDirectory = tempDirectory;
}
/**
@@ -181,7 +181,7 @@ public class ReportGeneratorConfiguratio
* @return the apdex satisfied threshold
*/
public final long getApdexSatisfiedThreshold() {
- return apdexSatisfiedThreshold;
+ return apdexSatisfiedThreshold;
}
/**
@@ -191,7 +191,7 @@ public class ReportGeneratorConfiguratio
* the apdex satisfied threshold to set
*/
public final void setApdexSatisfiedThreshold(long apdexSatisfiedThreshold) {
- this.apdexSatisfiedThreshold = apdexSatisfiedThreshold;
+ this.apdexSatisfiedThreshold = apdexSatisfiedThreshold;
}
/**
@@ -200,7 +200,7 @@ public class ReportGeneratorConfiguratio
* @return the apdex tolerated threshold
*/
public final long getApdexToleratedThreshold() {
- return apdexToleratedThreshold;
+ return apdexToleratedThreshold;
}
/**
@@ -210,7 +210,7 @@ public class ReportGeneratorConfiguratio
* the apdex tolerated threshold to set
*/
public final void setApdexToleratedThreshold(long apdexToleratedThreshold) {
- this.apdexToleratedThreshold = apdexToleratedThreshold;
+ this.apdexToleratedThreshold = apdexToleratedThreshold;
}
/**
@@ -219,7 +219,7 @@ public class ReportGeneratorConfiguratio
* @return the filteredSamples
*/
public final List<String> getFilteredSamples() {
- return filteredSamples;
+ return filteredSamples;
}
/**
@@ -228,7 +228,7 @@ public class ReportGeneratorConfiguratio
* @return the export configurations
*/
public final Map<String, ExporterConfiguration> getExportConfigurations() {
- return exportConfigurations;
+ return exportConfigurations;
}
/**
@@ -237,7 +237,7 @@ public class ReportGeneratorConfiguratio
* @return the graph configurations
*/
public final Map<String, GraphConfiguration> getGraphConfigurations() {
- return graphConfigurations;
+ return graphConfigurations;
}
// /**
@@ -262,8 +262,8 @@ public class ReportGeneratorConfiguratio
* @return the sub configuration property prefix
*/
public static String getSubConfigurationPropertyPrefix(String keyPrefix,
- String subConfId) {
- return keyPrefix + KEY_DELIMITER + subConfId;
+ String subConfId) {
+ return keyPrefix + KEY_DELIMITER + subConfId;
}
/**
@@ -277,9 +277,9 @@ public class ReportGeneratorConfiguratio
* @return the sub configuration property key
*/
public static String getSubConfigurationPropertyKey(String keyPrefix,
- String subConfId, String propertyName) {
- return getSubConfigurationPropertyPrefix(keyPrefix, subConfId)
- + KEY_DELIMITER + propertyName;
+ String subConfId, String propertyName) {
+ return getSubConfigurationPropertyPrefix(keyPrefix, subConfId)
+ + KEY_DELIMITER + propertyName;
}
/**
@@ -293,10 +293,10 @@ public class ReportGeneratorConfiguratio
* @return the exporter property key
*/
public static String getExporterPropertyKey(String exporterId,
- String propertyName) {
- return getSubConfigurationPropertyPrefix(
- REPORT_GENERATOR_EXPORTER_KEY_PREFIX, exporterId)
- + KEY_DELIMITER + propertyName;
+ String propertyName) {
+ return getSubConfigurationPropertyPrefix(
+ REPORT_GENERATOR_EXPORTER_KEY_PREFIX, exporterId)
+ + KEY_DELIMITER + propertyName;
}
// /**
@@ -321,10 +321,10 @@ public class ReportGeneratorConfiguratio
* @return the graph property key
*/
public static String getGraphPropertyKey(String graphId, String propertyName) {
- return getSubConfigurationPropertyPrefix(
- REPORT_GENERATOR_GRAPH_KEY_PREFIX, graphId)
- + KEY_DELIMITER
- + propertyName;
+ return getSubConfigurationPropertyPrefix(
+ REPORT_GENERATOR_GRAPH_KEY_PREFIX, graphId)
+ + KEY_DELIMITER
+ + propertyName;
}
/**
@@ -346,37 +346,37 @@ public class ReportGeneratorConfiguratio
* thrown when the property cannot be cast to the specified type
*/
private static <TProperty> TProperty getProperty(Props props, String key,
- TProperty defaultValue, Class<TProperty> clazz)
- throws ConfigurationException {
- TProperty property = null;
- String value = props.getValue(key);
- if (value == null) {
- if (defaultValue != null) {
- property = defaultValue;
- log.info(String.format(NOT_FOUND_PROPERTY_FMT, key,
- defaultValue));
- }
- } else {
- property = ConfigurationUtils.convert(value, clazz);
- }
- return property;
+ TProperty defaultValue, Class<TProperty> clazz)
+ throws ConfigurationException {
+ TProperty property = null;
+ String value = props.getValue(key);
+ if (value == null) {
+ if (defaultValue != null) {
+ property = defaultValue;
+ log.info(String.format(NOT_FOUND_PROPERTY_FMT, key,
+ defaultValue));
+ }
+ } else {
+ property = ConfigurationUtils.convert(value, clazz);
+ }
+ return property;
}
private static <TProperty> TProperty getOptionalProperty(Props props,
- String key, Class<TProperty> clazz) throws ConfigurationException {
- TProperty property = getProperty(props, key, null, clazz);
- if (property != null) {
- log.debug(String.format(OPTIONAL_PROPERTY_FMT, property, key));
- }
- return property;
+ String key, Class<TProperty> clazz) throws ConfigurationException {
+ TProperty property = getProperty(props, key, null, clazz);
+ if (property != null) {
+ log.debug(String.format(OPTIONAL_PROPERTY_FMT, property, key));
+ }
+ return property;
}
private static <TProperty> TProperty getRequiredProperty(Props props,
- String key, TProperty defaultValue, Class<TProperty> clazz)
- throws ConfigurationException {
- TProperty property = getProperty(props, key, defaultValue, clazz);
- log.debug(String.format(REQUIRED_PROPERTY_FMT, property, key));
- return property;
+ String key, TProperty defaultValue, Class<TProperty> clazz)
+ throws ConfigurationException {
+ TProperty property = getProperty(props, key, defaultValue, clazz);
+ log.debug(String.format(REQUIRED_PROPERTY_FMT, property, key));
+ return property;
}
/**
@@ -420,48 +420,48 @@ public class ReportGeneratorConfiguratio
* the configuration exception
*/
private static <TSubConf extends SubConfiguration> void loadSubConfiguration(
- Map<String, TSubConf> subConfigurations, Props props,
- String propertyPrefix, boolean noPropertyKey,
- SubConfigurationFactory<TSubConf> factory)
- throws ConfigurationException {
-
- for (Map.Entry<String, Object> entry : props.innerMap(propertyPrefix)
- .entrySet()) {
- String key = entry.getKey();
- int index = key.indexOf(KEY_DELIMITER);
- if (index > 0) {
- String name = key.substring(0, index);
- TSubConf subConfiguration = subConfigurations.get(name);
- if (subConfiguration == null) {
- subConfiguration = factory.createSubConfiguration();
- subConfigurations.put(name, subConfiguration);
- }
- } else {
- log.warn(String.format(INVALID_KEY_FMT, key));
- }
- }
-
- // Load sub configurations
- for (Map.Entry<String, TSubConf> entry : subConfigurations.entrySet()) {
- String subConfId = entry.getKey();
- final TSubConf subConfiguration = entry.getValue();
-
- // Load specific properties
- factory.initialize(subConfId, subConfiguration);
-
- // Load extra properties
- Map<String, Object> extraKeys = props
- .innerMap(noPropertyKey ? getSubConfigurationPropertyPrefix(
- propertyPrefix, subConfId)
- : getSubConfigurationPropertyKey(propertyPrefix,
- subConfId, SUBCONF_KEY_PROPERTY));
- Map<String, String> extraProperties = subConfiguration
- .getProperties();
- for (Map.Entry<String, Object> entryProperty : extraKeys.entrySet()) {
- extraProperties.put(entryProperty.getKey(),
- (String) entryProperty.getValue());
- }
- }
+ Map<String, TSubConf> subConfigurations, Props props,
+ String propertyPrefix, boolean noPropertyKey,
+ SubConfigurationFactory<TSubConf> factory)
+ throws ConfigurationException {
+
+ for (Map.Entry<String, Object> entry : props.innerMap(propertyPrefix)
+ .entrySet()) {
+ String key = entry.getKey();
+ int index = key.indexOf(KEY_DELIMITER);
+ if (index > 0) {
+ String name = key.substring(0, index);
+ TSubConf subConfiguration = subConfigurations.get(name);
+ if (subConfiguration == null) {
+ subConfiguration = factory.createSubConfiguration();
+ subConfigurations.put(name, subConfiguration);
+ }
+ } else {
+ log.warn(String.format(INVALID_KEY_FMT, key));
+ }
+ }
+
+ // Load sub configurations
+ for (Map.Entry<String, TSubConf> entry : subConfigurations.entrySet()) {
+ String subConfId = entry.getKey();
+ final TSubConf subConfiguration = entry.getValue();
+
+ // Load specific properties
+ factory.initialize(subConfId, subConfiguration);
+
+ // Load extra properties
+ Map<String, Object> extraKeys = props
+ .innerMap(noPropertyKey ? getSubConfigurationPropertyPrefix(
+ propertyPrefix, subConfId)
+ : getSubConfigurationPropertyKey(propertyPrefix,
+ subConfId, SUBCONF_KEY_PROPERTY));
+ Map<String, String> extraProperties = subConfiguration
+ .getProperties();
+ for (Map.Entry<String, Object> entryProperty : extraKeys.entrySet()) {
+ extraProperties.put(entryProperty.getKey(),
+ (String) entryProperty.getValue());
+ }
+ }
}
/**
@@ -472,183 +472,183 @@ public class ReportGeneratorConfiguratio
* @return the report generator configuration
*/
public static ReportGeneratorConfiguration LoadFromProperties(
- Properties properties) throws ConfigurationException {
+ Properties properties) throws ConfigurationException {
- log.debug(START_LOADING_MSG);
+ log.debug(START_LOADING_MSG);
- ReportGeneratorConfiguration configuration = new ReportGeneratorConfiguration();
+ ReportGeneratorConfiguration configuration = new ReportGeneratorConfiguration();
- // Use jodd.Props to ease property handling
- final Props props = new Props();
- props.load(properties);
-
- // Load temporary directory property
- final File tempDirectory = getRequiredProperty(props,
- REPORT_GENERATOR_KEY_TEMP_DIR,
- REPORT_GENERATOR_KEY_TEMP_DIR_DEFAULT, File.class);
- configuration.setTempDirectory(tempDirectory);
-
- // Load apdex statified threshold
- final long apdexSatisfiedThreshold = getRequiredProperty(props,
- REPORT_GENERATOR_KEY_APDEX_SATISFIED_THRESHOLD,
- REPORT_GENERATOR_KEY_APDEX_SATISFIED_THRESHOLD_DEFAULT,
- long.class);
- configuration.setApdexSatisfiedThreshold(apdexSatisfiedThreshold);
-
- // Load apdex tolerated threshold
- final long apdexToleratedThreshold = getRequiredProperty(props,
- REPORT_GENERATOR_KEY_APDEX_TOLERATED_THRESHOLD,
- REPORT_GENERATOR_KEY_APDEX_TOLERATED_THRESHOLD_DEFAULT,
- long.class);
- configuration.setApdexToleratedThreshold(apdexToleratedThreshold);
-
- // Load sample filter
- final String sampleFilter = getOptionalProperty(props,
- REPORT_GENERATOR_KEY_SAMPLE_FILTER, String.class);
- configuration.setSampleFilter(sampleFilter);
-
- // Find graph identifiers and load a configuration for each
- final Map<String, GraphConfiguration> graphConfigurations = configuration
- .getGraphConfigurations();
- loadSubConfiguration(graphConfigurations, props,
- REPORT_GENERATOR_GRAPH_KEY_PREFIX, false,
- new SubConfigurationFactory<GraphConfiguration>() {
-
- @Override
- public GraphConfiguration createSubConfiguration() {
- return new GraphConfiguration();
- }
-
- @Override
- public void initialize(String graphId,
- GraphConfiguration graphConfiguration)
- throws ConfigurationException {
- log.debug(String.format(LOAD_GRAPH_FMT, graphId));
-
- // Get the property defining whether the graph have to
- // filter controller samples
- boolean excludeControllers = getRequiredProperty(
- props,
- getGraphPropertyKey(graphId,
- GRAPH_KEY_EXCLUDE_CONTROLLERS),
- GRAPH_KEY_EXCLUDE_CONTROLLERS_DEFAULT,
- Boolean.class);
- graphConfiguration
- .setExcludeControllers(excludeControllers);
-
- // Get the property defining the title of the graph
- String title = getRequiredProperty(props,
- getGraphPropertyKey(graphId, GRAPH_KEY_TITLE),
- GRAPH_KEY_TITLE_DEFAULT, String.class);
- graphConfiguration.setTitle(title);
-
- // Get the property defining the class name
- String className = getRequiredProperty(
- props,
- getGraphPropertyKey(graphId,
- SUBCONF_KEY_CLASSNAME), "",
- String.class);
- graphConfiguration.setClassName(className);
-
- }
- });
-
- if (graphConfigurations.isEmpty()) {
- log.info("No graph configuration found.");
- }
-
- // Find exporter identifiers and load a configuration for each
- final Map<String, ExporterConfiguration> exportConfigurations = configuration
- .getExportConfigurations();
- loadSubConfiguration(exportConfigurations, props,
- REPORT_GENERATOR_EXPORTER_KEY_PREFIX, false,
- new SubConfigurationFactory<ExporterConfiguration>() {
-
- @Override
- public ExporterConfiguration createSubConfiguration() {
- return new ExporterConfiguration();
- }
-
- @Override
- public void initialize(String exportId,
- ExporterConfiguration exportConfiguration)
- throws ConfigurationException {
- log.debug(String.format(LOAD_EXPORTER_FMT, exportId));
-
- // Get the property defining the class name
- String className = getRequiredProperty(
- props,
- getExporterPropertyKey(exportId,
- SUBCONF_KEY_CLASSNAME), "",
- String.class);
- exportConfiguration.setClassName(className);
-
- // Get the property defining whether only sample series
- // are filtered
- boolean filtersOnlySampleSeries = getRequiredProperty(
- props,
- getExporterPropertyKey(exportId,
- EXPORTER_KEY_FILTERS_ONLY_SAMPLE_SERIES),
- EXPORTER_KEY_FILTERS_ONLY_SAMPLE_SERIES_DEFAULT,
- Boolean.class);
- exportConfiguration
- .filtersOnlySampleSeries(filtersOnlySampleSeries);
-
- // Get the property defining the series filter
- String seriesFilter = getRequiredProperty(
- props,
- getExporterPropertyKey(exportId,
- EXPORTER_KEY_SERIES_FILTER),
- EXPORTER_KEY_SERIES_FILTER_DEFAULT,
- String.class);
- exportConfiguration.setSeriesFilter(seriesFilter);
-
- // Get the property defining whether only controllers
- // series are shown
- boolean showControllerSeriesOnly = getRequiredProperty(
- props,
- getExporterPropertyKey(exportId,
- EXPORTER_KEY_SHOW_CONTROLLERS_ONLY),
- EXPORTER_KEY_SHOW_CONTROLLERS_ONLY_DEFAULT,
- Boolean.class);
- exportConfiguration
- .showControllerSeriesOnly(showControllerSeriesOnly);
-
- // Load graph extra properties
- Map<String, SubConfiguration> graphExtraConfigurations = exportConfiguration
- .getGraphExtraConfigurations();
- loadSubConfiguration(
- graphExtraConfigurations,
- props,
- getSubConfigurationPropertyKey(
- REPORT_GENERATOR_EXPORTER_KEY_PREFIX,
- exportId,
- EXPORTER_KEY_GRAPH_EXTRA_OPTIONS),
- true,
- new SubConfigurationFactory<SubConfiguration>() {
-
- @Override
- public SubConfiguration createSubConfiguration() {
- return new SubConfiguration();
- }
-
- @Override
- public void initialize(String subConfId,
- SubConfiguration subConfiguration)
- throws ConfigurationException {
- // do nothing
-
- }
- });
- }
- });
-
- if (exportConfigurations.isEmpty()) {
- log.warn("No export configuration found. None report will be generated.");
- }
+ // Use jodd.Props to ease property handling
+ final Props props = new Props();
+ props.load(properties);
+
+ // Load temporary directory property
+ final File tempDirectory = getRequiredProperty(props,
+ REPORT_GENERATOR_KEY_TEMP_DIR,
+ REPORT_GENERATOR_KEY_TEMP_DIR_DEFAULT, File.class);
+ configuration.setTempDirectory(tempDirectory);
+
+ // Load apdex statified threshold
+ final long apdexSatisfiedThreshold = getRequiredProperty(props,
+ REPORT_GENERATOR_KEY_APDEX_SATISFIED_THRESHOLD,
+ REPORT_GENERATOR_KEY_APDEX_SATISFIED_THRESHOLD_DEFAULT,
+ long.class);
+ configuration.setApdexSatisfiedThreshold(apdexSatisfiedThreshold);
+
+ // Load apdex tolerated threshold
+ final long apdexToleratedThreshold = getRequiredProperty(props,
+ REPORT_GENERATOR_KEY_APDEX_TOLERATED_THRESHOLD,
+ REPORT_GENERATOR_KEY_APDEX_TOLERATED_THRESHOLD_DEFAULT,
+ long.class);
+ configuration.setApdexToleratedThreshold(apdexToleratedThreshold);
+
+ // Load sample filter
+ final String sampleFilter = getOptionalProperty(props,
+ REPORT_GENERATOR_KEY_SAMPLE_FILTER, String.class);
+ configuration.setSampleFilter(sampleFilter);
+
+ // Find graph identifiers and load a configuration for each
+ final Map<String, GraphConfiguration> graphConfigurations = configuration
+ .getGraphConfigurations();
+ loadSubConfiguration(graphConfigurations, props,
+ REPORT_GENERATOR_GRAPH_KEY_PREFIX, false,
+ new SubConfigurationFactory<GraphConfiguration>() {
+
+ @Override
+ public GraphConfiguration createSubConfiguration() {
+ return new GraphConfiguration();
+ }
+
+ @Override
+ public void initialize(String graphId,
+ GraphConfiguration graphConfiguration)
+ throws ConfigurationException {
+ log.debug(String.format(LOAD_GRAPH_FMT, graphId));
+
+ // Get the property defining whether the graph have to
+ // filter controller samples
+ boolean excludeControllers = getRequiredProperty(
+ props,
+ getGraphPropertyKey(graphId,
+ GRAPH_KEY_EXCLUDE_CONTROLLERS),
+ GRAPH_KEY_EXCLUDE_CONTROLLERS_DEFAULT,
+ Boolean.class);
+ graphConfiguration
+ .setExcludeControllers(excludeControllers);
+
+ // Get the property defining the title of the graph
+ String title = getRequiredProperty(props,
+ getGraphPropertyKey(graphId, GRAPH_KEY_TITLE),
+ GRAPH_KEY_TITLE_DEFAULT, String.class);
+ graphConfiguration.setTitle(title);
+
+ // Get the property defining the class name
+ String className = getRequiredProperty(
+ props,
+ getGraphPropertyKey(graphId,
+ SUBCONF_KEY_CLASSNAME), "",
+ String.class);
+ graphConfiguration.setClassName(className);
+
+ }
+ });
+
+ if (graphConfigurations.isEmpty()) {
+ log.info("No graph configuration found.");
+ }
+
+ // Find exporter identifiers and load a configuration for each
+ final Map<String, ExporterConfiguration> exportConfigurations = configuration
+ .getExportConfigurations();
+ loadSubConfiguration(exportConfigurations, props,
+ REPORT_GENERATOR_EXPORTER_KEY_PREFIX, false,
+ new SubConfigurationFactory<ExporterConfiguration>() {
+
+ @Override
+ public ExporterConfiguration createSubConfiguration() {
+ return new ExporterConfiguration();
+ }
+
+ @Override
+ public void initialize(String exportId,
+ ExporterConfiguration exportConfiguration)
+ throws ConfigurationException {
+ log.debug(String.format(LOAD_EXPORTER_FMT, exportId));
+
+ // Get the property defining the class name
+ String className = getRequiredProperty(
+ props,
+ getExporterPropertyKey(exportId,
+ SUBCONF_KEY_CLASSNAME), "",
+ String.class);
+ exportConfiguration.setClassName(className);
+
+ // Get the property defining whether only sample series
+ // are filtered
+ boolean filtersOnlySampleSeries = getRequiredProperty(
+ props,
+ getExporterPropertyKey(exportId,
+ EXPORTER_KEY_FILTERS_ONLY_SAMPLE_SERIES),
+ EXPORTER_KEY_FILTERS_ONLY_SAMPLE_SERIES_DEFAULT,
+ Boolean.class);
+ exportConfiguration
+ .filtersOnlySampleSeries(filtersOnlySampleSeries);
+
+ // Get the property defining the series filter
+ String seriesFilter = getRequiredProperty(
+ props,
+ getExporterPropertyKey(exportId,
+ EXPORTER_KEY_SERIES_FILTER),
+ EXPORTER_KEY_SERIES_FILTER_DEFAULT,
+ String.class);
+ exportConfiguration.setSeriesFilter(seriesFilter);
+
+ // Get the property defining whether only controllers
+ // series are shown
+ boolean showControllerSeriesOnly = getRequiredProperty(
+ props,
+ getExporterPropertyKey(exportId,
+ EXPORTER_KEY_SHOW_CONTROLLERS_ONLY),
+ EXPORTER_KEY_SHOW_CONTROLLERS_ONLY_DEFAULT,
+ Boolean.class);
+ exportConfiguration
+ .showControllerSeriesOnly(showControllerSeriesOnly);
+
+ // Load graph extra properties
+ Map<String, SubConfiguration> graphExtraConfigurations = exportConfiguration
+ .getGraphExtraConfigurations();
+ loadSubConfiguration(
+ graphExtraConfigurations,
+ props,
+ getSubConfigurationPropertyKey(
+ REPORT_GENERATOR_EXPORTER_KEY_PREFIX,
+ exportId,
+ EXPORTER_KEY_GRAPH_EXTRA_OPTIONS),
+ true,
+ new SubConfigurationFactory<SubConfiguration>() {
+
+ @Override
+ public SubConfiguration createSubConfiguration() {
+ return new SubConfiguration();
+ }
+
+ @Override
+ public void initialize(String subConfId,
+ SubConfiguration subConfiguration)
+ throws ConfigurationException {
+ // do nothing
+
+ }
+ });
+ }
+ });
+
+ if (exportConfigurations.isEmpty()) {
+ log.warn("No export configuration found. None report will be generated.");
+ }
- log.debug(END_LOADING_MSG);
+ log.debug(END_LOADING_MSG);
- return configuration;
+ return configuration;
}
}
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/core/ArgumentNullException.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/core/ArgumentNullException.java?rev=1719183&r1=1719182&r2=1719183&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/core/ArgumentNullException.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/core/ArgumentNullException.java Thu Dec 10 18:55:22 2015
@@ -40,7 +40,7 @@ public class ArgumentNullException exten
* the name of the parameter
*/
public ArgumentNullException(String parameter) {
- super(String.format(MESSAGE_FMT, parameter));
+ super(String.format(MESSAGE_FMT, parameter));
}
/**
@@ -50,7 +50,7 @@ public class ArgumentNullException exten
* the inner cause
*/
public ArgumentNullException(Throwable cause) {
- super(cause);
+ super(cause);
}
/**
@@ -62,7 +62,7 @@ public class ArgumentNullException exten
* the inner cause
*/
public ArgumentNullException(String parameter, Throwable cause) {
- super(String.format(MESSAGE_FMT, parameter), cause);
+ super(String.format(MESSAGE_FMT, parameter), cause);
}
}
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/core/ControllerSamplePredicate.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/core/ControllerSamplePredicate.java?rev=1719183&r1=1719182&r2=1719183&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/core/ControllerSamplePredicate.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/core/ControllerSamplePredicate.java Thu Dec 10 18:55:22 2015
@@ -33,11 +33,11 @@ public class ControllerSamplePredicate i
*/
@Override
public boolean matches(Sample sample) {
- if (sample == null) {
- throw new ArgumentNullException("sample");
- }
+ if (sample == null) {
+ throw new ArgumentNullException("sample");
+ }
- return sample.isController();
+ return sample.isController();
}
}
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/core/CsvFile.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/core/CsvFile.java?rev=1719183&r1=1719182&r2=1719183&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/core/CsvFile.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/core/CsvFile.java Thu Dec 10 18:55:22 2015
@@ -35,27 +35,27 @@ public class CsvFile extends File {
private char separator;
public CsvFile(File parent, String child, char separator) {
- super(parent, child);
- this.separator = separator;
+ super(parent, child);
+ this.separator = separator;
}
public CsvFile(String parent, String child, char separator) {
- super(parent, child);
- this.separator = separator;
+ super(parent, child);
+ this.separator = separator;
}
public CsvFile(String pathname, char separator) {
- super(pathname);
- this.separator = separator;
+ super(pathname);
+ this.separator = separator;
}
public CsvFile(URI uri, char separator) {
- super(uri);
- this.separator = separator;
+ super(uri);
+ this.separator = separator;
}
public char getSeparator() {
- return separator;
+ return separator;
}
}
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/core/CsvSampleWriter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/core/CsvSampleWriter.java?rev=1719183&r1=1719182&r2=1719183&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/core/CsvSampleWriter.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/core/CsvSampleWriter.java Thu Dec 10 18:55:22 2015
@@ -50,51 +50,51 @@ public class CsvSampleWriter extends Abs
private long sampleCount;
public CsvSampleWriter(SampleMetadata metadata) {
- if (metadata == null) {
- throw new ArgumentNullException("metadata");
- }
- this.metadata = metadata;
- this.columnCount = metadata.getColumnCount();
- this.separator = metadata.getSeparator();
- this.sampleCount = 0;
+ if (metadata == null) {
+ throw new ArgumentNullException("metadata");
+ }
+ this.metadata = metadata;
+ this.columnCount = metadata.getColumnCount();
+ this.separator = metadata.getSeparator();
+ this.sampleCount = 0;
}
public CsvSampleWriter(Writer output, SampleMetadata metadata) {
- this(metadata);
- if (output == null) {
- throw new ArgumentNullException("output");
- }
- setWriter(output);
+ this(metadata);
+ if (output == null) {
+ throw new ArgumentNullException("output");
+ }
+ setWriter(output);
}
public CsvSampleWriter(OutputStream output, SampleMetadata metadata) {
- this(metadata);
- if (output == null) {
- throw new ArgumentNullException("output");
- }
- setOutputStream(output);
+ this(metadata);
+ if (output == null) {
+ throw new ArgumentNullException("output");
+ }
+ setOutputStream(output);
}
public CsvSampleWriter(File output, SampleMetadata metadata) {
- this(metadata);
- if (output == null) {
- throw new ArgumentNullException("output");
- }
- setOutputFile(output);
+ this(metadata);
+ if (output == null) {
+ throw new ArgumentNullException("output");
+ }
+ setOutputFile(output);
}
public void setSeparator(char separator) {
- this.separator = separator;
+ this.separator = separator;
}
private void reset() {
- sampleCount = 0;
+ sampleCount = 0;
}
@Override
public void setWriter(Writer writer) {
- super.setWriter(writer);
- reset();
+ super.setWriter(writer);
+ reset();
}
/**
@@ -102,42 +102,42 @@ public class CsvSampleWriter extends Abs
* header information will be written in the middle of the file.
*/
public void writeHeader() {
- row.setLength(0);
- for (int i = 0; i < columnCount; i++) {
- row.append(metadata.getColumnName(i));
- if (i < columnCount - 1) {
- row.append(separator);
- }
- }
- writer.println(row.toString());
+ row.setLength(0);
+ for (int i = 0; i < columnCount; i++) {
+ row.append(metadata.getColumnName(i));
+ if (i < columnCount - 1) {
+ row.append(separator);
+ }
+ }
+ writer.println(row.toString());
}
@Override
public long write(Sample sample) {
- try {
- row.setLength(0);
- char[] specials = new char[] { separator,
- CSVSaveService.QUOTING_CHAR, CharUtils.CR, CharUtils.LF };
- for (int i = 0; i < columnCount; i++) {
- String data = sample.getString(i);
- row.append(CSVSaveService.quoteDelimiters(data, specials))
- .append(separator);
- }
- int rowLength = row.length() - 1;
- row.setLength(rowLength);
- writer.println(row.toString());
- sampleCount++;
- } catch (NullPointerException npe) {
- if (writer == null) {
- throw new IllegalStateException(
- "No writer set ! Call setWriter() first !", npe);
- } else if (sample == null) {
- throw new ArgumentNullException("sample");
- } else {
- throw npe;
- }
- }
- return sampleCount;
+ try {
+ row.setLength(0);
+ char[] specials = new char[] { separator,
+ CSVSaveService.QUOTING_CHAR, CharUtils.CR, CharUtils.LF };
+ for (int i = 0; i < columnCount; i++) {
+ String data = sample.getString(i);
+ row.append(CSVSaveService.quoteDelimiters(data, specials))
+ .append(separator);
+ }
+ int rowLength = row.length() - 1;
+ row.setLength(rowLength);
+ writer.println(row.toString());
+ sampleCount++;
+ } catch (NullPointerException npe) {
+ if (writer == null) {
+ throw new IllegalStateException(
+ "No writer set ! Call setWriter() first !", npe);
+ } else if (sample == null) {
+ throw new ArgumentNullException("sample");
+ } else {
+ throw npe;
+ }
+ }
+ return sampleCount;
}
}
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/core/JsonUtil.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/core/JsonUtil.java?rev=1719183&r1=1719182&r2=1719183&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/core/JsonUtil.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/core/JsonUtil.java Thu Dec 10 18:55:22 2015
@@ -36,7 +36,7 @@ public final class JsonUtil {
* @return the json string
*/
public static String toJsonArray(String[] array) {
- return '[' + StringUtils.join(array, ", ") + ']';
+ return '[' + StringUtils.join(array, ", ") + ']';
}
/**
@@ -47,16 +47,16 @@ public final class JsonUtil {
* @return the string
*/
public static String toJsonObject(Map<String, String> map) {
- String result = "{";
- if (map != null) {
- String[] array = new String[map.size()];
- int index = 0;
- for (Map.Entry<String, String> entry : map.entrySet()) {
- array[index] = '"' + entry.getKey() + "\": " + entry.getValue();
- index++;
- }
- result += StringUtils.join(array, ", ");
- }
- return result + "}";
+ String result = "{";
+ if (map != null) {
+ String[] array = new String[map.size()];
+ int index = 0;
+ for (Map.Entry<String, String> entry : map.entrySet()) {
+ array[index] = '"' + entry.getKey() + "\": " + entry.getValue();
+ index++;
+ }
+ result += StringUtils.join(array, ", ");
+ }
+ return result + "}";
}
}
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/core/Sample.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/core/Sample.java?rev=1719183&r1=1719182&r2=1719183&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/core/Sample.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/core/Sample.java Thu Dec 10 18:55:22 2015
@@ -32,7 +32,7 @@ import org.apache.jmeter.util.JMeterUtil
public class Sample {
public final static String CONTROLLER_PATTERN = "Number of samples in transaction";
-
+
private boolean storesStartTimeStamp;
private SampleMetadata metadata;
String[] data;
@@ -50,11 +50,11 @@ public class Sample {
* The sample data as a string array
*/
public Sample(long row, SampleMetadata metadata, String... data) {
- this.row = row;
- this.metadata = metadata;
- this.data = data;
- this.storesStartTimeStamp = JMeterUtils.getPropDefault(
- "sampleresult.timestamp.start", false);
+ this.row = row;
+ this.metadata = metadata;
+ this.data = data;
+ this.storesStartTimeStamp = JMeterUtils.getPropDefault(
+ "sampleresult.timestamp.start", false);
}
/**
@@ -62,7 +62,7 @@ public class Sample {
* built.
*/
public long getSampleRow() {
- return row;
+ return row;
}
/**
@@ -74,7 +74,7 @@ public class Sample {
* @return The data value
*/
public String getString(String name) {
- return data[metadata.indexOf(name)];
+ return data[metadata.indexOf(name)];
}
/**
@@ -86,7 +86,7 @@ public class Sample {
* @return The data as a string
*/
public String getString(int i) {
- return data[i];
+ return data[i];
}
/**
@@ -98,11 +98,11 @@ public class Sample {
* @return The data as an integer
*/
public int getInt(String name) {
- try {
- return Integer.parseInt(data[metadata.indexOf(name)]);
- } catch (NumberFormatException ex) {
- throw new SampleException("Error on sample #" + row, ex);
- }
+ try {
+ return Integer.parseInt(data[metadata.indexOf(name)]);
+ } catch (NumberFormatException ex) {
+ throw new SampleException("Error on sample #" + row, ex);
+ }
}
/**
@@ -115,11 +115,11 @@ public class Sample {
* if the data could not be parsed as an integer
*/
public int getInt(int i) {
- try {
- return Integer.parseInt(data[i]);
- } catch (NumberFormatException ex) {
- throw new SampleException("Error on sample #" + row, ex);
- }
+ try {
+ return Integer.parseInt(data[i]);
+ } catch (NumberFormatException ex) {
+ throw new SampleException("Error on sample #" + row, ex);
+ }
}
/**
@@ -133,11 +133,11 @@ public class Sample {
* if the data could not be parsed as a long
*/
public long getLong(String name) {
- try {
- return Long.parseLong(data[metadata.indexOf(name)]);
- } catch (NumberFormatException ex) {
- throw new SampleException("Error on sample #" + row, ex);
- }
+ try {
+ return Long.parseLong(data[metadata.indexOf(name)]);
+ } catch (NumberFormatException ex) {
+ throw new SampleException("Error on sample #" + row, ex);
+ }
}
/**
@@ -151,11 +151,11 @@ public class Sample {
* if the data could not be parsed as an integer
*/
public long getLong(int i) {
- try {
- return Long.parseLong(data[i]);
- } catch (NumberFormatException ex) {
- throw new SampleException("Error on sample #" + row, ex);
- }
+ try {
+ return Long.parseLong(data[i]);
+ } catch (NumberFormatException ex) {
+ throw new SampleException("Error on sample #" + row, ex);
+ }
}
/**
@@ -169,11 +169,11 @@ public class Sample {
* if the data could not be parsed as a float
*/
public float getFloat(String name) {
- try {
- return Float.parseFloat(data[metadata.indexOf(name)]);
- } catch (NumberFormatException ex) {
- throw new SampleException("Error on sample #" + row, ex);
- }
+ try {
+ return Float.parseFloat(data[metadata.indexOf(name)]);
+ } catch (NumberFormatException ex) {
+ throw new SampleException("Error on sample #" + row, ex);
+ }
}
/**
@@ -186,11 +186,11 @@ public class Sample {
* if the data could not be parsed as a float
*/
public float getFloat(int i) {
- try {
- return Float.parseFloat(data[i]);
- } catch (NumberFormatException ex) {
- throw new SampleException("Error on sample #" + row, ex);
- }
+ try {
+ return Float.parseFloat(data[i]);
+ } catch (NumberFormatException ex) {
+ throw new SampleException("Error on sample #" + row, ex);
+ }
}
/**
@@ -204,11 +204,11 @@ public class Sample {
* if the data could not be parsed as a double
*/
public double getDouble(String name) {
- try {
- return Double.parseDouble(data[metadata.indexOf(name)]);
- } catch (NumberFormatException ex) {
- throw new SampleException("Error on sample #" + row, ex);
- }
+ try {
+ return Double.parseDouble(data[metadata.indexOf(name)]);
+ } catch (NumberFormatException ex) {
+ throw new SampleException("Error on sample #" + row, ex);
+ }
}
/**
@@ -222,11 +222,11 @@ public class Sample {
* if the data could not be parsed as a double
*/
public double getDouble(int id) {
- try {
- return Double.parseDouble(data[id]);
- } catch (NumberFormatException ex) {
- throw new SampleException("Error on sample #" + row, ex);
- }
+ try {
+ return Double.parseDouble(data[id]);
+ } catch (NumberFormatException ex) {
+ throw new SampleException("Error on sample #" + row, ex);
+ }
}
/**
@@ -240,7 +240,7 @@ public class Sample {
* if the data could is an empty string
*/
public char getChar(String name) {
- return data[metadata.indexOf(name)].charAt(0);
+ return data[metadata.indexOf(name)].charAt(0);
}
/**
@@ -254,7 +254,7 @@ public class Sample {
* if the data could not be parsed as a double
*/
public char getChar(int id) {
- return data[id].charAt(0);
+ return data[id].charAt(0);
}
/**
@@ -270,7 +270,7 @@ public class Sample {
* @return The data of the specified column as a boolean
*/
public boolean getBoolean(String name) {
- return "true".equalsIgnoreCase(data[metadata.indexOf(name)]);
+ return "true".equalsIgnoreCase(data[metadata.indexOf(name)]);
}
/**
@@ -288,7 +288,7 @@ public class Sample {
* if the data could not be parsed as a double
*/
public boolean getBoolean(int id) {
- return "true".equalsIgnoreCase(data[id]);
+ return "true".equalsIgnoreCase(data[id]);
}
/*
@@ -298,14 +298,14 @@ public class Sample {
*/
@Override
public String toString() {
- StringBuffer out = new StringBuffer();
- for (int i = 0; i < data.length; i++) {
- out.append(data[i]);
- if (i < data.length - 1) {
- out.append(metadata.getSeparator());
- }
- }
- return out.toString();
+ StringBuffer out = new StringBuffer();
+ for (int i = 0; i < data.length; i++) {
+ out.append(data[i]);
+ if (i < data.length - 1) {
+ out.append(metadata.getSeparator());
+ }
+ }
+ return out.toString();
}
/**
@@ -314,7 +314,7 @@ public class Sample {
* @return the time stamp
*/
public long getTimestamp() {
- return getLong(metadata.indexOf(CSVSaveService.TIME_STAMP));
+ return getLong(metadata.indexOf(CSVSaveService.TIME_STAMP));
}
/**
@@ -323,7 +323,7 @@ public class Sample {
* @return the elapsed time stored in the sample
*/
public long getElapsedTime() {
- return getLong(metadata.indexOf(CSVSaveService.CSV_ELAPSED));
+ return getLong(metadata.indexOf(CSVSaveService.CSV_ELAPSED));
}
/**
@@ -343,8 +343,8 @@ public class Sample {
* @return the start time
*/
public long getStartTime() {
- return storesStartTimeStamp ? getTimestamp() : getTimestamp()
- - getElapsedTime();
+ return storesStartTimeStamp ? getTimestamp() : getTimestamp()
+ - getElapsedTime();
}
/**
@@ -365,8 +365,8 @@ public class Sample {
* @return the end time
*/
public long getEndTime() {
- return storesStartTimeStamp ? getTimestamp() + getElapsedTime()
- : getTimestamp();
+ return storesStartTimeStamp ? getTimestamp() + getElapsedTime()
+ : getTimestamp();
}
/**
@@ -375,9 +375,9 @@ public class Sample {
* @return the response code stored in the sample
*/
public String getResponseCode() {
- return getString(metadata.indexOf(CSVSaveService.RESPONSE_CODE));
+ return getString(metadata.indexOf(CSVSaveService.RESPONSE_CODE));
}
-
+
/**
* Gets the failure message stored in the sample.
*
@@ -386,7 +386,6 @@ public class Sample {
public String getFailureMessage() {
return getString(metadata.indexOf(CSVSaveService.FAILURE_MESSAGE));
}
-
/**
* Gets the name stored in the sample.
@@ -394,7 +393,7 @@ public class Sample {
* @return the name stored in the sample
*/
public String getName() {
- return getString(metadata.indexOf(CSVSaveService.LABEL));
+ return getString(metadata.indexOf(CSVSaveService.LABEL));
}
/**
@@ -403,7 +402,7 @@ public class Sample {
* @return the response message stored in the sample
*/
public String getResponseMessage() {
- return getString(metadata.indexOf(CSVSaveService.RESPONSE_MESSAGE));
+ return getString(metadata.indexOf(CSVSaveService.RESPONSE_MESSAGE));
}
/**
@@ -412,7 +411,7 @@ public class Sample {
* @return the latency stored in the sample
*/
public long getLatency() {
- return getLong(metadata.indexOf(CSVSaveService.CSV_LATENCY));
+ return getLong(metadata.indexOf(CSVSaveService.CSV_LATENCY));
}
/**
@@ -421,7 +420,7 @@ public class Sample {
* @return the success status stored in the sample
*/
public boolean getSuccess() {
- return getBoolean(metadata.indexOf(CSVSaveService.SUCCESSFUL));
+ return getBoolean(metadata.indexOf(CSVSaveService.SUCCESSFUL));
}
/**
@@ -430,7 +429,7 @@ public class Sample {
* @return the number of sent bytes stored in the sample
*/
public int getSentBytes() {
- return getInt(metadata.indexOf(CSVSaveService.CSV_BYTES));
+ return getInt(metadata.indexOf(CSVSaveService.CSV_BYTES));
}
/**
@@ -439,7 +438,7 @@ public class Sample {
* @return the number of threads in the group of this sample
*/
public int getGroupThreads() {
- return getInt(metadata.indexOf(CSVSaveService.CSV_THREAD_COUNT1));
+ return getInt(metadata.indexOf(CSVSaveService.CSV_THREAD_COUNT1));
}
/**
@@ -448,7 +447,7 @@ public class Sample {
* @return the overall number of threads
*/
public int getAllThreads() {
- return getInt(metadata.indexOf(CSVSaveService.CSV_THREAD_COUNT2));
+ return getInt(metadata.indexOf(CSVSaveService.CSV_THREAD_COUNT2));
}
/**
@@ -457,16 +456,16 @@ public class Sample {
* @return the thread name stored in the sample
*/
public String getThreadName() {
- return getString(metadata.indexOf(CSVSaveService.THREAD_NAME));
+ return getString(metadata.indexOf(CSVSaveService.THREAD_NAME));
}
-
+
/**
* Checks if this sample is a controller.
*
* @return true, if this sample is a controller; otherwise false
*/
- public boolean isController(){
- String message = getResponseMessage();
- return message != null && message.startsWith(CONTROLLER_PATTERN);
+ public boolean isController() {
+ String message = getResponseMessage();
+ return message != null && message.startsWith(CONTROLLER_PATTERN);
}
}
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleBuilder.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleBuilder.java?rev=1719183&r1=1719182&r2=1719183&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleBuilder.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleBuilder.java Thu Dec 10 18:55:22 2015
@@ -40,15 +40,15 @@ import org.apache.jmeter.report.core.Sam
public class SampleBuilder {
private static final DecimalFormat DEFAULT_FLOAT_FORMATER = new DecimalFormat(
- "#########0.00#");
+ "#########0.00#");
static {
- DEFAULT_FLOAT_FORMATER.setRoundingMode(RoundingMode.HALF_DOWN);
- DEFAULT_FLOAT_FORMATER.setGroupingUsed(false);
- DecimalFormatSymbols newSymbols = new DecimalFormatSymbols(
- Locale.getDefault());
- newSymbols.setDecimalSeparator('.');
- DEFAULT_FLOAT_FORMATER.setDecimalFormatSymbols(newSymbols);
+ DEFAULT_FLOAT_FORMATER.setRoundingMode(RoundingMode.HALF_DOWN);
+ DEFAULT_FLOAT_FORMATER.setGroupingUsed(false);
+ DecimalFormatSymbols newSymbols = new DecimalFormatSymbols(
+ Locale.getDefault());
+ newSymbols.setDecimalSeparator('.');
+ DEFAULT_FLOAT_FORMATER.setDecimalFormatSymbols(newSymbols);
}
private final SampleMetadata metadata;
@@ -62,57 +62,57 @@ public class SampleBuilder {
private long row = 0;
public SampleBuilder(SampleMetadata metadata, NumberFormat floatFormater) {
- if (metadata == null) {
- throw new ArgumentNullException("metadata");
- }
-
- if (floatFormater == null) {
- throw new ArgumentNullException("floatFormater");
- }
-
- this.floatFormater = floatFormater;
- this.metadata = metadata;
- this.data = new String[metadata.getColumnCount()];
- k = 0;
- row = 0;
+ if (metadata == null) {
+ throw new ArgumentNullException("metadata");
+ }
+
+ if (floatFormater == null) {
+ throw new ArgumentNullException("floatFormater");
+ }
+
+ this.floatFormater = floatFormater;
+ this.metadata = metadata;
+ this.data = new String[metadata.getColumnCount()];
+ k = 0;
+ row = 0;
}
public SampleBuilder(SampleMetadata metadata) {
- this(metadata, DEFAULT_FLOAT_FORMATER);
+ this(metadata, DEFAULT_FLOAT_FORMATER);
}
/**
* @return the metadata
*/
public final SampleMetadata getMetadata() {
- return metadata;
+ return metadata;
}
public SampleBuilder add(String e) {
- if (k < data.length) {
- data[k++] = e;
- }
- return this;
+ if (k < data.length) {
+ data[k++] = e;
+ }
+ return this;
}
public SampleBuilder add(long e) {
- add(Long.toString(e));
- return this;
+ add(Long.toString(e));
+ return this;
}
public SampleBuilder add(double e) {
- add(floatFormater.format(e));
- return this;
+ add(floatFormater.format(e));
+ return this;
}
public Sample build() {
- while (k < data.length) {
- data[k++] = "";
- }
- String[] sampleData = new String[data.length];
- System.arraycopy(data, 0, sampleData, 0, data.length);
- Sample out = new Sample(row++, metadata, sampleData);
- k = 0;
- return out;
+ while (k < data.length) {
+ data[k++] = "";
+ }
+ String[] sampleData = new String[data.length];
+ System.arraycopy(data, 0, sampleData, 0, data.length);
+ Sample out = new Sample(row++, metadata, sampleData);
+ k = 0;
+ return out;
}
}
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleException.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleException.java?rev=1719183&r1=1719182&r2=1719183&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleException.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleException.java Thu Dec 10 18:55:22 2015
@@ -42,7 +42,7 @@ public class SampleException extends Run
* the message
*/
public SampleException(String message) {
- super(message);
+ super(message);
}
/**
@@ -52,7 +52,7 @@ public class SampleException extends Run
* the cause
*/
public SampleException(Throwable cause) {
- super(cause);
+ super(cause);
}
/**
@@ -64,6 +64,6 @@ public class SampleException extends Run
* the cause
*/
public SampleException(String message, Throwable cause) {
- super(message, cause);
+ super(message, cause);
}
}
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleMetaDataParser.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleMetaDataParser.java?rev=1719183&r1=1719182&r2=1719183&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleMetaDataParser.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleMetaDataParser.java Thu Dec 10 18:55:22 2015
@@ -29,12 +29,12 @@ public class SampleMetaDataParser {
private char separator;
public SampleMetaDataParser(char separator) {
- this.separator = separator;
+ this.separator = separator;
}
public SampleMetadata parse(String headRow) {
- String[] cols = headRow.split(Character.toString(separator));
- SampleMetadata out = new SampleMetadata(separator, cols);
- return out;
+ String[] cols = headRow.split(Character.toString(separator));
+ SampleMetadata out = new SampleMetadata(separator, cols);
+ return out;
}
}
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleMetadata.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleMetadata.java?rev=1719183&r1=1719182&r2=1719183&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleMetadata.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/core/SampleMetadata.java Thu Dec 10 18:55:22 2015
@@ -54,100 +54,100 @@ public class SampleMetadata {
* The list of columns names
*/
public SampleMetadata(char separator, String... columns) {
- if (columns == null) {
- throw new ArgumentNullException("columns");
- }
- initialize(separator, Arrays.asList(columns));
+ if (columns == null) {
+ throw new ArgumentNullException("columns");
+ }
+ initialize(separator, Arrays.asList(columns));
}
public SampleMetadata(SampleSaveConfiguration saveConfig) {
- if (saveConfig == null) {
- throw new ArgumentNullException("saveConfig");
- }
- ArrayList<String> columns = new ArrayList<>();
- if (saveConfig.saveTimestamp()) {
- columns.add(CSVSaveService.TIME_STAMP);
- }
- if (saveConfig.saveTime()) {
- columns.add(CSVSaveService.CSV_ELAPSED);
- }
- if (saveConfig.saveLabel()) {
- columns.add(CSVSaveService.LABEL);
- }
- if (saveConfig.saveCode()) {
- columns.add(CSVSaveService.RESPONSE_CODE);
- }
- if (saveConfig.saveMessage()) {
- columns.add(CSVSaveService.RESPONSE_MESSAGE);
- }
- if (saveConfig.saveThreadName()) {
- columns.add(CSVSaveService.THREAD_NAME);
- }
- if (saveConfig.saveDataType()) {
- columns.add(CSVSaveService.DATA_TYPE);
- }
- if (saveConfig.saveSuccess()) {
- columns.add(CSVSaveService.SUCCESSFUL);
- }
- if (saveConfig.saveAssertionResultsFailureMessage()) {
- columns.add(CSVSaveService.FAILURE_MESSAGE);
- }
- if (saveConfig.saveBytes()) {
- columns.add(CSVSaveService.CSV_BYTES);
- }
- if (saveConfig.saveThreadCounts()) {
- columns.add(CSVSaveService.CSV_THREAD_COUNT1);
- columns.add(CSVSaveService.CSV_THREAD_COUNT2);
- }
- if (saveConfig.saveUrl()) {
- columns.add(CSVSaveService.CSV_URL);
- }
- if (saveConfig.saveFileName()) {
- columns.add(CSVSaveService.CSV_FILENAME);
- }
- if (saveConfig.saveLatency()) {
- columns.add(CSVSaveService.CSV_LATENCY);
- }
- if (saveConfig.saveEncoding()) {
- columns.add(CSVSaveService.CSV_ENCODING);
- }
- if (saveConfig.saveSampleCount()) {
- columns.add(CSVSaveService.CSV_SAMPLE_COUNT);
- columns.add(CSVSaveService.CSV_ERROR_COUNT);
- }
- if (saveConfig.saveHostname()) {
- columns.add(CSVSaveService.CSV_HOSTNAME);
- }
- if (saveConfig.saveIdleTime()) {
- columns.add(CSVSaveService.CSV_IDLETIME);
- }
- if (saveConfig.saveConnectTime()) {
- columns.add(CSVSaveService.CSV_CONNECT_TIME);
- }
- initialize(saveConfig.getDelimiter().charAt(0), columns);
+ if (saveConfig == null) {
+ throw new ArgumentNullException("saveConfig");
+ }
+ ArrayList<String> columns = new ArrayList<>();
+ if (saveConfig.saveTimestamp()) {
+ columns.add(CSVSaveService.TIME_STAMP);
+ }
+ if (saveConfig.saveTime()) {
+ columns.add(CSVSaveService.CSV_ELAPSED);
+ }
+ if (saveConfig.saveLabel()) {
+ columns.add(CSVSaveService.LABEL);
+ }
+ if (saveConfig.saveCode()) {
+ columns.add(CSVSaveService.RESPONSE_CODE);
+ }
+ if (saveConfig.saveMessage()) {
+ columns.add(CSVSaveService.RESPONSE_MESSAGE);
+ }
+ if (saveConfig.saveThreadName()) {
+ columns.add(CSVSaveService.THREAD_NAME);
+ }
+ if (saveConfig.saveDataType()) {
+ columns.add(CSVSaveService.DATA_TYPE);
+ }
+ if (saveConfig.saveSuccess()) {
+ columns.add(CSVSaveService.SUCCESSFUL);
+ }
+ if (saveConfig.saveAssertionResultsFailureMessage()) {
+ columns.add(CSVSaveService.FAILURE_MESSAGE);
+ }
+ if (saveConfig.saveBytes()) {
+ columns.add(CSVSaveService.CSV_BYTES);
+ }
+ if (saveConfig.saveThreadCounts()) {
+ columns.add(CSVSaveService.CSV_THREAD_COUNT1);
+ columns.add(CSVSaveService.CSV_THREAD_COUNT2);
+ }
+ if (saveConfig.saveUrl()) {
+ columns.add(CSVSaveService.CSV_URL);
+ }
+ if (saveConfig.saveFileName()) {
+ columns.add(CSVSaveService.CSV_FILENAME);
+ }
+ if (saveConfig.saveLatency()) {
+ columns.add(CSVSaveService.CSV_LATENCY);
+ }
+ if (saveConfig.saveEncoding()) {
+ columns.add(CSVSaveService.CSV_ENCODING);
+ }
+ if (saveConfig.saveSampleCount()) {
+ columns.add(CSVSaveService.CSV_SAMPLE_COUNT);
+ columns.add(CSVSaveService.CSV_ERROR_COUNT);
+ }
+ if (saveConfig.saveHostname()) {
+ columns.add(CSVSaveService.CSV_HOSTNAME);
+ }
+ if (saveConfig.saveIdleTime()) {
+ columns.add(CSVSaveService.CSV_IDLETIME);
+ }
+ if (saveConfig.saveConnectTime()) {
+ columns.add(CSVSaveService.CSV_CONNECT_TIME);
+ }
+ initialize(saveConfig.getDelimiter().charAt(0), columns);
}
private void initialize(char separator, List<String> columns) {
- this.separator = separator;
- this.columns = columns;
- int size = columns.size();
- for (int i = 0; i < size; i++) {
- index.put(this.columns.get(i).trim(), i);
- }
+ this.separator = separator;
+ this.columns = columns;
+ int size = columns.size();
+ for (int i = 0; i < size; i++) {
+ index.put(this.columns.get(i).trim(), i);
+ }
}
/**
* Gets the character used for separating columns
*/
public char getSeparator() {
- return separator;
+ return separator;
}
/**
* Returns the number of columns in the metadata
*/
public int getColumnCount() {
- return columns.size();
+ return columns.size();
}
/**
@@ -162,7 +162,7 @@ public class SampleMetadata {
* <code>getColumnCount()</code>)
*/
public String getColumnName(int i) {
- return columns.get(i);
+ return columns.get(i);
}
/**
@@ -177,7 +177,7 @@ public class SampleMetadata {
* <code>getColumnCount()</code>)
*/
public String getColumnName(Integer i) {
- return columns.get(i.intValue());
+ return columns.get(i.intValue());
}
/**
@@ -189,8 +189,8 @@ public class SampleMetadata {
* does not exist in this metadata
*/
public int indexOf(String col) {
- Integer out = index.get(col);
- return out == null ? -1 : out.intValue();
+ Integer out = index.get(col);
+ return out == null ? -1 : out.intValue();
}
/*
@@ -200,14 +200,14 @@ public class SampleMetadata {
*/
@Override
public String toString() {
- StringBuffer out = new StringBuffer();
- int size = columns.size();
- for (int i = 0; i < size; i++) {
- out.append(columns.get(i));
- if (i < size - 1) {
- out.append(separator);
- }
- }
- return out.toString();
+ StringBuffer out = new StringBuffer();
+ int size = columns.size();
+ for (int i = 0; i < size; i++) {
+ out.append(columns.get(i));
+ if (i < size - 1) {
+ out.append(separator);
+ }
+ }
+ return out.toString();
}
}
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/core/TimeHelper.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/core/TimeHelper.java?rev=1719183&r1=1719182&r2=1719183&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/core/TimeHelper.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/core/TimeHelper.java Thu Dec 10 18:55:22 2015
@@ -32,28 +32,28 @@ public class TimeHelper {
private static final String TIMESTAMP_FORMAT_PROPERTY = "jmeter.save.saveservice.timestamp_format";
public static final String time(long t) {
- long h = t / 3600000;
- t %= 3600000;
- long m = t / 60000;
- t %= 60000;
- long s = t / 1000;
- t %= 1000;
- long ms = t;
- if (h > 0) {
- return h + "h " + m + "m " + s + "s " + ms + " ms";
- }
- if (m > 0) {
- return m + "m " + s + "s " + ms + " ms";
- }
- if (s > 0) {
- return s + "s " + ms + " ms";
- }
- if (ms > 0) {
- return ms + "ms";
- }
- return "0 ms";
+ long h = t / 3600000;
+ t %= 3600000;
+ long m = t / 60000;
+ t %= 60000;
+ long s = t / 1000;
+ t %= 1000;
+ long ms = t;
+ if (h > 0) {
+ return h + "h " + m + "m " + s + "s " + ms + " ms";
+ }
+ if (m > 0) {
+ return m + "m " + s + "s " + ms + " ms";
+ }
+ if (s > 0) {
+ return s + "s " + ms + " ms";
+ }
+ if (ms > 0) {
+ return ms + "ms";
+ }
+ return "0 ms";
}
-
+
/**
* Format the specified time stamp to string using JMeter properties.
*
@@ -62,8 +62,8 @@ public class TimeHelper {
* @return the string
*/
public static final String formatTimeStamp(long timeStamp) {
- return formatTimeStamp(timeStamp,
- JMeterUtils.getProperty(TIMESTAMP_FORMAT_PROPERTY));
+ return formatTimeStamp(timeStamp,
+ JMeterUtils.getProperty(TIMESTAMP_FORMAT_PROPERTY));
}
/**
@@ -76,8 +76,8 @@ public class TimeHelper {
* @return the string
*/
public static final String formatTimeStamp(long timeStamp, String format) {
- SimpleDateFormat dateFormat = format != null ? new SimpleDateFormat(
- format) : new SimpleDateFormat();
- return dateFormat.format(new Date(timeStamp));
+ SimpleDateFormat dateFormat = format != null ? new SimpleDateFormat(
+ format) : new SimpleDateFormat();
+ return dateFormat.format(new Date(timeStamp));
}
}
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/AbstractDataExporter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/AbstractDataExporter.java?rev=1719183&r1=1719182&r2=1719183&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/AbstractDataExporter.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/AbstractDataExporter.java Thu Dec 10 18:55:22 2015
@@ -23,27 +23,32 @@ package org.apache.jmeter.report.dashboa
public abstract class AbstractDataExporter implements DataExporter {
private String name;
-
+
/**
* Instantiates a new abstract data exporter.
*/
protected AbstractDataExporter() {
}
- /* (non-Javadoc)
+ /*
+ * (non-Javadoc)
+ *
* @see org.apache.jmeter.report.dashboard.DataExporter#getName()
*/
@Override
public String getName() {
- return name;
+ return name;
}
- /* (non-Javadoc)
- * @see org.apache.jmeter.report.dashboard.DataExporter#setName(java.lang.String)
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.apache.jmeter.report.dashboard.DataExporter#setName(java.lang.String)
*/
@Override
public void setName(String name) {
- this.name = name;
+ this.name = name;
}
}
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/DataExporter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/DataExporter.java?rev=1719183&r1=1719182&r2=1719183&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/DataExporter.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/DataExporter.java Thu Dec 10 18:55:22 2015
@@ -58,5 +58,5 @@ public interface DataExporter {
* the export exception
*/
void export(SampleContext context, File file,
- ReportGeneratorConfiguration configuration) throws ExportException;
+ ReportGeneratorConfiguration configuration) throws ExportException;
}
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/ExportException.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/ExportException.java?rev=1719183&r1=1719182&r2=1719183&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/ExportException.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/ExportException.java Thu Dec 10 18:55:22 2015
@@ -24,7 +24,6 @@ package org.apache.jmeter.report.dashboa
*/
public class ExportException extends Exception {
-
/** The Constant serialVersionUID. */
private static final long serialVersionUID = 89868452883024813L;
@@ -32,7 +31,7 @@ public class ExportException extends Exc
* Instantiates a new export exception.
*/
public ExportException() {
- super();
+ super();
}
/**
@@ -42,7 +41,7 @@ public class ExportException extends Exc
* the message
*/
public ExportException(String message) {
- super(message);
+ super(message);
}
/**
@@ -54,7 +53,7 @@ public class ExportException extends Exc
* the inner cause
*/
public ExportException(String message, Throwable cause) {
- super(message, cause);
+ super(message, cause);
}
}
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/GenerationException.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/GenerationException.java?rev=1719183&r1=1719182&r2=1719183&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/GenerationException.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/dashboard/GenerationException.java Thu Dec 10 18:55:22 2015
@@ -32,7 +32,7 @@ public class GenerationException extends
* Instantiates a new configuration exception.
*/
public GenerationException() {
- super();
+ super();
}
/**
@@ -42,7 +42,7 @@ public class GenerationException extends
* the message
*/
public GenerationException(String message) {
- super(message);
+ super(message);
}
/**
@@ -54,7 +54,7 @@ public class GenerationException extends
* the cause
*/
public GenerationException(String message, Throwable cause) {
- super(message, cause);
+ super(message, cause);
}
}