Package smartrics.jmeter.sampler.gui

Examples of smartrics.jmeter.sampler.gui.ChartWrapper


            return;
        }
        Set<String> keys = charts.keySet();
        int cnt = 0;
        for (String key : keys) {
            ChartWrapper chart = charts.get(key);
            chart.drawData();
            String gfname = graphFile.getAbsolutePath();
            if (keys.size() > 1) {
                gfname = addCounterToFilename(cnt, gfname);
                cnt++;
            }
            SaveGraphUtil.saveGraph(gfname, chart.getChart());
        }
    }
View Full Code Here


        String post = fname.substring(extPos);
        return pre + "_" + cnt + post;
    }

    public void handle(JmxSampleResult res) {
        ChartWrapper jmxChart = jmxCharts.get(res.getJmxUri());
        if (jmxChart == null) {
            String[] label = new String[] { res.getMemType(), "Average" };
            String yaTitle = "Kb";
            String xaTitle = "time";
            jmxChart = createChartWrapper(res.getJmxUri(), label, yaTitle, xaTitle);
            jmxCharts.put(res.getJmxUri(), jmxChart);
        }
        jmxChart.putRawData(res.getTimeStamp(), Long.parseLong(res.getSamplerData()));
    }
View Full Code Here

        }
        jmxChart.putRawData(res.getTimeStamp(), Long.parseLong(res.getSamplerData()));
    }

    private ChartWrapper createChartWrapper(String title, String[] label, String yaTitle, String xaTitle) {
        ChartWrapper chart = new ChartWrapper();
        chart.setHeight(600);
        chart.setWidth(800);
        chart.setTitle(title);
        chart.setYAxisLabels(label);
        chart.setYAxisTitle(yaTitle);
        chart.setXAxisTitle(xaTitle);
        return chart;
    }
View Full Code Here

        URL url = res.getURL();
        String uri = "host";
        // TODO: find out why the URL is not saved in the HTTPSampleResult
        if (url != null)
            uri = url.getProtocol() + "://" + url.getHost() + ":" + url.getPort();
        ChartWrapper timeChart = perfCharts.get(uri);
        if (timeChart == null) {
            String[] label = new String[] { "Time", "Average" };
            String yaTitle = "ms";
            String xaTitle = "time";
            timeChart = createChartWrapper(uri, label, yaTitle, xaTitle);
            perfCharts.put(uri, timeChart);
        }
        timeChart.putRawData(res.getTimeStamp(), res.getEndTime() - res.getStartTime());
    }
View Full Code Here

TOP

Related Classes of smartrics.jmeter.sampler.gui.ChartWrapper

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.