org.HdrHistogram.Histogram.add()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(213)

本文整理了Java中org.HdrHistogram.Histogram.add()方法的一些代码示例,展示了Histogram.add()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Histogram.add()方法的具体详情如下:
包路径:org.HdrHistogram.Histogram
类名称:Histogram
方法名:add

Histogram.add介绍

暂无

代码示例

代码示例来源:origin: PipelineAI/pipeline

@Override
  public Histogram call(Histogram initialDistribution, Histogram distributionToAdd) {
    initialDistribution.add(distributionToAdd);
    return initialDistribution;
  }
};

代码示例来源:origin: HdrHistogram/HdrHistogram

@Override
public void add(final AbstractHistogram otherHistogram) {
  // Synchronize add(). Avoid deadlocks by synchronizing in order of construction identity count.
  if (identity < otherHistogram.identity) {
    synchronized (this) {
      synchronized (otherHistogram) {
        super.add(otherHistogram);
      }
    }
  } else {
    synchronized (otherHistogram) {
      synchronized (this) {
        super.add(otherHistogram);
      }
    }
  }
}

代码示例来源:origin: brianfrankcooper/YCSB

private Histogram getIntervalHistogramAndAccumulate() {
 Histogram intervalHistogram = histogram.getIntervalHistogram();
 // add this to the total time histogram.
 if (totalHistogram == null) {
  totalHistogram = intervalHistogram;
 } else {
  totalHistogram.add(intervalHistogram);
 }
 return intervalHistogram;
}

代码示例来源:origin: apache/storm

/**
 * Add other to this.
 * @param other meaurements to add in.
 */
public void add(Measurements other) {
  histo.add(other.histo);
  sysMs += other.sysMs;
  userMs += other.userMs;
  gcMs += other.gcMs;
  memBytes = Math.max(memBytes, other.memBytes);
  acked += other.acked;
  failed += other.failed;
  uptimeSecs = Math.max(uptimeSecs, other.uptimeSecs);
  timeWindow += other.timeWindow;
  topologyIds.addAll(other.topologyIds);
  workers = Math.max(workers, other.workers);
  executors = Math.max(executors, other.executors);
  hosts = Math.max(hosts, other.hosts);
  congested.putAll(other.congested);
  skippedMaxSpoutMs += other.skippedMaxSpoutMs;
  uiCompleteLatency = Math.max(uiCompleteLatency, other.uiCompleteLatency);
}

代码示例来源:origin: lettuce-io/lettuce-core

@Override
  public Histogram getCompletionHistogram() {
    completion.add(super.getFirstResponseHistogram());
    return completion;
  }
}

代码示例来源:origin: lettuce-io/lettuce-core

@Override
public Histogram getFirstResponseHistogram() {
  firstResponse.add(super.getFirstResponseHistogram());
  return firstResponse;
}

代码示例来源:origin: HdrHistogram/HdrHistogram

@Override
public Histogram copy() {
  Histogram copy = new Histogram(this);
  copy.add(this);
  return copy;
}

代码示例来源:origin: networknt/light-4j

/**
   * @return a copy of the accumulated state since the reservoir was created
   */
  @Nonnull
  private synchronized Histogram updateRunningTotals() {
    intervalHistogram = recorder.getIntervalHistogram(intervalHistogram);
    runningTotals.add(intervalHistogram);
    return runningTotals.copy();
  }
}

代码示例来源:origin: org.apache.logging.log4j/log4j-core

private static Histogram createResultHistogram(final List<Histogram> list, final long start, final long end) {
  final Histogram result = new Histogram(TimeUnit.SECONDS.toNanos(10), 3);
  result.setStartTimeStamp(start);
  result.setEndTimeStamp(end);
  for (final Histogram hist : list) {
    result.add(hist);
  }
  return result;
}

代码示例来源:origin: apache/storm

copy.add(histo);
histo.reset();

代码示例来源:origin: HdrHistogram/HdrHistogram

throw new IllegalStateException("Encountered a Histogram line in a log of DoubleHistograms.");
accumulatedRegularHistogram.add((Histogram) intervalHistogram);
  ((DoubleHistogram) movingWindowSumHistogram).add((DoubleHistogram) intervalHistogram);
} else {
  ((Histogram) movingWindowSumHistogram).add((Histogram) intervalHistogram);

代码示例来源:origin: glowroot/glowroot

public void merge(LazyHistogram toBeMergedHistogram) {
  if (toBeMergedHistogram.histogram == null) {
    for (int i = 0; i < toBeMergedHistogram.size; i++) {
      add(toBeMergedHistogram.values[i]);
    }
  } else {
    if (histogram == null) {
      convertValuesToHistogram();
    }
    histogram.add(toBeMergedHistogram.histogram);
  }
}

代码示例来源:origin: glowroot/glowroot

public void merge(Aggregate.Histogram toBeMergedHistogram) {
  ByteString encodedBytes = toBeMergedHistogram.getEncodedBytes();
  if (encodedBytes.isEmpty()) {
    for (long rawValue : toBeMergedHistogram.getOrderedRawValueList()) {
      add(rawValue);
    }
  } else {
    if (histogram == null) {
      convertValuesToHistogram();
    }
    histogram.add(Histogram.decodeFromByteBuffer(encodedBytes.asReadOnlyByteBuffer(), 0));
  }
}

代码示例来源:origin: com.netflix.hystrix/hystrix-core

@Override
  public Histogram call(Histogram initialDistribution, Histogram distributionToAdd) {
    initialDistribution.add(distributionToAdd);
    return initialDistribution;
  }
};

代码示例来源:origin: io.vertx/vertx-circuit-breaker

public void add(Summary other) {
 statistics.add(other.statistics);
 successes += other.successes;
 failures += other.failures;
 exceptions += other.exceptions;
 timeouts += other.timeouts;
 fallbackSuccess += other.fallbackSuccess ;
 fallbackFailure += other.fallbackFailure ;
 shortCircuited += other.shortCircuited ;
}

代码示例来源:origin: HotelsDotCom/styx

public void aggregate() {
    if (this.state == IntervalState.UPDATED) {
      aggregateHistogram.add(this.intervalHistogram);
      this.state = IntervalState.AGGREGATED;
    }
  }
}

代码示例来源:origin: org.hdrhistogram/HdrHistogram

@Override
public Histogram copy() {
  Histogram copy = new Histogram(this);
  copy.add(this);
  return copy;
}

代码示例来源:origin: io.lettuce/lettuce-core

@Override
public Histogram getFirstResponseHistogram() {
  firstResponse.add(super.getFirstResponseHistogram());
  return firstResponse;
}

代码示例来源:origin: com.networknt/metrics

/**
   * @return a copy of the accumulated state since the reservoir was created
   */
  @Nonnull
  private synchronized Histogram updateRunningTotals() {
    intervalHistogram = recorder.getIntervalHistogram(intervalHistogram);
    runningTotals.add(intervalHistogram);
    return runningTotals.copy();
  }
}

代码示例来源:origin: org.attribyte/essem-reporter

@Override
public synchronized Snapshot getSnapshot() {
 lastSnapshotHistogram = recorder.getIntervalHistogram(lastSnapshotHistogram);
 totalHistogram.add(lastSnapshotHistogram);
 HDRSnapshot snapshot = new HDRSnapshot(totalHistogram.copy(), lastSnapshotHistogram.copy());
 return reportTotalHistogram ? snapshot.totalSnapshot() : snapshot.sinceLastSnapshot();
}

相关文章