Package org.apache.jmeter.visualizers

Examples of org.apache.jmeter.visualizers.SamplingStatCalculator


        String[] urls = this.getURLs().split(URL_DELIM);
        double[][] dataset = new double[urls.length][data.size()];
        for (int idx=0; idx < urls.length; idx++) {
            for (int idz=0; idz < data.size(); idz++) {
                DataSet dset = (DataSet)data.get(idz);
                SamplingStatCalculator ss = dset.getStatistics(urls[idx]);
                dataset[idx][idz] = getValue(ss);
            }
        }
        return dataset;
    }
View Full Code Here


     */
    public List getStats(List urls) {
        ArrayList items = new ArrayList();
        Iterator itr = urls.iterator();
        if (itr.hasNext()) {
            SamplingStatCalculator row = (SamplingStatCalculator)itr.next();
            if (row != null) {
                items.add(row);
            }
        }
        return items;
View Full Code Here

        // now add the samples to the HashMap
        String url = sample.getSampleLabel();
        if (url == null) {
            url = sample.getURL().toString();
        }
        SamplingStatCalculator row = (SamplingStatCalculator)data.get(url);
        if (row == null) {
            row = new SamplingStatCalculator();
            // just like the aggregate listener, we use the sample label to represent
            // a row. in this case, we use it as a key.
            this.data.put(url,row);
        }
        row.addSample(sample);
    }
View Full Code Here

     */
    public double[][] convertToDouble(List data) {
        double[][] dataset = new double[1][data.size()];
        //Iterator itr = data.iterator();
        for (int idx=0; idx < data.size(); idx++) {
            SamplingStatCalculator stat = (SamplingStatCalculator)data.get(idx);
            dataset[0][idx] = getValue(stat);
        }
        return dataset;
    }
View Full Code Here

        ArrayList dset = new ArrayList();
        ArrayList xlabels = new ArrayList();
        Iterator itr = data.iterator();
        while (itr.hasNext()) {
            DataSet item = (DataSet)itr.next();
            SamplingStatCalculator ss = item.getStatistics(this.getURL());
            if (ss != null) {
                // we add the entry
                dset.add(ss);
                if ( getXLabel().equals(X_DATA_FILENAME_LABEL) ) {
                    xlabels.add(item.getDataSourceName());
View Full Code Here

    @SuppressWarnings({ "rawtypes", "unchecked" }) // Method is broken anyway
    public List getStats(List urls) {
        ArrayList items = new ArrayList();
        Iterator itr = urls.iterator();
        if (itr.hasNext()) {
            SamplingStatCalculator row = (SamplingStatCalculator)itr.next();
            if (row != null) {
                items.add(row);
            }
        }
        return items;
View Full Code Here

        // now add the samples to the HashMap
        String url = sample.getSampleLabel();
        if (url == null) {
            url = sample.getURL().toString();
        }
        SamplingStatCalculator row = data.get(url);
        if (row == null) {
            row = new SamplingStatCalculator(url);
            // just like the aggregate listener, we use the sample label to represent
            // a row. in this case, we use it as a key.
            this.data.put(url,row);
        }
        row.addSample(sample);
    }
View Full Code Here

      myTotals.delta.addSample(s);
    }

    long now = System.currentTimeMillis() / 1000;// in seconds

    SamplingStatCalculator myDelta = null;
    SamplingStatCalculator myTotal = null;
    boolean reportNow = false;

    /*
     * Have we reached the reporting boundary? Need to allow for a margin of
     * error, otherwise can miss the slot Also need to check we've not hit
     * the window already
     */
    synchronized (myTotals) {
      if ((now > myTotals.last + INTERVAL_WINDOW) && (now % INTERVAL <= INTERVAL_WINDOW)) {
        reportNow = true;
        myDelta = new SamplingStatCalculator(myTotals.delta);// copy
                                    // the
                                    // data
                                    // to
                                    // minimise
                                    // ...
        myTotals.moveDelta();
        myTotal = new SamplingStatCalculator(myTotals.total);// ...
                                    // the
                                    // synch
                                    // time
        myTotals.last = now;
      }
    }
    if (reportNow) {
      String str;
      str = format(myDelta, "+");
      if (TOLOG)
        log.info(str);
      if (TOOUT)
        System.out.println(str);

      if (myTotal.getCount() != myDelta.getCount()) {// Only if we have
                              // updated them
        str = format(myTotal, "=");
        if (TOLOG)
          log.info(str);
        if (TOOUT)
View Full Code Here

    @Override
    public List getStats(List urls) {
        ArrayList items = new ArrayList();
        Iterator itr = urls.iterator();
        if (itr.hasNext()) {
            SamplingStatCalculator row = (SamplingStatCalculator)itr.next();
            if (row != null) {
                items.add(row);
            }
        }
        return items;
View Full Code Here

        // now add the samples to the HashMap
        String url = sample.getSampleLabel();
        if (url == null) {
            url = sample.getURL().toString();
        }
        SamplingStatCalculator row = data.get(url);
        if (row == null) {
            row = new SamplingStatCalculator(url);
            // just like the aggregate listener, we use the sample label to represent
            // a row. in this case, we use it as a key.
            this.data.put(url,row);
        }
        row.addSample(sample);
    }
View Full Code Here

TOP

Related Classes of org.apache.jmeter.visualizers.SamplingStatCalculator

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.