use of io.opencensus.stats.MeasureMap in project instrumentation-java by census-instrumentation.
the class RecordBatchedBenchmark method recordBatchedLongCount.
/**
* Record batched long count measures.
*/
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public MeasureMap recordBatchedLongCount(Data data) {
MeasureMap map = data.recorder.newMeasureMap();
for (int i = 0; i < data.numValues; i++) {
map.put(StatsBenchmarksUtil.LONG_COUNT_MEASURES[i], i);
}
map.record(data.tags);
return map;
}
use of io.opencensus.stats.MeasureMap in project instrumentation-java by census-instrumentation.
the class RecordBatchedBenchmark method recordBatchedDoubleSum.
/**
* Record batched double sum measures.
*/
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public MeasureMap recordBatchedDoubleSum(Data data) {
MeasureMap map = data.recorder.newMeasureMap();
for (int i = 0; i < data.numValues; i++) {
map.put(StatsBenchmarksUtil.DOUBLE_SUM_MEASURES[i], (double) i);
}
map.record(data.tags);
return map;
}
use of io.opencensus.stats.MeasureMap in project instrumentation-java by census-instrumentation.
the class RecordBatchedBenchmark method recordBatchedDoubleCount.
/**
* Record batched double count measures.
*/
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public MeasureMap recordBatchedDoubleCount(Data data) {
MeasureMap map = data.recorder.newMeasureMap();
for (int i = 0; i < data.numValues; i++) {
map.put(StatsBenchmarksUtil.DOUBLE_COUNT_MEASURES[i], (double) i);
}
map.record(data.tags);
return map;
}
use of io.opencensus.stats.MeasureMap in project instrumentation-java by census-instrumentation.
the class RecordBatchedBenchmark method recordBatchedDoubleDistribution.
/**
* Record batched double distribution measures.
*/
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public MeasureMap recordBatchedDoubleDistribution(Data data) {
MeasureMap map = data.recorder.newMeasureMap();
for (int i = 0; i < data.numValues; i++) {
map.put(StatsBenchmarksUtil.DOUBLE_DISTRIBUTION_MEASURES[i], (double) i);
}
map.record(data.tags);
return map;
}
use of io.opencensus.stats.MeasureMap in project instrumentation-java by census-instrumentation.
the class RecordBatchedBenchmark method recordBatchedDoubleLastValue.
/**
* Record batched double last value measures.
*/
@Benchmark
@BenchmarkMode(Mode.AverageTime)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
public MeasureMap recordBatchedDoubleLastValue(Data data) {
MeasureMap map = data.recorder.newMeasureMap();
for (int i = 0; i < data.numValues; i++) {
map.put(StatsBenchmarksUtil.DOUBLE_LASTVALUE_MEASURES[i], (double) i);
}
map.record(data.tags);
return map;
}
Aggregations