Examples of Histogram


Examples of org.radargun.stats.representation.Histogram

         }
         if (accCount > 0) {
            ranges.add(max);
            counts.add(accCount - lastCount);
         }
         return (T) new Histogram(Projections.toLongArray(ranges), Projections.toLongArray(counts));
      } else {
         return null;
      }
   }
View Full Code Here

Examples of ptolemy.plot.Histogram

    /** Create a new Histogram plot.
     *  @return A new plot object.
     */
    protected PlotBox _newPlot() {
        return new Histogram();
    }
View Full Code Here

Examples of ptolemy.plot.Histogram

                    ((Histogram) _plot).setBars(width, offset);
                }
            } else if (elementName.equals("bin")) {
                // Ignore if plot is not an instance of Histogram.
                if (_plot instanceof Histogram) {
                    Histogram histogram = (Histogram) _plot;
                    String widthSpec = (String) _attributes.get("width");
                    String offsetSpec = (String) _attributes.get("offset");

                    // NOTE: If only one of these is given, then the other
                    // is ignored.
                    if ((widthSpec != null) && (offsetSpec != null)) {
                        double width = (Double.valueOf(widthSpec))
                                .doubleValue();
                        histogram.setBinWidth(width);

                        double offset = (Double.valueOf(offsetSpec))
                                .doubleValue();
                        histogram.setBinOffset(offset);
                    }
                }
            } else if (elementName.equals("dataset")) {
                // Override the base class to ignore things irrelevant
                // to histograms...
View Full Code Here

Examples of ptolemy.plot.Histogram

    /** Create a new Plot object for the applet.  Derived classes can
     *  redefine this method to return a different type of plot object.
     */
    public PlotBox newPlot() {
        return new Histogram();
    }
View Full Code Here

Examples of vanilla.java.processingengine.testing.Histogram

        gw2pe.useUnsafe(true);
        Gw2PeWriter gw2PeWriter = new Gw2PeWriter(gw2pe.createExcerpt());

        IndexedChronicle pe2gw = new IndexedChronicle(pePath);
        pe2gw.useUnsafe(true);
        final Histogram times = new Histogram(10000, 100);
        final AtomicInteger reportCount = new AtomicInteger();
        Pe2GwEvents listener = new Pe2GwEvents() {
            @Override
            public void report(@NotNull MetaData metaData, SmallReport smallReport) {
                if (metaData.sourceId != gwId) return;

                if (!throughputTest)
                    times.sample(metaData.inReadTimestamp7Delta * 100);
                reportCount.getAndIncrement();
            }
        };
        Pe2GwReader pe2GwReader = new Pe2GwReader(gwId, pe2gw.createExcerpt(), listener);

        // synchronize the start.
        if (gwId > 1) {
            int startTime = (int) ((System.currentTimeMillis() / 1000 - 5) % 10) + 5;
            System.out.println("Count down");
            for (int i = startTime; i > 0; i--) {
                System.out.print(i + " ");
                System.out.flush();
                Thread.sleep(1000);
            }
        }
        System.out.println("Started");
        long start = System.nanoTime();
        // run loop
        SmallCommand command = new SmallCommand();
        @SuppressWarnings("MismatchedQueryAndUpdateOfStringBuilder")
        StringBuilder clientOrderId = command.clientOrderId;
        for (int i = 0; i < orders; i++) {
            clientOrderId.setLength(0);
            clientOrderId.append("clientOrderId-");
            clientOrderId.append(gwId);
            clientOrderId.append('-');
            clientOrderId.append(i);
            command.instrument = "XAU/EUR";
            command.price = 1209.41;
            command.quantity = 1000;
            command.side = (i & 1) == 0 ? Side.BUY : Side.SELL;
            gw2PeWriter.small(null, command);

            if (throughputTest) {
                do {
                    /* read another */
                } while (pe2GwReader.readOne());
            } else {
                do {
                    /* read another */
                } while (pe2GwReader.readOne() || reportCount.get() < i - 1);
            }
        }

        while (reportCount.get() < orders) {
            pe2GwReader.readOne();
        }
        long time = System.nanoTime() - start;
        System.out.printf("Processed %,d events in and out in %.1f seconds%n", orders, time / 1e9);
        if (!throughputTest) {
            System.out.printf("The latency distribution was %.1f, %.1f/%.1f/%.1f us for the 1, 90/99/99.9 %%tile%n",
                    times.percentile(0.01) / 1e3,
                    times.percentile(0.90) / 1e3,
                    times.percentile(0.99) / 1e3,
                    times.percentile(0.999) / 1e3
            );
        }
        gw2pe.close();
        pe2gw.close();
    }
View Full Code Here

Examples of voldemort.store.stats.Histogram

        this.numActiveConnections = new MutableInt(0);
        this.serverCommBufferStats = new CommBufferSizeStats();

        // Theoretically, the delay can be only upto SELECTOR_POLL_MS.
        // But sometimes wallclock time can be higher
        this.selectTimeMsHistogram = new Histogram(SelectorManager.SELECTOR_POLL_MS * 2,
                                                   1,
                                                   SELECTOR_STATS_RESET_INTERVAL);
        // Not a scientific limit. Not expecting a server thread to handle more
        // than 100K connections.
        this.selectCountHistogram = new Histogram(100000, 1, SELECTOR_STATS_RESET_INTERVAL);
        // again not scientific. But we really don't care about any processing
        // time higher than 15 seconds
        this.processingTimeMsHistogram = new Histogram(15000, 1, SELECTOR_STATS_RESET_INTERVAL);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.