@@ -93,7 +93,7 @@ public async Task Metrics_Success()
93
93
await syncPoint . WaitForSyncPoint ( ) . DefaultTimeout ( ) ;
94
94
95
95
Assert . Collection ( currentLeaseRequestsRecorder . GetMeasurements ( ) ,
96
- m => AssertCounter ( m , 1 , null , null , null ) ) ;
96
+ m => AssertCounter ( m , 1 , null ) ) ;
97
97
Assert . Empty ( leaseRequestDurationRecorder . GetMeasurements ( ) ) ;
98
98
99
99
syncPoint . Continue ( ) ;
@@ -104,10 +104,10 @@ public async Task Metrics_Success()
104
104
Assert . Equal ( StatusCodes . Status200OK , context . Response . StatusCode ) ;
105
105
106
106
Assert . Collection ( currentLeaseRequestsRecorder . GetMeasurements ( ) ,
107
- m => AssertCounter ( m , 1 , null , null , null ) ,
108
- m => AssertCounter ( m , - 1 , null , null , null ) ) ;
107
+ m => AssertCounter ( m , 1 , null ) ,
108
+ m => AssertCounter ( m , - 1 , null ) ) ;
109
109
Assert . Collection ( leaseRequestDurationRecorder . GetMeasurements ( ) ,
110
- m => AssertDuration ( m , null , null , null ) ) ;
110
+ m => AssertDuration ( m , null ) ) ;
111
111
Assert . Empty ( currentRequestsQueuedRecorder . GetMeasurements ( ) ) ;
112
112
Assert . Empty ( queuedRequestDurationRecorder . GetMeasurements ( ) ) ;
113
113
Assert . Empty ( leaseFailedRequestsRecorder . GetMeasurements ( ) ) ;
@@ -156,7 +156,7 @@ public async Task Metrics_ListenInMiddleOfRequest_CurrentLeasesNotDecreased()
156
156
157
157
Assert . Empty ( currentLeaseRequestsRecorder . GetMeasurements ( ) ) ;
158
158
Assert . Collection ( leaseRequestDurationRecorder . GetMeasurements ( ) ,
159
- m => AssertDuration ( m , null , null , null ) ) ;
159
+ m => AssertDuration ( m , null ) ) ;
160
160
}
161
161
162
162
[ Fact ]
@@ -214,7 +214,7 @@ public async Task Metrics_Queued()
214
214
215
215
// Assert second request is queued.
216
216
Assert . Collection ( currentRequestsQueuedRecorder . GetMeasurements ( ) ,
217
- m => AssertCounter ( m , 1 , "GET" , "/" , " concurrencyPolicy") ) ;
217
+ m => AssertCounter ( m , 1 , "concurrencyPolicy" ) ) ;
218
218
Assert . Empty ( queuedRequestDurationRecorder . GetMeasurements ( ) ) ;
219
219
220
220
// Allow both requests to finish.
@@ -224,10 +224,10 @@ public async Task Metrics_Queued()
224
224
await middlewareTask2 . DefaultTimeout ( ) ;
225
225
226
226
Assert . Collection ( currentRequestsQueuedRecorder . GetMeasurements ( ) ,
227
- m => AssertCounter ( m , 1 , "GET" , "/" , " concurrencyPolicy") ,
228
- m => AssertCounter ( m , - 1 , "GET" , "/" , " concurrencyPolicy") ) ;
227
+ m => AssertCounter ( m , 1 , "concurrencyPolicy" ) ,
228
+ m => AssertCounter ( m , - 1 , "concurrencyPolicy" ) ) ;
229
229
Assert . Collection ( queuedRequestDurationRecorder . GetMeasurements ( ) ,
230
- m => AssertDuration ( m , "GET" , "/" , " concurrencyPolicy") ) ;
230
+ m => AssertDuration ( m , "concurrencyPolicy" ) ) ;
231
231
}
232
232
233
233
[ Fact ]
@@ -296,22 +296,18 @@ public async Task Metrics_ListenInMiddleOfQueued_CurrentQueueNotDecreased()
296
296
297
297
Assert . Empty ( currentRequestsQueuedRecorder . GetMeasurements ( ) ) ;
298
298
Assert . Collection ( queuedRequestDurationRecorder . GetMeasurements ( ) ,
299
- m => AssertDuration ( m , "GET" , "/" , " concurrencyPolicy") ) ;
299
+ m => AssertDuration ( m , "concurrencyPolicy" ) ) ;
300
300
}
301
301
302
- private static void AssertCounter ( Measurement < long > measurement , long value , string method , string route , string policy )
302
+ private static void AssertCounter ( Measurement < long > measurement , long value , string policy )
303
303
{
304
304
Assert . Equal ( value , measurement . Value ) ;
305
- AssertTag ( measurement . Tags , "method" , method ) ;
306
- AssertTag ( measurement . Tags , "route" , route ) ;
307
305
AssertTag ( measurement . Tags , "policy" , policy ) ;
308
306
}
309
307
310
- private static void AssertDuration ( Measurement < double > measurement , string method , string route , string policy )
308
+ private static void AssertDuration ( Measurement < double > measurement , string policy )
311
309
{
312
310
Assert . True ( measurement . Value > 0 ) ;
313
- AssertTag ( measurement . Tags , "method" , method ) ;
314
- AssertTag ( measurement . Tags , "route" , route ) ;
315
311
AssertTag ( measurement . Tags , "policy" , policy ) ;
316
312
}
317
313
0 commit comments