本文整理了Java中org.HdrHistogram.Histogram.recordedValues()
方法的一些代码示例,展示了Histogram.recordedValues()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Histogram.recordedValues()
方法的具体详情如下:
包路径:org.HdrHistogram.Histogram
类名称:Histogram
方法名:recordedValues
暂无
代码示例来源:origin: HdrHistogram/HdrHistogram
@Override
public synchronized RecordedValues recordedValues() {
return super.recordedValues();
}
代码示例来源:origin: networknt/light-4j
@Override
public void dump(OutputStream output) {
PrintWriter p = null;
try {
p = new PrintWriter(new OutputStreamWriter(output, UTF_8));
for (HistogramIterationValue value : histogram.recordedValues()) {
for (int j = 0; j < value.getCountAddedInThisIterationStep(); j++) {
p.printf("%d%n", value.getValueIteratedTo());
}
}
} catch (Exception e) {
if(p != null) p.close();
logger.error("Exception:", e);
}
}
}
代码示例来源:origin: networknt/light-4j
@Override
public long[] getValues() {
long[] vals = new long[(int) histogram.getTotalCount()];
int i = 0;
for (HistogramIterationValue value : histogram.recordedValues()) {
long val = value.getValueIteratedTo();
for (int j = 0; j < value.getCountAddedInThisIterationStep(); j++) {
vals[i] = val;
i++;
}
}
if (i != vals.length) {
throw new IllegalStateException(
"Total count was " + histogram.getTotalCount() + " but iterating values produced " + vals.length);
}
return vals;
}
代码示例来源:origin: brianfrankcooper/YCSB
for (HistogramIterationValue v : totalHistogram.recordedValues()) {
int value;
if (v.getValueIteratedTo() > (long)Integer.MAX_VALUE) {
代码示例来源:origin: org.hdrhistogram/HdrHistogram
@Override
public synchronized RecordedValues recordedValues() {
return super.recordedValues();
}
代码示例来源:origin: vladimir-bukhtoyarov/rolling-metrics
@Override
public long[] getValues() {
long[] values = new long[1024];
int i = 0;
for (HistogramIterationValue value : histogram.recordedValues()) {
values[i] = value.getValueIteratedTo();
i++;
if (i == values.length) {
values = Arrays.copyOf(values, values.length * 2);
}
}
return Arrays.copyOf(values, i);
}
代码示例来源:origin: com.github.vladimir-bukhtoyarov/rolling-metrics
@Override
public long[] getValues() {
long[] values = new long[1024];
int i = 0;
for (HistogramIterationValue value : histogram.recordedValues()) {
values[i] = value.getValueIteratedTo();
i++;
if (i == values.length) {
values = Arrays.copyOf(values, values.length * 2);
}
}
return Arrays.copyOf(values, i);
}
代码示例来源:origin: org.mpierce.metrics.reservoir/hdrhistogram-metrics-reservoir
@Override
public void dump(OutputStream output) {
try (PrintWriter p = new PrintWriter(new OutputStreamWriter(output, UTF_8))) {
for (HistogramIterationValue value : histogram.recordedValues()) {
for (int j = 0; j < value.getCountAddedInThisIterationStep(); j++) {
p.printf("%d%n", value.getValueIteratedTo());
}
}
}
}
}
代码示例来源:origin: vladimir-bukhtoyarov/rolling-metrics
@Override
public void dump(OutputStream output) {
try (PrintWriter p = new PrintWriter(new OutputStreamWriter(output, UTF_8))) {
for (HistogramIterationValue value : histogram.recordedValues()) {
for (int j = 0; j < value.getCountAddedInThisIterationStep(); j++) {
p.printf("%d%n", value.getValueIteratedTo());
}
}
}
}
代码示例来源:origin: com.hotels.styx/styx-api
@Override
public void dump(OutputStream output) {
PrintWriter p = new PrintWriter(new OutputStreamWriter(output, UTF_8));
for (HistogramIterationValue value : histogram.recordedValues()) {
for (int j = 0; j < value.getCountAddedInThisIterationStep(); j++) {
p.printf("%d%n", value.getValueIteratedTo());
}
}
}
}
代码示例来源:origin: com.github.vladimir-bukhtoyarov/rolling-metrics
@Override
public void dump(OutputStream output) {
try (PrintWriter p = new PrintWriter(new OutputStreamWriter(output, UTF_8))) {
for (HistogramIterationValue value : histogram.recordedValues()) {
for (int j = 0; j < value.getCountAddedInThisIterationStep(); j++) {
p.printf("%d%n", value.getValueIteratedTo());
}
}
}
}
代码示例来源:origin: co.paralleluniverse/quasar-core
@Override
public void dump(OutputStream output) {
PrintWriter p = new PrintWriter(new OutputStreamWriter(output, UTF_8));
for (HistogramIterationValue value : histogram.recordedValues()) {
for (int j = 0; j < value.getCountAddedInThisIterationStep(); j++)
p.printf("%d%n", value.getValueIteratedTo());
}
}
}
代码示例来源:origin: io.engineblock/eb-api
@Override
public void dump(OutputStream output) {
try (PrintWriter p = new PrintWriter(new OutputStreamWriter(output, UTF_8))) {
for (HistogramIterationValue value : histogram.recordedValues()) {
for (int j = 0; j < value.getCountAddedInThisIterationStep(); j++) {
p.printf("%d%n", value.getValueIteratedTo());
}
}
}
}
代码示例来源:origin: HotelsDotCom/styx
@Override
public void dump(OutputStream output) {
PrintWriter p = new PrintWriter(new OutputStreamWriter(output, UTF_8));
for (HistogramIterationValue value : histogram.recordedValues()) {
for (int j = 0; j < value.getCountAddedInThisIterationStep(); j++) {
p.printf("%d%n", value.getValueIteratedTo());
}
}
}
}
代码示例来源:origin: com.networknt/metrics
@Override
public void dump(OutputStream output) {
PrintWriter p = null;
try {
p = new PrintWriter(new OutputStreamWriter(output, UTF_8));
for (HistogramIterationValue value : histogram.recordedValues()) {
for (int j = 0; j < value.getCountAddedInThisIterationStep(); j++) {
p.printf("%d%n", value.getValueIteratedTo());
}
}
} catch (Exception e) {
if(p != null) p.close();
logger.error("Exception:", e);
}
}
}
代码示例来源:origin: org.attribyte/essem-reporter
@Override
public long[] getValues() {
final int size = toIntExact(histogram.getTotalCount());
final long[] values = new long[size];
int pos = 0;
for(HistogramIterationValue value : histogram.recordedValues()) {
long recordedValue = value.getValueIteratedTo();
long count = value.getCountAddedInThisIterationStep();
for(int i = 0; i < count; i++) {
values[pos++] = recordedValue;
}
}
return values;
}
代码示例来源:origin: com.hotels.styx/styx-api
@Override
public long[] getValues() {
long[] vals = new long[(int) histogram.getTotalCount()];
int i = 0;
for (HistogramIterationValue value : histogram.recordedValues()) {
long val = value.getValueIteratedTo();
for (int j = 0; j < value.getCountAddedInThisIterationStep(); j++) {
vals[i++] = val;
}
}
if (i != vals.length) {
throw new IllegalStateException(format("Total count was %d but iterating values produced is %d",
histogram.getTotalCount(), vals.length));
}
return vals;
}
代码示例来源:origin: HotelsDotCom/styx
@Override
public long[] getValues() {
long[] vals = new long[(int) histogram.getTotalCount()];
int i = 0;
for (HistogramIterationValue value : histogram.recordedValues()) {
long val = value.getValueIteratedTo();
for (int j = 0; j < value.getCountAddedInThisIterationStep(); j++) {
vals[i++] = val;
}
}
if (i != vals.length) {
throw new IllegalStateException(format("Total count was %d but iterating values produced is %d",
histogram.getTotalCount(), vals.length));
}
return vals;
}
代码示例来源:origin: co.paralleluniverse/quasar-core
@Override
public long[] getValues() {
final long[] vals = new long[(int) histogram.getTotalCount()];
int i = 0;
for (HistogramIterationValue value : histogram.recordedValues()) {
long val = value.getValueIteratedTo();
for (int j = 0; j < value.getCountAddedInThisIterationStep(); j++)
vals[i++] = val;
}
if (i != vals.length)
throw new IllegalStateException("Total count was " + histogram.getTotalCount() + " but iterating values produced " + vals.length);
return vals;
}
代码示例来源:origin: com.networknt/metrics
@Override
public long[] getValues() {
long[] vals = new long[(int) histogram.getTotalCount()];
int i = 0;
for (HistogramIterationValue value : histogram.recordedValues()) {
long val = value.getValueIteratedTo();
for (int j = 0; j < value.getCountAddedInThisIterationStep(); j++) {
vals[i] = val;
i++;
}
}
if (i != vals.length) {
throw new IllegalStateException(
"Total count was " + histogram.getTotalCount() + " but iterating values produced " + vals.length);
}
return vals;
}
内容来源于网络,如有侵权,请联系作者删除!