@Setup(Level.Trial)
public void setup() {
chunkStore = new ChunkImpl(
new MetricsAndTagStoreImpl(new InvertedIndexTagStore(1_000_000, 1_000_000), new VarBitMetricStore()), null);
try (Stream<String> lines = Files.lines(filePath, Charset.defaultCharset())) {
lines.forEachOrdered(line -> {
try {
String[] words = line.split(" ");
String metricName = words[1];
if (counts.containsKey(metricName)) {
counts.put(metricName, counts.get(metricName) + 1);
} else {
counts.put(metricName, 1);
}
MetricUtils.parseAndAddOpenTsdbMetric(line, chunkStore);
} catch (Exception e) {
}
});
} catch (Exception e) {
e.printStackTrace();
}
}
OffHeapVarBitMetricStoreBuildBenchmark.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:yuvi
作者:
评论列表
文章目录