Package com.yammer.metrics.core

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


               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

               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

               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

              
               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

            } 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

      URI uri = fileSystem.getUri();
      MetricsGroup metricsGroup = metricsGroupMap.get(uri);
      if (metricsGroup == null) {
        String scope = uri.toString();

        Histogram readAccess = Metrics.newHistogram(new MetricName(ORG_APACHE_BLUR, HDFS, "Read Latency in \u00B5s",
            scope));
        Histogram writeAccess = Metrics.newHistogram(new MetricName(ORG_APACHE_BLUR, HDFS, "Write Latency in \u00B5s",
            scope));
        Meter readThroughput = Metrics.newMeter(new MetricName(ORG_APACHE_BLUR, HDFS, "Read Throughput", scope),
            "Read Bytes", TimeUnit.SECONDS);
        Meter writeThroughput = Metrics.newMeter(new MetricName(ORG_APACHE_BLUR, HDFS, "Write Throughput", scope),
            "Write Bytes", TimeUnit.SECONDS);
View Full Code Here

    MetricName readAccessName = new MetricName(ORG_APACHE_BLUR, HDFS, "Read Latency in \u00B5s", scope);
    MetricName writeAcccessName = new MetricName(ORG_APACHE_BLUR, HDFS, "Write Latency in \u00B5s", scope);
    MetricName readThroughputName = new MetricName(ORG_APACHE_BLUR, HDFS, "Read Throughput", scope);
    MetricName writeThroughputName = new MetricName(ORG_APACHE_BLUR, HDFS, "Write Throughput", scope);

    Histogram readAccess = Metrics.newHistogram(readAccessName);
    Histogram writeAccess = Metrics.newHistogram(writeAcccessName);
    Meter readThroughput = Metrics.newMeter(readThroughputName, "Read Bytes", TimeUnit.SECONDS);
    Meter writeThroughput = Metrics.newMeter(writeThroughputName, "Write Bytes", TimeUnit.SECONDS);
    return new MetricsGroup(readAccess, writeAccess, readThroughput, writeThroughput);
  }
View Full Code Here

              RESPONSE_LOG.info(getErrorResponseLogMessage(requestId, connectionString, argsStr, name, ms, user));
            } else {
              RESPONSE_LOG.info(getSuccessfulResponseLogMessage(requestId, connectionString, argsStr, name, ms, user));
            }
          }
          Histogram histogram = histogramMap.get(name);
          histogram.update((end - start) / 1000);
          if (loggerArgsState != null) {
            loggerArgsState.reset();
          }
        }
      }
View Full Code Here

  @Override
  public void doRequest(ServerData<I, V, E, M> serverData) {
    ConcurrentHashMap<I, VertexMutations<I, V, E, M>> vertexMutations =
      serverData.getVertexMutations();
    Histogram verticesInMutationHist = GiraphMetrics.get().perSuperstep()
        .getUniformHistogram(MetricNames.VERTICES_IN_MUTATION_REQUEST);
    verticesInMutationHist.update(vertexMutations.size());
    for (Entry<I, VertexMutations<I, V, E, M>> entry :
        vertexIdMutations.entrySet()) {
      VertexMutations<I, V, E, M> mutations =
          vertexMutations.get(entry.getKey());
      if (mutations == null) {
View Full Code Here

TOP

Related Classes of com.yammer.metrics.core.Histogram

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.