Skip to content

Commit

Permalink
remove items not supported by scylladb
Browse files Browse the repository at this point in the history
Change-Id: Ia162ab02b217ba53130916bdd28b9dfed8bf425f
  • Loading branch information
javeme committed May 29, 2021
1 parent 22814d7 commit fb9e54c
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@ protected void appendExtraMetrics(Map<String, Object> metrics,
"DroppedMutations");
appendCounterMetrics(metrics, probe, this.keyspace(), this.tables(),
"PendingFlushes");
appendCounterMetrics(metrics, probe, this.keyspace(), this.tables(),
"KeyCacheHitRate");
//appendCounterMetrics(metrics, probe, this.keyspace(), this.tables(),
// "KeyCacheHitRate");
appendCounterMetrics(metrics, probe, this.keyspace(), this.tables(),
"BloomFilterFalseRatio");

System.out.println(">>>> probe WriteLatency");
//Table timer Metrics
appendTimerMetrics(metrics, probe, this.keyspace(), "WriteLatency");
appendTimerMetrics(metrics, probe, this.keyspace(), "ReadLatency");
appendTimerMetrics(metrics, probe, null, "WriteLatency");
appendTimerMetrics(metrics, probe, null, "ReadLatency");
//appendTimerMetrics(metrics, probe, this.keyspace(), "WriteLatency");
//appendTimerMetrics(metrics, probe, this.keyspace(), "ReadLatency");
//appendTimerMetrics(metrics, probe, null, "WriteLatency");
//appendTimerMetrics(metrics, probe, null, "ReadLatency");

System.out.println(">>>> probe Cache");
// Cache Metrics
Expand All @@ -70,9 +70,9 @@ protected void appendExtraMetrics(Map<String, Object> metrics,
// Compaction Metrics
appendCompactionMetrics(metrics, probe, "CompletedTasks");
appendCompactionMetrics(metrics, probe, "PendingTasks");
appendCompactionMetrics(metrics, probe, "BytesCompacted");
//appendCompactionMetrics(metrics, probe, "BytesCompacted");

System.out.println(">>>> probe Nodes");
metrics.remove("write_latency_*");
metrics.remove(MEM_UNIT);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ public void testMetricsBackend() {
assertMapContains(host, "estimate_num_keys");
break;
case "cassandra":
case "scylladb":
assertMapContains(graph, "cluster_id");
assertMapContains(graph, "servers");

Expand Down Expand Up @@ -157,6 +156,68 @@ public void testMetricsBackend() {
assertMapContains(host, "exception_count");
}
break;
case "scylladb":
assertMapContains(graph, "cluster_id");
assertMapContains(graph, "servers");

servers = (Map<?, ?>) graph.get("servers");
Assert.assertGte(1, servers.size());
for (Map.Entry<?, ?> e : servers.entrySet()) {
String key = (String) e.getKey();
value = e.getValue();
Assert.assertTrue(String.format(
"Expect map value for key %s but got %s",
key, value),
value instanceof Map);
host = (Map<?, ?>) value;
assertMapContains(host, "mem_max");
assertMapContains(host, "mem_commited");
assertMapContains(host, "mem_used");
assertMapContains(host, "mem_used_readable");
assertMapContains(host, "mem_unit");

assertMapContains(host, "disk_usage");
assertMapContains(host, "disk_usage_readable");
assertMapContains(host, "disk_usage_details");
assertMapContains(host, "disk_unit");

assertMapContains(host, "uptime");
assertMapContains(host, "uptime_readable");
assertMapContains(host, "time_unit");

assertMapContains(host, "estimated_partition_count");
assertMapContains(host, "dropped_mutations");
assertMapContains(host, "pending_flushes");
//assertMapContains(host, "key_cache_hit_rate");
assertMapContains(host, "bloom_filter_false_ratio");

//assertMapContains(host, "write_latency_hugegraph");
//assertMapContains(host, "read_latency_hugegraph");
//assertMapContains(host, "write_latency_*");
//assertMapContains(host, "read_latency_*");

assertMapContains(host, "key_cache_size");
assertMapContains(host, "key_cache_entries");
assertMapContains(host, "row_cache_size");
assertMapContains(host, "row_cache_entries");
assertMapContains(host, "counter_cache_size");
assertMapContains(host, "counter_cache_entries");

assertMapContains(host, "compaction_completed_tasks");
assertMapContains(host, "compaction_pending_tasks");
//assertMapContains(host, "compaction_bytes_compacted");

assertMapContains(host, "live_nodes");
assertMapContains(host, "joining_nodes");
assertMapContains(host, "moving_nodes");
assertMapContains(host, "leaving_nodes");
assertMapContains(host, "unreachable_nodes");

assertMapContains(host, "keyspaces");
assertMapContains(host, "num_tables");
assertMapContains(host, "exception_count");
}
break;
case "hbase":
assertMapContains(graph, "cluster_id");
assertMapContains(graph, "master_name");
Expand Down

0 comments on commit fb9e54c

Please sign in to comment.