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 20:10:08 UTC
svn commit: r1719185 [7/8] - in
/jmeter/trunk/src/core/org/apache/jmeter/report: config/ core/ dashboard/
processor/ processor/graph/ processor/graph/impl/
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/ElapsedTimeValueSelector.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/ElapsedTimeValueSelector.java?rev=1719185&r1=1719184&r2=1719185&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/ElapsedTimeValueSelector.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/ElapsedTimeValueSelector.java Thu Dec 10 19:10:06 2015
@@ -1,42 +1,42 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.jmeter.report.processor.graph;
-
-import org.apache.jmeter.report.core.Sample;
-
-/**
- * The class ElapsedTimeValueSelector provides a projection from a sample to its
- * elapsed time.
- *
- * @since 2.14
- */
-public class ElapsedTimeValueSelector implements GraphValueSelector {
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.jmeter.report.csv.processor.GraphValueSelector#select(java
- * .lang.String, java.lang.Object, org.apache.jmeter.report.csv.core.Sample)
- */
- @Override
- public double select(String series, Sample sample) {
- return sample.getElapsedTime();
- }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.jmeter.report.processor.graph;
+
+import org.apache.jmeter.report.core.Sample;
+
+/**
+ * The class ElapsedTimeValueSelector provides a projection from a sample to its
+ * elapsed time.
+ *
+ * @since 2.14
+ */
+public class ElapsedTimeValueSelector implements GraphValueSelector {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.apache.jmeter.report.csv.processor.GraphValueSelector#select(java
+ * .lang.String, java.lang.Object, org.apache.jmeter.report.csv.core.Sample)
+ */
+ @Override
+ public double select(String series, Sample sample) {
+ return sample.getElapsedTime();
+ }
+
+}
Propchange: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/ElapsedTimeValueSelector.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GraphKeysSelector.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GraphKeysSelector.java?rev=1719185&r1=1719184&r2=1719185&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GraphKeysSelector.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GraphKeysSelector.java Thu Dec 10 19:10:06 2015
@@ -1,30 +1,30 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.jmeter.report.processor.graph;
-
-import org.apache.jmeter.report.core.SampleSelector;
-
-/**
- * The interface GraphKeySelector represents a projection from a sample to the
- * keys that compound its series.
- *
- * @since 2.14
- */
-public interface GraphKeysSelector extends SampleSelector<Double> {
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.jmeter.report.processor.graph;
+
+import org.apache.jmeter.report.core.SampleSelector;
+
+/**
+ * The interface GraphKeySelector represents a projection from a sample to the
+ * keys that compound its series.
+ *
+ * @since 2.14
+ */
+public interface GraphKeysSelector extends SampleSelector<Double> {
+
+}
Propchange: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GraphKeysSelector.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GraphSeriesSelector.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GraphSeriesSelector.java?rev=1719185&r1=1719184&r2=1719185&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GraphSeriesSelector.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GraphSeriesSelector.java Thu Dec 10 19:10:06 2015
@@ -1,37 +1,37 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.jmeter.report.processor.graph;
-
-import org.apache.jmeter.report.core.SampleSelector;
-
-/**
- * The interface GraphSeriesSelector provides a projection from a sample to the
- * series it belongs in a graph.
- *
- * @since 2.14
- */
-public interface GraphSeriesSelector extends SampleSelector<Iterable<String>> {
-
- /**
- * Indicates whether this selector allows controllers discrimination.
- *
- * @return true, if this selector allows controllers discrimination; false otherwise
- */
- boolean allowsControllersDiscrimination();
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.jmeter.report.processor.graph;
+
+import org.apache.jmeter.report.core.SampleSelector;
+
+/**
+ * The interface GraphSeriesSelector provides a projection from a sample to the
+ * series it belongs in a graph.
+ *
+ * @since 2.14
+ */
+public interface GraphSeriesSelector extends SampleSelector<Iterable<String>> {
+
+ /**
+ * Indicates whether this selector allows controllers discrimination.
+ *
+ * @return true, if this selector allows controllers discrimination; false otherwise
+ */
+ boolean allowsControllersDiscrimination();
+
+}
Propchange: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GraphSeriesSelector.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GraphValueSelector.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GraphValueSelector.java?rev=1719185&r1=1719184&r2=1719185&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GraphValueSelector.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GraphValueSelector.java Thu Dec 10 19:10:06 2015
@@ -1,41 +1,41 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.jmeter.report.processor.graph;
-
-import org.apache.jmeter.report.core.Sample;
-
-/**
- * The interface GraphValueSelector represents a projection from a sample to the
- * value to aggregate for graph series.
- *
- * @since 2.14
- */
-public interface GraphValueSelector {
-
- /**
- * Do a projection from a sample to the value to aggregate for the specified
- * series and key.
- *
- * @param series
- * the series where the value will be aggregated
- * @param sample
- * the sample
- * @return the value to aggregate
- */
- double select(String series, Sample sample);
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.jmeter.report.processor.graph;
+
+import org.apache.jmeter.report.core.Sample;
+
+/**
+ * The interface GraphValueSelector represents a projection from a sample to the
+ * value to aggregate for graph series.
+ *
+ * @since 2.14
+ */
+public interface GraphValueSelector {
+
+ /**
+ * Do a projection from a sample to the value to aggregate for the specified
+ * series and key.
+ *
+ * @param series
+ * the series where the value will be aggregated
+ * @param sample
+ * the sample
+ * @return the value to aggregate
+ */
+ double select(String series, Sample sample);
+}
Propchange: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GraphValueSelector.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GroupData.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GroupData.java?rev=1719185&r1=1719184&r2=1719185&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GroupData.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GroupData.java Thu Dec 10 19:10:06 2015
@@ -1,71 +1,71 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.jmeter.report.processor.graph;
-
-import java.util.HashMap;
-
-import org.apache.jmeter.report.processor.AggregatorFactory;
-
-/**
- * The class GroupData helps to store group data for a graph.
- */
-public class GroupData {
- private final HashMap<String, SeriesData> seriesData = new HashMap<>();
- private final SeriesData overallSeries;
-
- /**
- * Gets the series data map.
- *
- * @return the series data map
- */
- public final HashMap<String, SeriesData> getSeriesInfo() {
- return seriesData;
- }
-
- /**
- * Gets the overall series data
- *
- * @return the overall series data
- */
- public final SeriesData getOverallSeries() {
- return overallSeries;
- }
-
- /**
- * Instantiates a new group groupData.
- *
- * @param factory
- * the factory
- * @param hasOverall
- * the status defining if the group has an overall seriesData
- * @param hasAggregatedKey
- * the status defining if the group aggregates keys
- */
- public GroupData(AggregatorFactory factory, boolean hasOverall,
- boolean hasAggregatedKey) {
- overallSeries = hasOverall ? new SeriesData(factory, hasAggregatedKey,
- false, true) : null;
- }
-
- public void clear() {
- seriesData.clear();
- if (overallSeries != null) {
- overallSeries.clear();
- }
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.jmeter.report.processor.graph;
+
+import java.util.HashMap;
+
+import org.apache.jmeter.report.processor.AggregatorFactory;
+
+/**
+ * The class GroupData helps to store group data for a graph.
+ */
+public class GroupData {
+ private final HashMap<String, SeriesData> seriesData = new HashMap<>();
+ private final SeriesData overallSeries;
+
+ /**
+ * Gets the series data map.
+ *
+ * @return the series data map
+ */
+ public final HashMap<String, SeriesData> getSeriesInfo() {
+ return seriesData;
+ }
+
+ /**
+ * Gets the overall series data
+ *
+ * @return the overall series data
+ */
+ public final SeriesData getOverallSeries() {
+ return overallSeries;
+ }
+
+ /**
+ * Instantiates a new group groupData.
+ *
+ * @param factory
+ * the factory
+ * @param hasOverall
+ * the status defining if the group has an overall seriesData
+ * @param hasAggregatedKey
+ * the status defining if the group aggregates keys
+ */
+ public GroupData(AggregatorFactory factory, boolean hasOverall,
+ boolean hasAggregatedKey) {
+ overallSeries = hasOverall ? new SeriesData(factory, hasAggregatedKey,
+ false, true) : null;
+ }
+
+ public void clear() {
+ seriesData.clear();
+ if (overallSeries != null) {
+ overallSeries.clear();
+ }
+ }
+}
Propchange: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GroupData.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GroupInfo.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GroupInfo.java?rev=1719185&r1=1719184&r2=1719185&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GroupInfo.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GroupInfo.java Thu Dec 10 19:10:06 2015
@@ -1,115 +1,115 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.jmeter.report.processor.graph;
-
-import org.apache.jmeter.report.processor.AggregatorFactory;
-
-/**
- * The class GroupInfo stores information about the series group of a graph.
- *
- * @since 2.14
- */
-public class GroupInfo {
- private final boolean enableAggregatedKeysSeries;
- private final boolean enableOverallSeries;
- private final GraphSeriesSelector seriesSelector;
- private final GraphValueSelector valueSelector;
- private final AggregatorFactory aggregatorFactory;
- private final GroupData groupData;
-
- /**
- * Enables aggregated keys seriesData.
- *
- * @return the enableAggregatedKeysSeries
- */
- public final boolean enablesAggregatedKeysSeries() {
- return enableAggregatedKeysSeries;
- }
-
- /**
- * Enables overall seriesData.
- *
- * @return the enableOverallSeries
- */
- public final boolean enablesOverallSeries() {
- return enableOverallSeries;
- }
-
- /**
- * Gets the seriesData selector.
- *
- * @return the seriesData selector
- */
- public final GraphSeriesSelector getSeriesSelector() {
- return seriesSelector;
- }
-
- /**
- * Gets the value selector.
- *
- * @return the value selector
- */
- public final GraphValueSelector getValueSelector() {
- return valueSelector;
- }
-
- /**
- * Gets the aggregator factory.
- *
- * @return the aggregatorFactory
- */
- public final AggregatorFactory getAggregatorFactory() {
- return aggregatorFactory;
- }
-
- /**
- * Gets the group data.
- *
- * @return the group data
- */
- public final GroupData getGroupData() {
- return groupData;
- }
-
- /**
- * Instantiates a new group info.
- *
- * @param aggregatorFactory
- * the aggregator factory
- * @param seriesSelector
- * the series selector
- * @param valueSelector
- * the value selector
- * @param enableOverallSeries
- * the enable overall series
- * @param enableAggregatedKeysSeries
- * the enable aggregated keys series
- */
- public GroupInfo(AggregatorFactory aggregatorFactory,
- GraphSeriesSelector seriesSelector,
- GraphValueSelector valueSelector, boolean enableOverallSeries,
- boolean enableAggregatedKeysSeries) {
- this.enableOverallSeries = enableOverallSeries;
- this.seriesSelector = seriesSelector;
- this.valueSelector = valueSelector;
- this.aggregatorFactory = aggregatorFactory;
- this.enableAggregatedKeysSeries = enableAggregatedKeysSeries;
- this.groupData = new GroupData(aggregatorFactory, enableOverallSeries,
- enableAggregatedKeysSeries);
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.jmeter.report.processor.graph;
+
+import org.apache.jmeter.report.processor.AggregatorFactory;
+
+/**
+ * The class GroupInfo stores information about the series group of a graph.
+ *
+ * @since 2.14
+ */
+public class GroupInfo {
+ private final boolean enableAggregatedKeysSeries;
+ private final boolean enableOverallSeries;
+ private final GraphSeriesSelector seriesSelector;
+ private final GraphValueSelector valueSelector;
+ private final AggregatorFactory aggregatorFactory;
+ private final GroupData groupData;
+
+ /**
+ * Enables aggregated keys seriesData.
+ *
+ * @return the enableAggregatedKeysSeries
+ */
+ public final boolean enablesAggregatedKeysSeries() {
+ return enableAggregatedKeysSeries;
+ }
+
+ /**
+ * Enables overall seriesData.
+ *
+ * @return the enableOverallSeries
+ */
+ public final boolean enablesOverallSeries() {
+ return enableOverallSeries;
+ }
+
+ /**
+ * Gets the seriesData selector.
+ *
+ * @return the seriesData selector
+ */
+ public final GraphSeriesSelector getSeriesSelector() {
+ return seriesSelector;
+ }
+
+ /**
+ * Gets the value selector.
+ *
+ * @return the value selector
+ */
+ public final GraphValueSelector getValueSelector() {
+ return valueSelector;
+ }
+
+ /**
+ * Gets the aggregator factory.
+ *
+ * @return the aggregatorFactory
+ */
+ public final AggregatorFactory getAggregatorFactory() {
+ return aggregatorFactory;
+ }
+
+ /**
+ * Gets the group data.
+ *
+ * @return the group data
+ */
+ public final GroupData getGroupData() {
+ return groupData;
+ }
+
+ /**
+ * Instantiates a new group info.
+ *
+ * @param aggregatorFactory
+ * the aggregator factory
+ * @param seriesSelector
+ * the series selector
+ * @param valueSelector
+ * the value selector
+ * @param enableOverallSeries
+ * the enable overall series
+ * @param enableAggregatedKeysSeries
+ * the enable aggregated keys series
+ */
+ public GroupInfo(AggregatorFactory aggregatorFactory,
+ GraphSeriesSelector seriesSelector,
+ GraphValueSelector valueSelector, boolean enableOverallSeries,
+ boolean enableAggregatedKeysSeries) {
+ this.enableOverallSeries = enableOverallSeries;
+ this.seriesSelector = seriesSelector;
+ this.valueSelector = valueSelector;
+ this.aggregatorFactory = aggregatorFactory;
+ this.enableAggregatedKeysSeries = enableAggregatedKeysSeries;
+ this.groupData = new GroupData(aggregatorFactory, enableOverallSeries,
+ enableAggregatedKeysSeries);
+ }
+}
Propchange: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/GroupInfo.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/IndexedNameSelector.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/IndexedNameSelector.java?rev=1719185&r1=1719184&r2=1719185&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/IndexedNameSelector.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/IndexedNameSelector.java Thu Dec 10 19:10:06 2015
@@ -1,64 +1,64 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.jmeter.report.processor.graph;
-
-import java.util.LinkedList;
-import java.util.List;
-
-import org.apache.jmeter.report.core.Sample;
-
-// TODO: Auto-generated Javadoc
-/**
- * The class IndexedNameSelector provides a projection from a sample to its name
- * and maintains an index of the projected names.
- *
- * @since 2.14
- */
-public class IndexedNameSelector implements GraphKeysSelector {
-
- /** The names. */
- private LinkedList<String> names = new LinkedList<>();
-
- /**
- * Gets the names.
- *
- * @return the names
- */
- public final List<String> getNames() {
- return names;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.jmeter.report.csv.processor.SampleSelector#select(org.apache
- * .jmeter.report.csv.core.Sample)
- */
- @Override
- public Double select(Sample sample) {
- String name = sample.getName();
- int index = names.indexOf(name);
- if (index < 0) {
- names.addLast(name);
- index = names.size() - 1;
- }
- return (double) index;
- }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.jmeter.report.processor.graph;
+
+import java.util.LinkedList;
+import java.util.List;
+
+import org.apache.jmeter.report.core.Sample;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The class IndexedNameSelector provides a projection from a sample to its name
+ * and maintains an index of the projected names.
+ *
+ * @since 2.14
+ */
+public class IndexedNameSelector implements GraphKeysSelector {
+
+ /** The names. */
+ private LinkedList<String> names = new LinkedList<>();
+
+ /**
+ * Gets the names.
+ *
+ * @return the names
+ */
+ public final List<String> getNames() {
+ return names;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.apache.jmeter.report.csv.processor.SampleSelector#select(org.apache
+ * .jmeter.report.csv.core.Sample)
+ */
+ @Override
+ public Double select(Sample sample) {
+ String name = sample.getName();
+ int index = names.indexOf(name);
+ if (index < 0) {
+ names.addLast(name);
+ index = names.size() - 1;
+ }
+ return (double) index;
+ }
+
+}
Propchange: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/IndexedNameSelector.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/LatencyValueSelector.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/LatencyValueSelector.java?rev=1719185&r1=1719184&r2=1719185&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/LatencyValueSelector.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/LatencyValueSelector.java Thu Dec 10 19:10:06 2015
@@ -1,42 +1,42 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.jmeter.report.processor.graph;
-
-import org.apache.jmeter.report.core.Sample;
-
-/**
- * The class LatencyValueSelector provides a projection from a sample to its
- * latency.
- *
- * @since 2.14
- */
-public class LatencyValueSelector implements GraphValueSelector {
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.jmeter.report.csv.processor.GraphValueSelector#select(java
- * .lang.String, java.lang.Object, org.apache.jmeter.report.csv.core.Sample)
- */
- @Override
- public double select(String series, Sample sample) {
- return sample.getLatency();
- }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.jmeter.report.processor.graph;
+
+import org.apache.jmeter.report.core.Sample;
+
+/**
+ * The class LatencyValueSelector provides a projection from a sample to its
+ * latency.
+ *
+ * @since 2.14
+ */
+public class LatencyValueSelector implements GraphValueSelector {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.apache.jmeter.report.csv.processor.GraphValueSelector#select(java
+ * .lang.String, java.lang.Object, org.apache.jmeter.report.csv.core.Sample)
+ */
+ @Override
+ public double select(String series, Sample sample) {
+ return sample.getLatency();
+ }
+
+}
Propchange: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/LatencyValueSelector.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/NameSeriesSelector.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/NameSeriesSelector.java?rev=1719185&r1=1719184&r2=1719185&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/NameSeriesSelector.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/NameSeriesSelector.java Thu Dec 10 19:10:06 2015
@@ -1,50 +1,50 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.jmeter.report.processor.graph;
-
-import java.util.Arrays;
-
-import org.apache.jmeter.report.core.Sample;
-
-/**
- * The class NameSerieSelector provides a projection of a sample to its name.
- *
- * @since 2.14
- */
-public class NameSeriesSelector extends AbstractSeriesSelector {
-
- /**
- * Instantiates a new name series selector.
- */
- public NameSeriesSelector() {
- super(true);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.jmeter.report.csv.processor.SampleSelector#select(org.apache
- * .jmeter.report.csv.core.Sample)
- */
- @Override
- public Iterable<String> select(Sample sample) {
- return Arrays.asList(sample.getName());
- }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.jmeter.report.processor.graph;
+
+import java.util.Arrays;
+
+import org.apache.jmeter.report.core.Sample;
+
+/**
+ * The class NameSerieSelector provides a projection of a sample to its name.
+ *
+ * @since 2.14
+ */
+public class NameSeriesSelector extends AbstractSeriesSelector {
+
+ /**
+ * Instantiates a new name series selector.
+ */
+ public NameSeriesSelector() {
+ super(true);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.apache.jmeter.report.csv.processor.SampleSelector#select(org.apache
+ * .jmeter.report.csv.core.Sample)
+ */
+ @Override
+ public Iterable<String> select(Sample sample) {
+ return Arrays.asList(sample.getName());
+ }
+
+}
Propchange: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/NameSeriesSelector.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/SeriesData.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/SeriesData.java?rev=1719185&r1=1719184&r2=1719185&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/SeriesData.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/SeriesData.java Thu Dec 10 19:10:06 2015
@@ -1,151 +1,151 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.jmeter.report.processor.graph;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.jmeter.report.processor.Aggregator;
-import org.apache.jmeter.report.processor.AggregatorFactory;
-
-/**
- * The class SeriesData helps to store series data in a graph.
- *
- * @since 2.14
- */
-public class SeriesData {
-
- /** The regular groupData. */
- private final HashMap<Double, Aggregator> aggregators = new HashMap<>();
-
- /** The keys aggregator for aggregated keys seriesData. */
- private final Aggregator keysAggregator;
-
- /** The values aggregator for aggregated keys seriesData. */
- private final Aggregator valuesAggregator;
-
- /** Indicate whether the current series is produced from controller samples. */
- private final boolean isControllersSeries;
-
- /**
- * Indicate whether the current series is an overall aggregation of other
- * series.
- */
- private final boolean isOverallSeries;
-
- /** The count of samples of this series. */
- private long count = 0L;
-
- /**
- * Gets the groupData.
- *
- * @return the groupData
- */
- public final Map<Double, Aggregator> getAggregatorInfo() {
- return aggregators;
- }
-
- /**
- * Gets the keys aggregator of aggregated keys seriesData.
- *
- * @return the keys aggregator
- */
- public final Aggregator getKeysAggregator() {
- return keysAggregator;
- }
-
- /**
- * Gets the values aggregator of aggregated keys seriesData.
- *
- * @return the values aggregator
- */
- public final Aggregator getValuesAggregator() {
- return valuesAggregator;
- }
-
- /**
- * Checks if the current series is built from controller samples.
- *
- * @return true, if the current series is built from controller samples;
- * false otherwise
- */
- public final boolean isControllersSeries() {
- return isControllersSeries;
- }
-
- /**
- * Checks if the current series is an overall aggregation of other series.
- *
- * @return true, if the current series is an overall aggregation of other
- * series; false otherwise
- */
- public final boolean isOverallSeries() {
- return isOverallSeries;
- }
-
- /**
- * Gets the count of samples.
- *
- * @return the count of samples
- */
- public final long getCount() {
- return count;
- }
-
- /**
- * Instantiates a new data seriesData.
- *
- * @param factory
- * the factory
- * @param hasAggregatedKey
- * the has aggregated key
- * @param isControllersSeries
- * the flag using to indicate if the current series is built from
- * controller samples
- */
- public SeriesData(AggregatorFactory factory, boolean hasAggregatedKey,
- boolean isControllersSeries, boolean isOverallSeries) {
- if (hasAggregatedKey) {
- keysAggregator = factory.createKeyAggregator();
- valuesAggregator = factory.createAggregatedKeyValueAggregator();
- } else {
- keysAggregator = null;
- valuesAggregator = null;
- }
- this.isControllersSeries = isControllersSeries;
- this.isOverallSeries = isOverallSeries;
- }
-
- /**
- * Increment the count of samples.
- */
- public void incrementCount() {
- count++;
- }
-
- public void clear() {
- aggregators.clear();
- count = 0L;
- if (keysAggregator != null) {
- keysAggregator.reset();
- }
- if (valuesAggregator != null) {
- valuesAggregator.reset();
- }
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.jmeter.report.processor.graph;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.jmeter.report.processor.Aggregator;
+import org.apache.jmeter.report.processor.AggregatorFactory;
+
+/**
+ * The class SeriesData helps to store series data in a graph.
+ *
+ * @since 2.14
+ */
+public class SeriesData {
+
+ /** The regular groupData. */
+ private final HashMap<Double, Aggregator> aggregators = new HashMap<>();
+
+ /** The keys aggregator for aggregated keys seriesData. */
+ private final Aggregator keysAggregator;
+
+ /** The values aggregator for aggregated keys seriesData. */
+ private final Aggregator valuesAggregator;
+
+ /** Indicate whether the current series is produced from controller samples. */
+ private final boolean isControllersSeries;
+
+ /**
+ * Indicate whether the current series is an overall aggregation of other
+ * series.
+ */
+ private final boolean isOverallSeries;
+
+ /** The count of samples of this series. */
+ private long count = 0L;
+
+ /**
+ * Gets the groupData.
+ *
+ * @return the groupData
+ */
+ public final Map<Double, Aggregator> getAggregatorInfo() {
+ return aggregators;
+ }
+
+ /**
+ * Gets the keys aggregator of aggregated keys seriesData.
+ *
+ * @return the keys aggregator
+ */
+ public final Aggregator getKeysAggregator() {
+ return keysAggregator;
+ }
+
+ /**
+ * Gets the values aggregator of aggregated keys seriesData.
+ *
+ * @return the values aggregator
+ */
+ public final Aggregator getValuesAggregator() {
+ return valuesAggregator;
+ }
+
+ /**
+ * Checks if the current series is built from controller samples.
+ *
+ * @return true, if the current series is built from controller samples;
+ * false otherwise
+ */
+ public final boolean isControllersSeries() {
+ return isControllersSeries;
+ }
+
+ /**
+ * Checks if the current series is an overall aggregation of other series.
+ *
+ * @return true, if the current series is an overall aggregation of other
+ * series; false otherwise
+ */
+ public final boolean isOverallSeries() {
+ return isOverallSeries;
+ }
+
+ /**
+ * Gets the count of samples.
+ *
+ * @return the count of samples
+ */
+ public final long getCount() {
+ return count;
+ }
+
+ /**
+ * Instantiates a new data seriesData.
+ *
+ * @param factory
+ * the factory
+ * @param hasAggregatedKey
+ * the has aggregated key
+ * @param isControllersSeries
+ * the flag using to indicate if the current series is built from
+ * controller samples
+ */
+ public SeriesData(AggregatorFactory factory, boolean hasAggregatedKey,
+ boolean isControllersSeries, boolean isOverallSeries) {
+ if (hasAggregatedKey) {
+ keysAggregator = factory.createKeyAggregator();
+ valuesAggregator = factory.createAggregatedKeyValueAggregator();
+ } else {
+ keysAggregator = null;
+ valuesAggregator = null;
+ }
+ this.isControllersSeries = isControllersSeries;
+ this.isOverallSeries = isOverallSeries;
+ }
+
+ /**
+ * Increment the count of samples.
+ */
+ public void incrementCount() {
+ count++;
+ }
+
+ public void clear() {
+ aggregators.clear();
+ count = 0L;
+ if (keysAggregator != null) {
+ keysAggregator.reset();
+ }
+ if (valuesAggregator != null) {
+ valuesAggregator.reset();
+ }
+ }
+}
Propchange: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/SeriesData.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/StaticSeriesSelector.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/StaticSeriesSelector.java?rev=1719185&r1=1719184&r2=1719185&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/StaticSeriesSelector.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/StaticSeriesSelector.java Thu Dec 10 19:10:06 2015
@@ -1,64 +1,64 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.jmeter.report.processor.graph;
-
-import java.util.Arrays;
-
-import org.apache.jmeter.report.core.Sample;
-
-/**
- * The class StaticSeriesSelector provides always the same series name.
- *
- * @since 2.14
- */
-public class StaticSeriesSelector extends AbstractSeriesSelector {
-
- private String seriesName;
-
- /**
- * Gets the name of the series.
- *
- * @return the name of the series
- */
- public final String getSeriesName() {
- return seriesName;
- }
-
- /**
- * Sets the name of the series.
- *
- * @param seriesName
- * the name of the series to set
- */
- public final void setSeriesName(String seriesName) {
- this.seriesName = seriesName;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.jmeter.report.csv.processor.SampleSelector#select(org.apache
- * .jmeter.report.csv.core.Sample)
- */
- @Override
- public Iterable<String> select(Sample sample) {
- return Arrays.asList(seriesName);
- }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.jmeter.report.processor.graph;
+
+import java.util.Arrays;
+
+import org.apache.jmeter.report.core.Sample;
+
+/**
+ * The class StaticSeriesSelector provides always the same series name.
+ *
+ * @since 2.14
+ */
+public class StaticSeriesSelector extends AbstractSeriesSelector {
+
+ private String seriesName;
+
+ /**
+ * Gets the name of the series.
+ *
+ * @return the name of the series
+ */
+ public final String getSeriesName() {
+ return seriesName;
+ }
+
+ /**
+ * Sets the name of the series.
+ *
+ * @param seriesName
+ * the name of the series to set
+ */
+ public final void setSeriesName(String seriesName) {
+ this.seriesName = seriesName;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.apache.jmeter.report.csv.processor.SampleSelector#select(org.apache
+ * .jmeter.report.csv.core.Sample)
+ */
+ @Override
+ public Iterable<String> select(Sample sample) {
+ return Arrays.asList(seriesName);
+ }
+
+}
Propchange: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/StaticSeriesSelector.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/StatusSeriesSelector.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/StatusSeriesSelector.java?rev=1719185&r1=1719184&r2=1719185&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/StatusSeriesSelector.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/StatusSeriesSelector.java Thu Dec 10 19:10:06 2015
@@ -1,86 +1,86 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.jmeter.report.processor.graph;
-
-import java.util.Arrays;
-
-import org.apache.jmeter.report.core.Sample;
-
-/**
- * The class StatusSeriesSelector provides a projection from a sample to a
- * string that defines its status (success or failure).
- *
- * @since 2.14
- */
-public class StatusSeriesSelector extends AbstractSeriesSelector {
-
- private String failureLabel = "Failures";
- private String successLabel = "Successes";
-
- /**
- * Gets the failure label.
- *
- * @return the failureLabel
- */
- public final String getFailureLabel() {
- return failureLabel;
- }
-
- /**
- * Sets the failure label.
- *
- * @param failureLabel
- * the failureLabel to set
- */
- public final void setFailureLabel(String failureLabel) {
- this.failureLabel = failureLabel;
- }
-
- /**
- * Gets the success label.
- *
- * @return the successLabel
- */
- public final String getSuccessLabel() {
- return successLabel;
- }
-
- /**
- * Sets the success label.
- *
- * @param successLabel
- * the successLabel to set
- */
- public final void setSuccessLabel(String successLabel) {
- this.successLabel = successLabel;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.jmeter.report.csv.processor.SampleSelector#select(org.apache
- * .jmeter.report.csv.core.Sample)
- */
- @Override
- public Iterable<String> select(Sample sample) {
- String label = sample.getSuccess() ? successLabel : failureLabel;
- return Arrays.asList(new String[] { label });
- }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.jmeter.report.processor.graph;
+
+import java.util.Arrays;
+
+import org.apache.jmeter.report.core.Sample;
+
+/**
+ * The class StatusSeriesSelector provides a projection from a sample to a
+ * string that defines its status (success or failure).
+ *
+ * @since 2.14
+ */
+public class StatusSeriesSelector extends AbstractSeriesSelector {
+
+ private String failureLabel = "Failures";
+ private String successLabel = "Successes";
+
+ /**
+ * Gets the failure label.
+ *
+ * @return the failureLabel
+ */
+ public final String getFailureLabel() {
+ return failureLabel;
+ }
+
+ /**
+ * Sets the failure label.
+ *
+ * @param failureLabel
+ * the failureLabel to set
+ */
+ public final void setFailureLabel(String failureLabel) {
+ this.failureLabel = failureLabel;
+ }
+
+ /**
+ * Gets the success label.
+ *
+ * @return the successLabel
+ */
+ public final String getSuccessLabel() {
+ return successLabel;
+ }
+
+ /**
+ * Sets the success label.
+ *
+ * @param successLabel
+ * the successLabel to set
+ */
+ public final void setSuccessLabel(String successLabel) {
+ this.successLabel = successLabel;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.apache.jmeter.report.csv.processor.SampleSelector#select(org.apache
+ * .jmeter.report.csv.core.Sample)
+ */
+ @Override
+ public Iterable<String> select(Sample sample) {
+ String label = sample.getSuccess() ? successLabel : failureLabel;
+ return Arrays.asList(new String[] { label });
+ }
+
+}
Propchange: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/StatusSeriesSelector.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/TimeStampKeysSelector.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/TimeStampKeysSelector.java?rev=1719185&r1=1719184&r2=1719185&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/TimeStampKeysSelector.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/TimeStampKeysSelector.java Thu Dec 10 19:10:06 2015
@@ -1,86 +1,86 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.jmeter.report.processor.graph;
-
-import org.apache.jmeter.report.core.Sample;
-
-/**
- * The class TimeStampKeysSelector provides a projection from a sample to its
- * begin or end time.
- *
- * @since 2.14
- */
-public class TimeStampKeysSelector implements GraphKeysSelector {
-
- private long granularity = 1;
- private boolean selectBeginTime = false;
-
- /**
- * Gets the granularity.
- *
- * @return the granularity
- */
- public long getGranularity() {
- return granularity;
- }
-
- /**
- * Sets the granularity.
- *
- * @param granularity
- * the granularity to set
- */
- public void setGranularity(long granularity) {
- this.granularity = granularity;
- }
-
- /**
- * Gets a status defining whether the projection is done with the begin or
- * end time of the sample.
- *
- * @return true if the begin time is used; false otherwise.
- */
- public final boolean selectsBeginTime() {
- return selectBeginTime;
- }
-
- /**
- * Sets the status defining whether the projection is done with the begin or
- * end time of the sample.
- *
- * @param selectBeginTime
- * the status to set
- */
- public final void setSelectBeginTime(boolean selectBeginTime) {
- this.selectBeginTime = selectBeginTime;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.jmeter.report.core.SampleSelector#select(org.apache.jmeter
- * .report.core.Sample)
- */
- @Override
- public Double select(Sample sample) {
- long time = selectBeginTime ? sample.getStartTime() : sample.getEndTime();
- return (double) (time - time % granularity);
- }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.jmeter.report.processor.graph;
+
+import org.apache.jmeter.report.core.Sample;
+
+/**
+ * The class TimeStampKeysSelector provides a projection from a sample to its
+ * begin or end time.
+ *
+ * @since 2.14
+ */
+public class TimeStampKeysSelector implements GraphKeysSelector {
+
+ private long granularity = 1;
+ private boolean selectBeginTime = false;
+
+ /**
+ * Gets the granularity.
+ *
+ * @return the granularity
+ */
+ public long getGranularity() {
+ return granularity;
+ }
+
+ /**
+ * Sets the granularity.
+ *
+ * @param granularity
+ * the granularity to set
+ */
+ public void setGranularity(long granularity) {
+ this.granularity = granularity;
+ }
+
+ /**
+ * Gets a status defining whether the projection is done with the begin or
+ * end time of the sample.
+ *
+ * @return true if the begin time is used; false otherwise.
+ */
+ public final boolean selectsBeginTime() {
+ return selectBeginTime;
+ }
+
+ /**
+ * Sets the status defining whether the projection is done with the begin or
+ * end time of the sample.
+ *
+ * @param selectBeginTime
+ * the status to set
+ */
+ public final void setSelectBeginTime(boolean selectBeginTime) {
+ this.selectBeginTime = selectBeginTime;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.apache.jmeter.report.core.SampleSelector#select(org.apache.jmeter
+ * .report.core.Sample)
+ */
+ @Override
+ public Double select(Sample sample) {
+ long time = selectBeginTime ? sample.getStartTime() : sample.getEndTime();
+ return (double) (time - time % granularity);
+ }
+
+}
Propchange: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/TimeStampKeysSelector.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ActiveThreadsGraphConsumer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ActiveThreadsGraphConsumer.java?rev=1719185&r1=1719184&r2=1719185&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ActiveThreadsGraphConsumer.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ActiveThreadsGraphConsumer.java Thu Dec 10 19:10:06 2015
@@ -1,86 +1,86 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.jmeter.report.processor.graph.impl;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.jmeter.report.core.Sample;
-import org.apache.jmeter.report.processor.MeanAggregatorFactory;
-import org.apache.jmeter.report.processor.graph.AbstractGraphConsumer;
-import org.apache.jmeter.report.processor.graph.AbstractOverTimeGraphConsumer;
-import org.apache.jmeter.report.processor.graph.AbstractSeriesSelector;
-import org.apache.jmeter.report.processor.graph.GraphValueSelector;
-import org.apache.jmeter.report.processor.graph.GroupInfo;
-import org.apache.jmeter.report.processor.graph.TimeStampKeysSelector;
-
-/**
- * The class ActiveThreadsGraphConsumer provides a graph to visualize hits rate
- * per second.
- *
- * @since 2.14
- */
-public class ActiveThreadsGraphConsumer extends AbstractOverTimeGraphConsumer {
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.jmeter.report.csv.processor.impl.AbstractOverTimeGraphConsumer
- * #createTimeStampKeysSelector()
- */
- @Override
- protected TimeStampKeysSelector createTimeStampKeysSelector() {
- TimeStampKeysSelector keysSelector = new TimeStampKeysSelector();
- keysSelector.setSelectBeginTime(false);
- return keysSelector;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.jmeter.report.csv.processor.impl.AbstractGraphConsumer#
- * createGroupInfos()
- */
- @Override
- protected Map<String, GroupInfo> createGroupInfos() {
- HashMap<String, GroupInfo> groupInfos = new HashMap<>(1);
- groupInfos.put(AbstractGraphConsumer.DEFAULT_GROUP, new GroupInfo(
- new MeanAggregatorFactory(), new AbstractSeriesSelector() {
-
- @Override
- public Iterable<String> select(Sample sample) {
- String threadName = sample.getThreadName();
- int index = threadName.lastIndexOf(" ");
- if (index >= 0) {
- threadName = threadName.substring(0, index);
- }
- return Arrays.asList(new String[] { threadName });
- }
- }, new GraphValueSelector() {
-
- @Override
- public double select(String series, Sample sample) {
- return sample.getGroupThreads();
- }
- }, false, false));
- return groupInfos;
- }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.jmeter.report.processor.graph.impl;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.jmeter.report.core.Sample;
+import org.apache.jmeter.report.processor.MeanAggregatorFactory;
+import org.apache.jmeter.report.processor.graph.AbstractGraphConsumer;
+import org.apache.jmeter.report.processor.graph.AbstractOverTimeGraphConsumer;
+import org.apache.jmeter.report.processor.graph.AbstractSeriesSelector;
+import org.apache.jmeter.report.processor.graph.GraphValueSelector;
+import org.apache.jmeter.report.processor.graph.GroupInfo;
+import org.apache.jmeter.report.processor.graph.TimeStampKeysSelector;
+
+/**
+ * The class ActiveThreadsGraphConsumer provides a graph to visualize hits rate
+ * per second.
+ *
+ * @since 2.14
+ */
+public class ActiveThreadsGraphConsumer extends AbstractOverTimeGraphConsumer {
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.apache.jmeter.report.csv.processor.impl.AbstractOverTimeGraphConsumer
+ * #createTimeStampKeysSelector()
+ */
+ @Override
+ protected TimeStampKeysSelector createTimeStampKeysSelector() {
+ TimeStampKeysSelector keysSelector = new TimeStampKeysSelector();
+ keysSelector.setSelectBeginTime(false);
+ return keysSelector;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.jmeter.report.csv.processor.impl.AbstractGraphConsumer#
+ * createGroupInfos()
+ */
+ @Override
+ protected Map<String, GroupInfo> createGroupInfos() {
+ HashMap<String, GroupInfo> groupInfos = new HashMap<>(1);
+ groupInfos.put(AbstractGraphConsumer.DEFAULT_GROUP, new GroupInfo(
+ new MeanAggregatorFactory(), new AbstractSeriesSelector() {
+
+ @Override
+ public Iterable<String> select(Sample sample) {
+ String threadName = sample.getThreadName();
+ int index = threadName.lastIndexOf(" ");
+ if (index >= 0) {
+ threadName = threadName.substring(0, index);
+ }
+ return Arrays.asList(new String[] { threadName });
+ }
+ }, new GraphValueSelector() {
+
+ @Override
+ public double select(String series, Sample sample) {
+ return sample.getGroupThreads();
+ }
+ }, false, false));
+ return groupInfos;
+ }
+
+}
Propchange: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/ActiveThreadsGraphConsumer.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/BytesThroughputGraphConsumer.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/BytesThroughputGraphConsumer.java?rev=1719185&r1=1719184&r2=1719185&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/BytesThroughputGraphConsumer.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/BytesThroughputGraphConsumer.java Thu Dec 10 19:10:06 2015
@@ -1,104 +1,104 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.jmeter.report.processor.graph.impl;
-
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.jmeter.report.core.Sample;
-import org.apache.jmeter.report.processor.TimeRateAggregatorFactory;
-import org.apache.jmeter.report.processor.graph.AbstractGraphConsumer;
-import org.apache.jmeter.report.processor.graph.AbstractOverTimeGraphConsumer;
-import org.apache.jmeter.report.processor.graph.AbstractSeriesSelector;
-import org.apache.jmeter.report.processor.graph.GraphValueSelector;
-import org.apache.jmeter.report.processor.graph.GroupInfo;
-import org.apache.jmeter.report.processor.graph.TimeStampKeysSelector;
-
-/**
- * The class HitsPerSecondGraphConsumer provides a graph to visualize hits rate
- * per second.
- *
- * @since 2.14
- */
-public class BytesThroughputGraphConsumer extends AbstractOverTimeGraphConsumer {
-
- private static final String RECEIVED_BYTES_SERIES_LABEL = "Bytes received per second";
- private static final String SENT_BYTES_SERIES_LABEL = "Bytes sent per second";
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.jmeter.report.csv.processor.impl.AbstractOverTimeGraphConsumer
- * #createTimeStampKeysSelector()
- */
- @Override
- protected TimeStampKeysSelector createTimeStampKeysSelector() {
- TimeStampKeysSelector keysSelector = new TimeStampKeysSelector();
- keysSelector.setSelectBeginTime(false);
- return keysSelector;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.apache.jmeter.report.csv.processor.impl.AbstractGraphConsumer#
- * createGroupInfos()
- */
- @Override
- protected Map<String, GroupInfo> createGroupInfos() {
- HashMap<String, GroupInfo> groupInfos = new HashMap<>(2);
- groupInfos.put(AbstractGraphConsumer.DEFAULT_GROUP, new GroupInfo(
- new TimeRateAggregatorFactory(), new AbstractSeriesSelector() {
- private final Iterable<String> values = Arrays.asList(
- RECEIVED_BYTES_SERIES_LABEL,
- SENT_BYTES_SERIES_LABEL);
-
- @Override
- public Iterable<String> select(Sample sample) {
- return values;
- }
- }, new GraphValueSelector() {
-
- @Override
- public double select(String series, Sample sample) {
- // TODO Add Received bytes support
- return (series == SENT_BYTES_SERIES_LABEL) ? sample
- .getSentBytes() : 0;
- }
- }, false, false));
- return groupInfos;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.jmeter.report.csv.processor.impl.AbstractOverTimeGraphConsumer
- * #setGranularity(long)
- */
- @Override
- public void setGranularity(long granularity) {
- super.setGranularity(granularity);
- // Override the granularity of the aggregators factory
- ((TimeRateAggregatorFactory) getGroupInfos().get(
- AbstractGraphConsumer.DEFAULT_GROUP).getAggregatorFactory())
- .setGranularity(granularity);
- }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.jmeter.report.processor.graph.impl;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.jmeter.report.core.Sample;
+import org.apache.jmeter.report.processor.TimeRateAggregatorFactory;
+import org.apache.jmeter.report.processor.graph.AbstractGraphConsumer;
+import org.apache.jmeter.report.processor.graph.AbstractOverTimeGraphConsumer;
+import org.apache.jmeter.report.processor.graph.AbstractSeriesSelector;
+import org.apache.jmeter.report.processor.graph.GraphValueSelector;
+import org.apache.jmeter.report.processor.graph.GroupInfo;
+import org.apache.jmeter.report.processor.graph.TimeStampKeysSelector;
+
+/**
+ * The class HitsPerSecondGraphConsumer provides a graph to visualize hits rate
+ * per second.
+ *
+ * @since 2.14
+ */
+public class BytesThroughputGraphConsumer extends AbstractOverTimeGraphConsumer {
+
+ private static final String RECEIVED_BYTES_SERIES_LABEL = "Bytes received per second";
+ private static final String SENT_BYTES_SERIES_LABEL = "Bytes sent per second";
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.apache.jmeter.report.csv.processor.impl.AbstractOverTimeGraphConsumer
+ * #createTimeStampKeysSelector()
+ */
+ @Override
+ protected TimeStampKeysSelector createTimeStampKeysSelector() {
+ TimeStampKeysSelector keysSelector = new TimeStampKeysSelector();
+ keysSelector.setSelectBeginTime(false);
+ return keysSelector;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.apache.jmeter.report.csv.processor.impl.AbstractGraphConsumer#
+ * createGroupInfos()
+ */
+ @Override
+ protected Map<String, GroupInfo> createGroupInfos() {
+ HashMap<String, GroupInfo> groupInfos = new HashMap<>(2);
+ groupInfos.put(AbstractGraphConsumer.DEFAULT_GROUP, new GroupInfo(
+ new TimeRateAggregatorFactory(), new AbstractSeriesSelector() {
+ private final Iterable<String> values = Arrays.asList(
+ RECEIVED_BYTES_SERIES_LABEL,
+ SENT_BYTES_SERIES_LABEL);
+
+ @Override
+ public Iterable<String> select(Sample sample) {
+ return values;
+ }
+ }, new GraphValueSelector() {
+
+ @Override
+ public double select(String series, Sample sample) {
+ // TODO Add Received bytes support
+ return (series == SENT_BYTES_SERIES_LABEL) ? sample
+ .getSentBytes() : 0;
+ }
+ }, false, false));
+ return groupInfos;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.apache.jmeter.report.csv.processor.impl.AbstractOverTimeGraphConsumer
+ * #setGranularity(long)
+ */
+ @Override
+ public void setGranularity(long granularity) {
+ super.setGranularity(granularity);
+ // Override the granularity of the aggregators factory
+ ((TimeRateAggregatorFactory) getGroupInfos().get(
+ AbstractGraphConsumer.DEFAULT_GROUP).getAggregatorFactory())
+ .setGranularity(granularity);
+ }
+}
Propchange: jmeter/trunk/src/core/org/apache/jmeter/report/processor/graph/impl/BytesThroughputGraphConsumer.java
------------------------------------------------------------------------------
svn:eol-style = native