Package kg.apc.charting

Examples of kg.apc.charting.AbstractGraphRow


    }

    private void updateChart(VariableThroughputTimer tg) {
        model.clear();
        chart.clearErrorMessage();
        AbstractGraphRow row = new GraphRowExactValues();
        row.setColor(Color.BLUE);
        row.setDrawLine(true);
        row.setMarkerSize(AbstractGraphRow.MARKER_SIZE_NONE);
        row.setDrawThickLines(true);

        long now = System.currentTimeMillis();

        int rowsCount = tableModel.getRowCount();
        row.add(now, 0);
        row.add(now, tg.getRPSForSecond(0));

        int duration = 0;
        for (int i = 0; i < rowsCount; i++) {
            row.add(now + (duration + 1) * 1000, tg.getRPSForSecond(duration + 1));
            int rowVal = getIntFromRow(i, 2);
            if (rowVal < 0) {
                chart.setErrorMessage("The values entered cannot be rendered in preview...");
                break;
            }
            duration = duration + rowVal;
            row.add(now + duration * 1000, tg.getRPSForSecond(duration));
        }

        chart.setxAxisLabelRenderer(new DateTimeRenderer(DateTimeRenderer.HHMMSS, now - 1)); //-1 because row.add(thread.getStartTime() - 1, 0)
        chart.setForcedMinX(now);

View Full Code Here


    private double getAllThreadCount(long time) {
        double ret = 0;
        Iterator<AbstractGraphRow> rowsIter = model.values().iterator();
        while (rowsIter.hasNext()) {
            AbstractGraphRow row = rowsIter.next();

            //if the tg finished, last value = 0, else we take last known value
            if (time <= (row.getMaxX() + row.getGranulationValue())) {
                AbstractGraphPanelChartElement element = row.getElement(time);

                if (element == null) {
                    element = row.getLowerElement(time);
                }
                if (element != null) {
                    ret += element.getValue();
                }
            }
View Full Code Here

        }
    }

    private void addThreadGroupRecord(String threadGroupName, long time, int numThreads, long duration) {
        String labelAgg = "Overall Active Threads";
        AbstractGraphRow row = model.get(threadGroupName);
        AbstractGraphRow rowAgg = modelAggregate.get(labelAgg);

        if (row == null) {
            row = getNewRow(model, AbstractGraphRow.ROW_AVERAGES, threadGroupName, AbstractGraphRow.MARKER_SIZE_SMALL, false, false, false, true, true);
        }
        if (rowAgg == null) {
            rowAgg = getNewRow(modelAggregate, AbstractGraphRow.ROW_SIMPLE, labelAgg, AbstractGraphRow.MARKER_SIZE_SMALL, false, false, false, true, Color.RED, true);
        }

        row.add(time, numThreads);

        //rebuild is a heavy process, avoided if possible
        if (model.size() == 1) {
            log.debug(row.toString());
            log.debug(row.getElement(time).toString());
            rowAgg.add(time, row.getElement(time).getValue());
        } else {
            rowAgg.add(time, getAllThreadCount(time));

            //handle 3rd and more jtl reload, the time are reset to start time, so we
            //invalidate lastAggUpdateTime
            if (time < lastAggUpdateTime) {
                lastAggUpdateTime = time - duration;
View Full Code Here

        boolean thickLines = false;
        boolean showInLegend = false;
        Color color = null;
        boolean canCompose = false;
        AbstractGraphPanelVisualizer instance = new AbstractGraphPanelVisualizerImpl();
        AbstractGraphRow result = instance.getNewRow(model, rowType, label, markerSize, isBarRow, displayLabel, thickLines, showInLegend, color, canCompose);
        assertNotNull(result);
    }
View Full Code Here

        boolean displayLabel = false;
        boolean thickLines = false;
        boolean showInLegend = false;
        boolean canCompose = false;
        AbstractGraphPanelVisualizer instance = new AbstractGraphPanelVisualizerImpl();
        AbstractGraphRow result = instance.getNewRow(model, rowType, label, markerSize, isBarRow, displayLabel, thickLines, showInLegend, canCompose);
        assertNotNull(result);
    }
View Full Code Here

TOP

Related Classes of kg.apc.charting.AbstractGraphRow

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.