@@ -68,6 +68,39 @@ public void smokeTest() {
68
68
assertEquals ("Path" , threadPoolMetric .getLabelValues ().get (0 ));
69
69
assertEquals ("ThreadPoolName" , threadPoolMetric .getLabelValues ().get (1 ));
70
70
71
+ // DSE TPC ThreadPool Metrics have dash or slash in the pool_name
72
+ CassandraMetricDefinition tpcThreadPoolMetric =
73
+ parser .parseDropwizardMetric (
74
+ "org.apache.cassandra.metrics.ThreadPools.MetricName.Path.Thread-Pool-Name" ,
75
+ "" ,
76
+ Lists .newArrayList (),
77
+ Lists .newArrayList ());
78
+ assertEquals (
79
+ "org_apache_cassandra_metrics_thread_pools_metric_name" ,
80
+ tpcThreadPoolMetric .getMetricName ());
81
+ assertEquals (2 , tpcThreadPoolMetric .getLabelNames ().size ());
82
+ assertEquals (2 , tpcThreadPoolMetric .getLabelValues ().size ());
83
+ assertEquals ("pool_type" , tpcThreadPoolMetric .getLabelNames ().get (0 ));
84
+ assertEquals ("pool_name" , tpcThreadPoolMetric .getLabelNames ().get (1 ));
85
+ assertEquals ("Path" , tpcThreadPoolMetric .getLabelValues ().get (0 ));
86
+ assertEquals ("Thread-Pool-Name" , tpcThreadPoolMetric .getLabelValues ().get (1 ));
87
+
88
+ CassandraMetricDefinition tpcThreadPoolMetricSlash =
89
+ parser .parseDropwizardMetric (
90
+ "org.apache.cassandra.metrics.ThreadPools.MetricName.Path.Thread/Pool/Name" ,
91
+ "" ,
92
+ Lists .newArrayList (),
93
+ Lists .newArrayList ());
94
+ assertEquals (
95
+ "org_apache_cassandra_metrics_thread_pools_metric_name" ,
96
+ tpcThreadPoolMetricSlash .getMetricName ());
97
+ assertEquals (2 , tpcThreadPoolMetricSlash .getLabelNames ().size ());
98
+ assertEquals (2 , tpcThreadPoolMetricSlash .getLabelValues ().size ());
99
+ assertEquals ("pool_type" , tpcThreadPoolMetricSlash .getLabelNames ().get (0 ));
100
+ assertEquals ("pool_name" , tpcThreadPoolMetricSlash .getLabelNames ().get (1 ));
101
+ assertEquals ("Path" , tpcThreadPoolMetricSlash .getLabelValues ().get (0 ));
102
+ assertEquals ("Thread/Pool/Name" , tpcThreadPoolMetricSlash .getLabelValues ().get (1 ));
103
+
71
104
// Client Request Metrics
72
105
CassandraMetricDefinition clientRequestMetric =
73
106
parser .parseDropwizardMetric (
0 commit comments