Search in sources :

Example 6 with ValueResultData

use of org.apache.jmeter.report.processor.ValueResultData in project jmeter by apache.

the class AbstractGraphConsumer method createResult.

private MapResultData createResult() {
    MapResultData result = new MapResultData();
    result.setResult(RESULT_MIN_X, new ValueResultData(Double.MAX_VALUE));
    result.setResult(RESULT_MAX_X, new ValueResultData(Double.MIN_VALUE));
    result.setResult(RESULT_MIN_Y, new ValueResultData(Double.MAX_VALUE));
    result.setResult(RESULT_MAX_Y, new ValueResultData(Double.MIN_VALUE));
    result.setResult(RESULT_TITLE, new ValueResultData(getTitle()));
    result.setResult(RESULT_SERIES, new ListResultData());
    boolean supportsControllersDiscrimination = groupInfos.values().stream().map(GroupInfo::getSeriesSelector).allMatch(GraphSeriesSelector::allowsControllersDiscrimination);
    result.setResult(RESULT_SUPPORTS_CONTROLLERS_DISCRIMINATION, new ValueResultData(supportsControllersDiscrimination));
    initializeExtraResults(result);
    return result;
}
Also used : MapResultData(org.apache.jmeter.report.processor.MapResultData) ValueResultData(org.apache.jmeter.report.processor.ValueResultData) ListResultData(org.apache.jmeter.report.processor.ListResultData)

Example 7 with ValueResultData

use of org.apache.jmeter.report.processor.ValueResultData in project jmeter by apache.

the class JsonExporter method createStatistic.

private void createStatistic(Map<String, SamplingStatistic> statistics, MapResultData resultData) {
    LOGGER.debug("Creating statistics for result data:{}", resultData);
    SamplingStatistic statistic = new SamplingStatistic();
    ListResultData listResultData = (ListResultData) resultData.getResult("data");
    statistic.setTransaction((String) ((ValueResultData) listResultData.get(0)).getValue());
    statistic.setSampleCount((Long) ((ValueResultData) listResultData.get(1)).getValue());
    statistic.setErrorCount((Long) ((ValueResultData) listResultData.get(2)).getValue());
    statistic.setErrorPct(((Double) ((ValueResultData) listResultData.get(3)).getValue()).floatValue());
    statistic.setMeanResTime((Double) ((ValueResultData) listResultData.get(4)).getValue());
    statistic.setMinResTime((Long) ((ValueResultData) listResultData.get(5)).getValue());
    statistic.setMaxResTime((Long) ((ValueResultData) listResultData.get(6)).getValue());
    statistic.setMedianResTime((Double) ((ValueResultData) listResultData.get(7)).getValue());
    statistic.setPct1ResTime((Double) ((ValueResultData) listResultData.get(8)).getValue());
    statistic.setPct2ResTime((Double) ((ValueResultData) listResultData.get(9)).getValue());
    statistic.setPct3ResTime((Double) ((ValueResultData) listResultData.get(10)).getValue());
    statistic.setThroughput((Double) ((ValueResultData) listResultData.get(11)).getValue());
    statistic.setReceivedKBytesPerSec((Double) ((ValueResultData) listResultData.get(12)).getValue());
    statistic.setSentKBytesPerSec((Double) ((ValueResultData) listResultData.get(13)).getValue());
    statistics.put(statistic.getTransaction(), statistic);
}
Also used : ListResultData(org.apache.jmeter.report.processor.ListResultData) ValueResultData(org.apache.jmeter.report.processor.ValueResultData)

Example 8 with ValueResultData

use of org.apache.jmeter.report.processor.ValueResultData in project jmeter by apache.

the class SyntheticResponseTimeDistributionGraphConsumer method create.

private MapResultData create(String serie, String color) {
    GroupInfo groupInfo = getGroupInfos().get(AbstractGraphConsumer.DEFAULT_GROUP);
    SeriesData seriesData = new SeriesData(groupInfo.getAggregatorFactory(), groupInfo.enablesAggregatedKeysSeries(), false, groupInfo.enablesOverallSeries());
    MapResultData seriesResult = createSerieResult(serie, seriesData);
    seriesResult.setResult(SERIE_COLOR_PROPERTY, new ValueResultData(color));
    return seriesResult;
}
Also used : SeriesData(org.apache.jmeter.report.processor.graph.SeriesData) GroupInfo(org.apache.jmeter.report.processor.graph.GroupInfo) MapResultData(org.apache.jmeter.report.processor.MapResultData) ValueResultData(org.apache.jmeter.report.processor.ValueResultData)

Example 9 with ValueResultData

use of org.apache.jmeter.report.processor.ValueResultData in project jmeter by apache.

the class AbstractGraphConsumer method createSerieResult.

/**
 * @param series     The series name
 * @param seriesData {@link SeriesData}
 * @return MapResultData metadata for serie
 */
protected MapResultData createSerieResult(String series, SeriesData seriesData) {
    MapResultData seriesResult = new MapResultData();
    seriesResult.setResult(RESULT_SERIES_NAME, new ValueResultData(series));
    seriesResult.setResult(RESULT_SERIES_IS_CONTROLLER, new ValueResultData(seriesData.isControllersSeries()));
    seriesResult.setResult(RESULT_SERIES_IS_OVERALL, new ValueResultData(seriesData.isOverallSeries()));
    seriesResult.setResult(RESULT_SERIES_DATA, new ListResultData());
    return seriesResult;
}
Also used : MapResultData(org.apache.jmeter.report.processor.MapResultData) ValueResultData(org.apache.jmeter.report.processor.ValueResultData) ListResultData(org.apache.jmeter.report.processor.ListResultData)

Example 10 with ValueResultData

use of org.apache.jmeter.report.processor.ValueResultData in project jmeter by apache.

the class AbstractGraphConsumer method setMinResult.

private void setMinResult(MapResultData result, String name, Double value) {
    ValueResultData valueResult = (ValueResultData) result.getResult(name);
    valueResult.setValue(Math.min((Double) valueResult.getValue(), value));
}
Also used : ValueResultData(org.apache.jmeter.report.processor.ValueResultData)

Aggregations

ValueResultData (org.apache.jmeter.report.processor.ValueResultData)11 ListResultData (org.apache.jmeter.report.processor.ListResultData)6 MapResultData (org.apache.jmeter.report.processor.MapResultData)5 HashMap (java.util.HashMap)1 Map (java.util.Map)1 TreeMap (java.util.TreeMap)1 Aggregator (org.apache.jmeter.report.processor.Aggregator)1 ResultData (org.apache.jmeter.report.processor.ResultData)1 GroupInfo (org.apache.jmeter.report.processor.graph.GroupInfo)1 IndexedNameSelector (org.apache.jmeter.report.processor.graph.IndexedNameSelector)1 SeriesData (org.apache.jmeter.report.processor.graph.SeriesData)1