зеркало из https://github.com/microsoft/statsd.git
Changed test case to ensure sorting
Changed the test data in timers_multiple_times_even so make sure the metrics are sorted before getting the median value. If the data was not sorted, the median value would be 300 instead of 250.
This commit is contained in:
Родитель
5c0ce673b6
Коммит
76c13f03fa
|
@ -195,7 +195,7 @@ module.exports = {
|
|||
},
|
||||
timers_multiple_times_even: function(test) {
|
||||
test.expect(1);
|
||||
this.metrics.timers['a'] = [100, 200, 300, 400];
|
||||
this.metrics.timers['a'] = [300, 200, 400, 100];
|
||||
pm.process_metrics(this.metrics, 100, this.time_stamp, function(){});
|
||||
timer_data = this.metrics.timer_data['a'];
|
||||
test.equal(250, timer_data.median);
|
||||
|
|
Загрузка…
Ссылка в новой задаче