private Measurement createMeasurement(TPStatsInfo tpStatsInfo) { final Map<String, String> tags = new HashMap<>(1); tags.put("host", globalConfiguration.hostname); tags.put("systemName", globalConfiguration.systemName); final Map<String, String> fields = new HashMap<>(5); fields.put("activeTasks", Long.toString(tpStatsInfo.activeTasks)); fields.put("pendingTasks", Long.toString(tpStatsInfo.pendingTasks)); fields.put("completedTasks", Long.toString(tpStatsInfo.completedTasks)); fields.put("currentlyBlockedTasks", Long.toString(tpStatsInfo.currentlyBlockedTasks)); fields.put("totalBlockedTasks", Long.toString(tpStatsInfo.totalBlockedTasks)); return Measurement.createComplex(tpStatsInfo.threadPool, System.currentTimeMillis(), TimeUnit.MILLISECONDS, tags, fields); }
private Measurement createMeasurement(CompactionSettingsInfo compactionSettingsInfo) { final Map<String, String> tags = new HashMap<>(4); tags.put("host", globalConfiguration.hostname); tags.put("systemName", globalConfiguration.systemName); final Map<String, String> fields = new HashMap<>(5); fields.put("compactionThroughput", Integer.toString(compactionSettingsInfo.compactionThroughput)); fields.put("coreCompactorThreads", Integer.toString(compactionSettingsInfo.coreCompactorThreads)); fields.put("maximumCompactorThreads", Integer.toString(compactionSettingsInfo.maximumCompactorThreads)); fields.put("coreValidatorThreads", Integer.toString(compactionSettingsInfo.coreValidatorThreads)); fields.put("maximumValidatorThreads", Integer.toString(compactionSettingsInfo.maximumValidatorThreads)); return Measurement.createComplex(DEFAULT_COMPACTION_SETTINGS_INFO_MEASUREMENT_NAME, System.currentTimeMillis(), TimeUnit.MILLISECONDS, tags, fields); }
private Measurement createMeasurement(CompactionInfo compactionInfo) { final Map<String, String> tags = new HashMap<>(4); tags.put("host", globalConfiguration.hostname); tags.put("systemName", globalConfiguration.systemName); tags.put("keyspace", compactionInfo.keyspace); tags.put("columnfamily", compactionInfo.columnFamily); tags.put("taskType", compactionInfo.taskType); final Map<String, String> fields = new HashMap<>(5); fields.put("compactionId", compactionInfo.compactionId); fields.put("unit", compactionInfo.unit); fields.put("total", Long.toString(compactionInfo.total)); fields.put("completed", Long.toString(compactionInfo.completed)); fields.put("completedPercentage", Double.toString(compactionInfo.completedPercentage)); return Measurement.createComplex(DEFAULT_COMPACTION_INFO_MEASUREMENT_NAME, System.currentTimeMillis(), TimeUnit.MILLISECONDS, tags, fields); }
private Measurement createMeasurement(NodeInfo nodeInfo) { final Map<String, String> tags = new HashMap<>(1); tags.put("host", globalConfiguration.hostname); tags.put("systemName", globalConfiguration.systemName); final Map<String, String> fields = new HashMap<>(5); fields.put("gossipActive", Integer.toString(nodeInfo.isGossipActive())); fields.put("thriftActive", Integer.toString(nodeInfo.isThriftActive())); fields.put("nativeTransportActive", Integer.toString(nodeInfo.isNativeTransportActive())); fields.put("uptimeInSeconds", Long.toString(nodeInfo.uptimeInSeconds)); fields.put("exceptionCount", Integer.toString(nodeInfo.exceptionCount)); return Measurement.createComplex(DEFAULT_NODE_INFO_MEASUREMENT_NAME, System.currentTimeMillis(), TimeUnit.MILLISECONDS, tags, fields); }
private Measurement createMeasurement(Histogram histogram) { final Map<String, String> tags = new HashMap<>(); tags.put("host", globalConfiguration.hostname); tags.put("systemName", globalConfiguration.systemName); final Map<String, String> fields = new HashMap<>(); fields.put(P90_0.name, String.valueOf(histogram.getValueAtPercentile(P90_0.percentage) / NANOS_IN_MILLIS)); fields.put(P95_0.name, String.valueOf(histogram.getValueAtPercentile(P95_0.percentage) / NANOS_IN_MILLIS)); fields.put(P99_0.name, String.valueOf(histogram.getValueAtPercentile(P99_0.percentage) / NANOS_IN_MILLIS)); fields.put(P99_9.name, String.valueOf(histogram.getValueAtPercentile(P99_9.percentage) / NANOS_IN_MILLIS)); fields.put(P99_99.name, String.valueOf(histogram.getValueAtPercentile(P99_99.percentage) / NANOS_IN_MILLIS)); fields.put(P99_999.name, String.valueOf(histogram.getValueAtPercentile(P99_999.percentage) / NANOS_IN_MILLIS)); fields.put(P100.name, String.valueOf(histogram.getValueAtPercentile(P100.percentage) / NANOS_IN_MILLIS)); return Measurement.createComplex(service, System.currentTimeMillis(), TimeUnit.MILLISECONDS, tags, fields); }