@@ -57,124 +57,6 @@ public MetricsVerifier add(String metricName, Consumer<MetricAssert> assertion)
5757 return this ;
5858 }
5959
60- // TODO: can now be inlined
61- @ CanIgnoreReturnValue
62- public MetricsVerifier assertGauge (String metricName , String description , String unit ) {
63- return add (
64- metricName ,
65- metric ->
66- metric
67- .hasDescription (description )
68- .hasUnit (unit )
69- .isGauge ()
70- .hasDataPointsWithoutAttributes ());
71- }
72-
73- @ CanIgnoreReturnValue
74- public MetricsVerifier assertTypedGauge (
75- String metricName , String description , String unit , List <String > types ) {
76- return add (
77- metricName ,
78- metric ->
79- metric .hasDescription (description ).hasUnit (unit ).isGauge ().hasTypedDataPoints (types ));
80- }
81-
82- // TODO: can now be inlined
83- @ CanIgnoreReturnValue
84- public MetricsVerifier assertCounter (String metricName , String description , String unit ) {
85- return add (
86- metricName ,
87- metric ->
88- metric
89- .hasDescription (description )
90- .hasUnit (unit )
91- .isCounter ()
92- .hasDataPointsWithoutAttributes ());
93- }
94-
95- // TODO: can now be inlined
96- @ CanIgnoreReturnValue
97- public MetricsVerifier assertUpDownCounter (String metricName , String description , String unit ) {
98- return add (
99- metricName ,
100- metric ->
101- metric
102- .hasDescription (description )
103- .hasUnit (unit )
104- .isUpDownCounter ()
105- .hasDataPointsWithoutAttributes ());
106- }
107-
108- // TODO: can now be inlined
109- @ SafeVarargs
110- @ CanIgnoreReturnValue
111- public final MetricsVerifier assertGaugeWithAttributes ( // only used in activemq
112- String metricName , String description , String unit , Map .Entry <String , String >... attributes ) {
113- return add (
114- metricName ,
115- metric ->
116- metric
117- .hasDescription (description )
118- .hasUnit (unit )
119- .isGauge ()
120- .hasDataPointsAttributes (attributes ));
121- }
122-
123- // TODO: can now be inlined
124- @ SafeVarargs
125- @ CanIgnoreReturnValue
126- public final MetricsVerifier assertCounterWithAttributes (
127- String metricName , String description , String unit , Map <String , String >... attributeSets ) {
128- return add (
129- metricName ,
130- metric ->
131- metric
132- .hasDescription (description )
133- .hasUnit (unit )
134- .isCounter ()
135- .hasDataPointsAttributes (attributeSets ));
136- }
137-
138- // TODO: can now be inlined
139- @ SafeVarargs
140- @ CanIgnoreReturnValue
141- public final MetricsVerifier assertCounterWithAttributes (
142- String metricName , String description , String unit , Map .Entry <String , String >... attributes ) {
143- return add (
144- metricName ,
145- metric ->
146- metric
147- .hasDescription (description )
148- .hasUnit (unit )
149- .isCounter ()
150- .hasDataPointsAttributes (attributes ));
151- }
152-
153- // TODO: can now be inlined
154- @ SafeVarargs
155- @ CanIgnoreReturnValue
156- public final MetricsVerifier assertUpDownCounterWithAttributes (
157- String metricName , String description , String unit , Map .Entry <String , String >... attributes ) {
158- return add (
159- metricName ,
160- metric ->
161- metric
162- .hasDescription (description )
163- .hasUnit (unit )
164- .isUpDownCounter ()
165- .hasDataPointsAttributes (attributes ));
166- }
167-
168- // TODO: can now be inlined
169- @ CanIgnoreReturnValue
170- public MetricsVerifier assertTypedCounter (
171- String metricName , String description , String unit , List <String > types ) {
172- return add (
173- metricName ,
174- metric ->
175- metric .hasDescription (description ).hasUnit (unit ).isCounter ().hasTypedDataPoints (types ));
176- }
177-
17860 public void verify (List <Metric > metrics ) {
17961 verifyAllExpectedMetricsWereReceived (metrics );
18062
0 commit comments