@@ -156,9 +156,9 @@ await queue.EnqueueAsync(new SimpleWorkItem
156156 Assert . Equal ( 1 , metricsCollector . GetSum < long > ( "foundatio.simpleworkitem.dequeued" ) ) ;
157157 Assert . Equal ( 1 , metricsCollector . GetSum < long > ( "foundatio.simpleworkitem.completed" ) ) ;
158158
159- Assert . Equal ( 0 , metricsCollector . GetSum < long > ( "foundatio.simpleworkitem.count" ) ) ;
160- Assert . Equal ( 0 , metricsCollector . GetSum < long > ( "foundatio.simpleworkitem.working" ) ) ;
161- Assert . Equal ( 0 , metricsCollector . GetSum < long > ( "foundatio.simpleworkitem.deadletter" ) ) ;
159+ Assert . Equal ( 0 , metricsCollector . GetLast < long > ( "foundatio.simpleworkitem.count" ) ) ;
160+ Assert . Equal ( 0 , metricsCollector . GetLast < long > ( "foundatio.simpleworkitem.working" ) ) ;
161+ Assert . Equal ( 0 , metricsCollector . GetLast < long > ( "foundatio.simpleworkitem.deadletter" ) ) ;
162162 }
163163 }
164164 finally
@@ -231,7 +231,7 @@ await queue.EnqueueAsync(new SimpleWorkItem
231231 metricsCollector . RecordObservableInstruments ( ) ;
232232 Assert . Equal ( 0 , metricsCollector . GetSum < long > ( "foundatio.simpleworkitem.completed" ) ) ;
233233 Assert . Equal ( 1 , metricsCollector . GetSum < long > ( "foundatio.simpleworkitem.abandoned" ) ) ;
234- Assert . Equal ( 1 , metricsCollector . GetMax < long > ( "foundatio.simpleworkitem.count" ) ) ;
234+ Assert . Equal ( 1 , metricsCollector . GetLast < long > ( "foundatio.simpleworkitem.count" ) ) ;
235235 }
236236
237237 workItem = await queue . DequeueAsync ( TimeSpan . FromSeconds ( 10 ) ) ;
@@ -331,9 +331,9 @@ await queue.EnqueueAsync(new SimpleWorkItem
331331 Assert . Equal ( 1 , metricsCollector . GetSum < long > ( "foundatio.simpleworkitem.completed" ) ) ;
332332 Assert . Equal ( 0 , metricsCollector . GetSum < long > ( "foundatio.simpleworkitem.abandoned" ) ) ;
333333
334- Assert . Equal ( 1 , metricsCollector . GetSum < long > ( "foundatio.simpleworkitem.count" ) ) ;
335- Assert . Equal ( 0 , metricsCollector . GetSum < long > ( "foundatio.simpleworkitem.working" ) ) ;
336- Assert . Equal ( 0 , metricsCollector . GetSum < long > ( "foundatio.simpleworkitem.deadletter" ) ) ;
334+ Assert . Equal ( 1 , metricsCollector . GetLast < long > ( "foundatio.simpleworkitem.count" ) ) ;
335+ Assert . Equal ( 0 , metricsCollector . GetLast < long > ( "foundatio.simpleworkitem.working" ) ) ;
336+ Assert . Equal ( 0 , metricsCollector . GetLast < long > ( "foundatio.simpleworkitem.deadletter" ) ) ;
337337 }
338338 }
339339 finally
@@ -510,7 +510,7 @@ public virtual async Task CanDequeueEfficientlyAsync()
510510 }
511511 _logger . LogTrace ( "Finished dequeuing" ) ;
512512
513- Assert . InRange ( metricsCollector . GetAvg < double > ( "foundatio.simpleworkitem.queuetime" ) , 0 , 75 ) ;
513+ Assert . InRange ( metricsCollector . GetAvg < double > ( "foundatio.simpleworkitem.queuetime" ) , 0 , 100 ) ;
514514 }
515515 finally
516516 {
@@ -548,7 +548,7 @@ public virtual async Task CanResumeDequeueEfficientlyAsync()
548548 }
549549
550550 metricsCollector . RecordObservableInstruments ( ) ;
551- Assert . InRange ( metricsCollector . GetAvg < double > ( "foundatio.simpleworkitem.queuetime" ) , 0 , 75 ) ;
551+ Assert . InRange ( metricsCollector . GetAvg < double > ( "foundatio.simpleworkitem.queuetime" ) , 0 , 100 ) ;
552552 }
553553 finally
554554 {
@@ -578,7 +578,7 @@ await queue.EnqueueAsync(new SimpleWorkItem
578578 } ) ;
579579 }
580580 metricsCollector . RecordObservableInstruments ( ) ;
581- Assert . Equal ( workItemCount , metricsCollector . GetMax < long > ( "foundatio.simpleworkitem.count" ) ) ;
581+ Assert . Equal ( workItemCount , metricsCollector . GetLast < long > ( "foundatio.simpleworkitem.count" ) ) ;
582582 Assert . Equal ( workItemCount , ( await queue . GetQueueStatsAsync ( ) ) . Queued ) ;
583583
584584 var sw = Stopwatch . StartNew ( ) ;
@@ -1102,17 +1102,17 @@ Task Handler(object sender, CompletedEventArgs<WorkItemData> e)
11021102 Assert . InRange ( metricsCollector . GetMax < long > ( "foundatio.workitemdata.count" ) , 1 , 3 ) ;
11031103 Assert . InRange ( metricsCollector . GetMax < long > ( "foundatio.workitemdata.working" ) , 0 , 1 ) ;
11041104
1105- Assert . Equal ( 3 , metricsCollector . GetCount < long > ( "foundatio.workitemdata.simple.enqueued" ) ) ;
1106- Assert . Equal ( 3 , metricsCollector . GetCount < long > ( "foundatio.workitemdata.enqueued" ) ) ;
1105+ Assert . Equal ( 3 , metricsCollector . GetSum < long > ( "foundatio.workitemdata.simple.enqueued" ) ) ;
1106+ Assert . Equal ( 3 , metricsCollector . GetSum < long > ( "foundatio.workitemdata.enqueued" ) ) ;
11071107
1108- Assert . Equal ( 3 , metricsCollector . GetCount < long > ( "foundatio.workitemdata.simple.dequeued" ) ) ;
1109- Assert . Equal ( 3 , metricsCollector . GetCount < long > ( "foundatio.workitemdata.dequeued" ) ) ;
1108+ Assert . Equal ( 3 , metricsCollector . GetSum < long > ( "foundatio.workitemdata.simple.dequeued" ) ) ;
1109+ Assert . Equal ( 3 , metricsCollector . GetSum < long > ( "foundatio.workitemdata.dequeued" ) ) ;
11101110
1111- Assert . Equal ( 2 , metricsCollector . GetCount < long > ( "foundatio.workitemdata.simple.completed" ) ) ;
1112- Assert . Equal ( 2 , metricsCollector . GetCount < long > ( "foundatio.workitemdata.completed" ) ) ;
1111+ Assert . Equal ( 2 , metricsCollector . GetSum < long > ( "foundatio.workitemdata.simple.completed" ) ) ;
1112+ Assert . Equal ( 2 , metricsCollector . GetSum < long > ( "foundatio.workitemdata.completed" ) ) ;
11131113
1114- Assert . Equal ( 1 , metricsCollector . GetCount < long > ( "foundatio.workitemdata.simple.abandoned" ) ) ;
1115- Assert . Equal ( 1 , metricsCollector . GetCount < long > ( "foundatio.workitemdata.abandoned" ) ) ;
1114+ Assert . Equal ( 1 , metricsCollector . GetSum < long > ( "foundatio.workitemdata.simple.abandoned" ) ) ;
1115+ Assert . Equal ( 1 , metricsCollector . GetSum < long > ( "foundatio.workitemdata.abandoned" ) ) ;
11161116
11171117 var measurements = metricsCollector . GetMeasurements < double > ( "foundatio.workitemdata.simple.queuetime" ) ;
11181118 Assert . Equal ( 3 , measurements . Count ) ;
0 commit comments