Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ The following software is provided under the Apache License V 2.0 (as above):

* apache-bsf-2.4.0.jar
* beanshell-2.0b6.jar
* cglib-nodep-3.2.5.jar
* commons-codec-1.10.jar
* commons-collections-3.2.2.jar
* commons-dbcp2-2.1.1.jar
Expand Down Expand Up @@ -252,8 +253,10 @@ The following software is provided under the Apache License V 2.0 (as above):
* json-path-2.4.0.jar
* json-smart-2.3.jar
* mongo-java-driver-2.11.3.jar
* objenesis-2.6.jar
* ph-commons-8.6.6.jar
* ph-css-5.0.4.jar
* spock-1.0-groovy-2.4.jar

- Software produced outside the ASF which is available under other licenses (not AL 2.0):
For details, please see the files under: licenses/bin
Expand Down
17 changes: 16 additions & 1 deletion build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ httpcore.jar = httpcore-${httpcore.version}.jar
httpcore.loc = ${maven2.repo}/org/apache/httpcomponents/httpcore/${httpcore.version}
httpcore.md5 = f9251fd8260fd891a3d46f82f3136611

# Required for HttpASyncClient
# Required for HttpASyncClient
httpcore-nio.version = 4.4.7
httpcore-nio.jar = httpcore-nio-${httpcore-nio.version}.jar
httpcore-nio.loc = ${maven2.repo}/org/apache/httpcomponents/httpcore-nio/${httpcore-nio.version}
Expand Down Expand Up @@ -263,6 +263,21 @@ junit.jar = junit-${junit.version}.jar
junit.loc = ${maven2.repo}/junit/junit/${junit.version}
junit.md5 = 5b38c40c97fbd0adee29f91e60405584

spock.version = 1.0-groovy-2.4
spock.jar = spock-core-${spock.version}.jar
spock.loc = ${maven2.repo}/org/spockframework/spock-core/${spock.version}
spock.md5 = 2fbbeaf95dd10b445c6c581c9b945075

cglib-nodep.version = 3.2.5
cglib-nodep.jar = cglib-nodep-${cglib-nodep.version}.jar
cglib-nodep.loc = ${maven2.repo}/cglib/cglib-nodep/${cglib-nodep.version}
cglib-nodep.md5 = 584a4c2842da823027ff2d2278b7d830

objenesis.version = 2.6
objenesis.jar = objenesis-${objenesis.version}.jar
objenesis.loc = ${maven2.repo}/org/objenesis/objenesis/${objenesis.version}
objenesis.md5 = 5ffac3f51405ca9b2915970a224b3e8f

mongo-java-driver.version = 2.11.3
mongo-java-driver.jar = mongo-java-driver-${mongo-java-driver.version}.jar
mongo-java-driver.loc = ${maven2.repo}/org/mongodb/mongo-java-driver/${mongo-java-driver.version}
Expand Down
35 changes: 35 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,9 @@
<pathelement location="${lib.dir}/${serializer.jar}"/>
<pathelement location="${lib.dir}/${slf4j-api.jar}"/>
<pathelement location="${lib.dir}/${slf4j-ext.jar}"/>
<pathelement location="${lib.dir}/${spock.jar}"/>
<pathelement location="${lib.dir}/${cglib-nodep.jar}"/>
<pathelement location="${lib.dir}/${objenesis.jar}"/>
<pathelement location="${lib.dir}/${jtidy.jar}"/>
<pathelement location="${lib.dir}/${tika-core.jar}"/>
<pathelement location="${lib.dir}/${tika-parsers.jar}"/>
Expand Down Expand Up @@ -726,6 +729,35 @@
<path refid="logging.classpath"/>
</classpath>
</javac>

<!-- Compile Spock tests (groovy) -->
<taskdef name="groovyc" classname="org.codehaus.groovy.ant.Groovyc">
<classpath>
<fileset dir="${lib.dir}" includes="*.jar"/>
</classpath>
</taskdef>
<groovyc srcdir="${src.test}" destdir="${build.test}" encoding="${encoding}">
<classpath>
<pathelement location="${build.jorphan}"/>
<pathelement location="${build.core}"/>
<pathelement location="${build.components}"/>
<pathelement location="${build.http}"/>
<pathelement location="${build.ftp}"/>
<pathelement location="${build.functions}"/>
<pathelement location="${build.java}"/>
<pathelement location="${build.jdbc}"/>
<pathelement location="${build.ldap}"/>
<pathelement location="${build.mail}"/>
<pathelement location="${build.tcp}"/>
<!-- Include compiled jars to allow running tests without rebuilding source -->
<fileset dir="${dest.jar}" includes="*.jar"/>
<path refid="classpath"/>
</classpath>
<!-- Compile JUnit tests (Java) -->
<javac source="${src.java.version}" debug="on" target="${target.java.version}"
deprecation="${deprecation}" encoding="${encoding}">
</javac>
</groovyc>
</target>

<target name="compile-ftp" depends="compile-jorphan,compile-core" description="Compile components specific to FTP sampling.">
Expand Down Expand Up @@ -3217,6 +3249,9 @@ run JMeter unless all the JMeter jars are added.
<process_jarfile jarname="log4j-1.2-api"/>
<process_jarfile jarname="log4j-core"/>
<process_jarfile jarname="log4j-slf4j-impl"/>
<process_jarfile jarname="spock"/>
<process_jarfile jarname="cglib-nodep"/>
<process_jarfile jarname="objenesis"/>
<process_jarfile jarname="jtidy"/>
<process_jarfile jarname="tika-core"/>
<process_jarfile jarname="tika-parsers"/>
Expand Down
3 changes: 3 additions & 0 deletions eclipse.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@
<classpathentry kind="lib" path="lib/xpp3_min-1.1.4c.jar"/>
<classpathentry kind="lib" path="lib/xstream-1.4.10.jar"/>
<!-- Needed for build and test -->
<classpathentry kind="lib" path="lib/spock-1.0-groovy-2.4.jar"/>
<classpathentry kind="lib" path="lib/cglib-nodep-3.2.5.jar"/>
<classpathentry kind="lib" path="lib/objenesis-2.6.jar"/>
<classpathentry kind="lib" path="lib/api/bcmail-jdk15on-1.49.jar"/>
<classpathentry kind="lib" path="lib/api/bcpkix-jdk15on-1.49.jar"/>
<classpathentry kind="lib" path="lib/api/bcprov-jdk15on-1.49.jar"/>
Expand Down
18 changes: 18 additions & 0 deletions res/maven/ApacheJMeter_parent.pom
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ under the License.
<log4j-core.version>2.8.2</log4j-core.version>
<log4j-slf4j-impl.version>2.8.2</log4j-slf4j-impl.version>
<log4j-1.2-api.version>2.8.2</log4j-1.2-api.version>
<spock.version>1.0-groovy-2.4</spock.version>
<cglib-nodep.version>3.2.5</cglib-nodep.version>
<objenesis.version>2.6</objenesis.version>
<jtidy.version>r938</jtidy.version>
<tika-core.version>1.16</tika-core.version>
<tika-parsers.version>1.16</tika-parsers.version>
Expand Down Expand Up @@ -269,6 +272,21 @@ under the License.
<artifactId>junit</artifactId>
<version>${junit.version}</version>
</dependency>
<dependency>
<groupId>org.spockframework</groupId>
<artifactId>spock-core</artifactId>
<version>${spock.version}</version>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib-nodep</artifactId>
<version>${cglib-nodep.version}</version>
</dependency>
<dependency>
<groupId>org.objenesis</groupId>
<artifactId>objenesis</artifactId>
<version>${objenesis.version}</version>
</dependency>
<dependency>
<groupId>net.sf.jtidy</groupId>
<artifactId>jtidy</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/
package org.apache.jmeter.report.processor;

import org.apache.commons.lang3.ObjectUtils;
import org.apache.jmeter.report.core.Sample;
import org.apache.jmeter.util.JMeterUtils;

Expand All @@ -38,21 +39,10 @@ public class ApdexSummaryConsumer extends

private ThresholdSelector thresholdSelector;

/**
* Gets the APDEX threshold selector.
*
* @return the threshold selector
*/
public final ThresholdSelector getThresholdSelector() {
return thresholdSelector;
}

/**
* Sets the APDEX threshold selector.
*
* @param thresholdSelector
* the APDEX threshold selector to set
*/
public final void setThresholdSelector(ThresholdSelector thresholdSelector) {
this.thresholdSelector = thresholdSelector;
}
Expand All @@ -63,16 +53,18 @@ public ApdexSummaryConsumer() {

@Override
protected ListResultData createDataResult(String key, ApdexSummaryData data) {
ListResultData result = new ListResultData();
result.addResult(new ValueResultData(Double.valueOf(getApdex(data))));
Double apdex = Double.valueOf(getApdex(data));
ApdexThresholdsInfo thresholdsInfo = data.getApdexThresholdInfo();
result.addResult(new ValueResultData(Long.valueOf(thresholdsInfo
.getSatisfiedThreshold())));
result.addResult(new ValueResultData(Long.valueOf(thresholdsInfo
.getToleratedThreshold())));
result.addResult(new ValueResultData(key != null ? key : JMeterUtils
.getResString("reportgenerator_summary_total")));
Long satisfiedThreshold = Long.valueOf(thresholdsInfo.getSatisfiedThreshold());
Long toleratedThreshold = Long.valueOf(thresholdsInfo.getToleratedThreshold());
String keyOrDefault = ObjectUtils.defaultIfNull(
key, JMeterUtils.getResString("reportgenerator_summary_total"));

ListResultData result = new ListResultData();
result.addResult(new ValueResultData(apdex));
result.addResult(new ValueResultData(satisfiedThreshold));
result.addResult(new ValueResultData(toleratedThreshold));
result.addResult(new ValueResultData(keyOrDefault));
return result;
}

Expand Down
33 changes: 2 additions & 31 deletions src/core/org/apache/jmeter/report/processor/ApdexSummaryData.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* @since 3.0
*/
public class ApdexSummaryData {

private final ApdexThresholdsInfo apdexThresholdInfo;

private long satisfiedCount;
Expand All @@ -33,64 +34,34 @@ public final ApdexThresholdsInfo getApdexThresholdInfo() {
return apdexThresholdInfo;
}

/**
* Gets the satisfied count.
*
* @return the satisfiedCount
*/
public final long getSatisfiedCount() {
return satisfiedCount;
}

/**
* Sets the satisfied count.
*
* @param satisfiedCount
* the satisfiedCount to set
*/
public final void setSatisfiedCount(long satisfiedCount) {
this.satisfiedCount = satisfiedCount;
}

/**
* @return the toleratedCount
*/
public final long getToleratedCount() {
return toleratedCount;
}

/**
* Sets the tolerated count.
*
* @param toleratedCount
* the toleratedCount to set
*/
public final void setToleratedCount(long toleratedCount) {
this.toleratedCount = toleratedCount;
}

/**
* Gets the total count.
*
* @return the totalCount
*/
public final long getTotalCount() {
return totalCount;
}

/**
* @param totalCount
* the totalCount to set
*/
public final void setTotalCount(long totalCount) {
this.totalCount = totalCount;
}

/**
* Instantiates a new apdex summary data.
*
* @param info
* the threshold information
* @param info the threshold information
*/
public ApdexSummaryData(ApdexThresholdsInfo info) {
apdexThresholdInfo = info;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,43 +24,22 @@
* @since 3.0
*/
public class ApdexThresholdsInfo {

private long satisfiedThreshold;
private long toleratedThreshold;

/**
* Gets the satisfied users threshold (T).
*
* @return the satisfied threshold
*/
public final long getSatisfiedThreshold() {
return satisfiedThreshold;
}

/**
* Sets the satisfied users threshold (T).
*
* @param satisfiedThreshold
* the satisfied threshold to set
*/
public final void setSatisfiedThreshold(long satisfiedThreshold) {
this.satisfiedThreshold = satisfiedThreshold;
}

/**
* Gets the tolerated threshold (F).
*
* @return the tolerated threshold
*/
public final long getToleratedThreshold() {
return toleratedThreshold;
}

/**
* Sets the tolerated threshold (F).
*
* @param toleratedThreshold
* the tolerated threshold to set
*/
public final void setToleratedThreshold(long toleratedThreshold) {
this.toleratedThreshold = toleratedThreshold;
}
Expand Down
16 changes: 6 additions & 10 deletions src/core/org/apache/jmeter/report/processor/ListResultData.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,16 @@

/**
* The class ListResultData provides a list of results from sample processing.
*
*
* @since 3.0
*/
public class ListResultData implements ResultData, Iterable<ResultData> {

/** The items. */
private List<ResultData> items = new ArrayList<>();

/*
* (non-Javadoc)
*
*
* @see
* org.apache.jmeter.report.processor.ResultData#accept(org.apache.jmeter
* .report.processor.ResultDataVisitor)
Expand All @@ -46,8 +45,7 @@ public <T> T accept(ResultDataVisitor<T> visitor) {
/**
* Adds the result at the end of the list.
*
* @param result
* the result
* @param result the result
* @return true, if the result is added
*/
public boolean addResult(ResultData result) {
Expand All @@ -57,8 +55,7 @@ public boolean addResult(ResultData result) {
/**
* Removes the result at the specified index.
*
* @param index
* the index of the result in the list
* @param index the index of the result in the list
* @return the removed result data
*/
public ResultData removeResult(int index) {
Expand All @@ -68,8 +65,7 @@ public ResultData removeResult(int index) {
/**
* Gets the stored item at the specified index.
*
* @param index
* the index
* @param index the index
* @return the result data
*/
public ResultData get(int index) {
Expand All @@ -87,7 +83,7 @@ public int getSize() {

/*
* (non-Javadoc)
*
*
* @see java.lang.Iterable#iterator()
*/
@Override
Expand Down
Loading