You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/09/04 12:07:35 UTC

[GitHub] [pulsar] asafm commented on a diff in pull request #17041: [monitoring][broker][metadata] add metadata store metrics

asafm commented on code in PR #17041:
URL: https://github.com/apache/pulsar/pull/17041#discussion_r962302834


##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/stats/PrometheusMetricsTest.java:
##########
@@ -1557,49 +1557,40 @@ public void testMetadataStoreStats() throws Exception {
         String metricsStr = output.toString();
         Multimap<String, Metric> metricsMap = parseMetrics(metricsStr);
 
-        Collection<Metric> getOpsFailed = metricsMap.get("pulsar_metadata_store_get_failed" + "_total");
-        Collection<Metric> delOpsFailed = metricsMap.get("pulsar_metadata_store_del_failed" + "_total");
-        Collection<Metric> putOpsFailed = metricsMap.get("pulsar_metadata_store_put_failed" + "_total");
-
-        Collection<Metric> getOpsLatency = metricsMap.get("pulsar_metadata_store_get_latency_ms" + "_sum");
-        Collection<Metric> delOpsLatency = metricsMap.get("pulsar_metadata_store_del_latency_ms" + "_sum");
-        Collection<Metric> putOpsLatency = metricsMap.get("pulsar_metadata_store_put_latency_ms" + "_sum");
-
+        Collection<Metric> opsFailed = metricsMap.get("pulsar_metadata_store_ops_failed" + "_total");
+        Collection<Metric> opsLatency = metricsMap.get("pulsar_metadata_store_ops_latency_ms" + "_sum");
         Collection<Metric> putBytes = metricsMap.get("pulsar_metadata_store_put_bytes" + "_total");
 
-        Assert.assertTrue(getOpsFailed.size() > 1);
-        Assert.assertTrue(delOpsFailed.size() > 1);
-        Assert.assertTrue(putOpsFailed.size() > 1);
-        Assert.assertTrue(getOpsLatency.size() > 1);
-        Assert.assertTrue(delOpsLatency.size() > 1);
-        Assert.assertTrue(putOpsLatency.size() > 1);
+        Assert.assertTrue(opsFailed.size() > 1);

Review Comment:
   I don't understand. You can introduce new dependency if you want, no?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org