Examples of Histogram


Examples of com.lmax.disruptor.collections.Histogram

    // ThreadContext.put("aKey", "mdcVal");
    PerfTest.println("Warming up the JVM...");
    long t1 = System.nanoTime();

    // warmup at least 2 rounds and at most 1 minute
    final Histogram warmupHist = PerfTest.createHistogram();
    final long stop = System.currentTimeMillis() + (60 * 1000);
    Runnable run1 = new Runnable() {
      public void run() {
        for (int i = 0; i < 10; i++) {
          final int LINES = PerfTest.throughput ? 50000 : 200000;
View Full Code Here

Examples of com.sun.sgs.impl.profile.util.Histogram

        }

  for (Entry<String, List<Long>> entry : m.entrySet()) {
      String name = entry.getKey();

      Histogram hist = profileSamples.get(name);
      if (hist == null) {
    hist = new PowerOfTwoHistogram();
    profileSamples.put(name, hist);
      }

      List<Long> samples = entry.getValue();
      for (Long l : samples) {
    hist.bin(l.longValue());
            }
  }
 
  if (taskCount % windowSize == 0) {
View Full Code Here

Examples of com.vladmihalcea.flexypool.metric.Histogram

    @Test
    public void testHistogram() {
        CodahaleMetrics codahaleMetrics = new CodahaleMetrics(configurationProperties, reservoirFactory);
        when(reservoirFactory.newInstance(com.codahale.metrics.Histogram.class, "histo")).thenReturn(reservoir);
        Histogram histogram = codahaleMetrics.histogram("histo");
        verify(reservoirFactory, times(1)).newInstance(com.codahale.metrics.Histogram.class, "histo");
        assertNotNull(histogram);
    }
View Full Code Here

Examples of com.xeiam.xchart.Histogram

  public Chart getChart() {

    // Create Chart
    Chart chart = new ChartBuilder().chartType(ChartType.Bar).width(800).height(600).title("Score Histogram").xAxisTitle("Mean").yAxisTitle("Count").build();

    Histogram histogram1 = new Histogram(getGaussianData(1000), 10, -30, 30);
    chart.addSeries("histogram 1", histogram1.getxAxisData(), histogram1.getyAxisData());
    Histogram histogram2 = new Histogram(getGaussianData(1000), 10, -30, 30);
    chart.addSeries("histogram 2", histogram2.getxAxisData(), histogram2.getyAxisData());

    // Customize Chart
    chart.getStyleManager().setLegendPosition(LegendPosition.InsideNW);
    chart.getStyleManager().setBarWidthPercentage(.96);
View Full Code Here

Examples of com.yammer.metrics.core.Histogram

              
               assertEquals(messageBytes.length + tcpTransportHeaderSize,flushByteCounts[0]);
               assertEquals(0, flushByteCounts[1]);
              
               // verify the histogram
               Histogram histogram = ((TcpSender)sender).getBatchingHistogram();
               assertEquals(1.0D,histogram.mean(),0.0000001);
               assertEquals(1,histogram.count());
            }
            finally
            {
               if (factory != null)
                  factory.stop();
View Full Code Here

Examples of com.yammer.metrics.core.Histogram

               assertEquals((messageBytes.length + tcpTransportHeaderSize) * 2, flushByteCounts[1]);
               assertEquals(largeMessageBytes.length + tcpTransportHeaderSize,flushByteCounts[2]);
               assertEquals(0,flushByteCounts[3]);
              
               // verify the histogram
               Histogram histogram = ((TcpSender)sender).getBatchingHistogram();
               assertEquals(calcMean(1,2,1),histogram.mean(),0.0000001);
               assertEquals(3,histogram.count());
            }
            finally
            {
               if (factory != null)
                  factory.stop();
View Full Code Here

Examples of com.yammer.metrics.core.Histogram

               assertEquals("Hello",receiver.receivedStringMessages.iterator().next());
              
               if (shouldBatch)
               {
                  // verify the histogram
                  Histogram histogram = ((TcpSender)sender).getBatchingHistogram();
                  assertEquals(calcMean(2),histogram.mean(),0.0000001);
                  assertEquals(1,histogram.count());
               }
            }
            finally
            {
               if (factory != null)
View Full Code Here

Examples of com.yammer.metrics.core.Histogram

               assertEquals(sentBytesPerMessage * 2,flushByteCounts[1]);
               assertEquals(sentBytesPerMessage,flushByteCounts[2]);
               assertEquals(0, flushByteCounts[3]);
              
               // verify the histogram
               Histogram histogram = ((TcpSender)sender).getBatchingHistogram();
               assertEquals(calcMean(1,2,1),histogram.mean(),0.0000001);
               assertEquals(3,histogram.count());
            }
            finally
            {
               if (factory != null)
                  factory.stop();
View Full Code Here

Examples of com.yammer.metrics.core.Histogram

              
               assertEquals(numBytesLastFlush,flushByteCounts[0]);
               assertEquals(numBytesSent - numBytesLastFlush, flushByteCounts[1]);
              
               // verify the histogram
               Histogram histogram = ((TcpSender)sender).getBatchingHistogram();
               assertEquals(calcMean((numMessagesSent - 1),1),histogram.mean(),0.0000001);
               assertEquals(2,histogram.count());
            }
            finally
            {
               if (factory != null)
                  factory.stop();
View Full Code Here

Examples of com.yammer.metrics.core.Histogram

            } else {
              RESPONSE_LOG
                  .info(requestId + "\t" + connectionString + "\tSUCCESS\t" + name + "\t" + ms + "\t" + argsStr);
            }
          }
          Histogram histogram = histogramMap.get(name);
          histogram.update((end - start) / 1000);
        }
      }

      private String getArgsStr(Object[] args, String name, LoggerArgsState loggerArgsState) {
        String argsStr;
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.