| Index: pkg/analysis_server/lib/src/utilities/average.dart
|
| diff --git a/pkg/analysis_server/lib/src/utilities/average.dart b/pkg/analysis_server/lib/src/utilities/average.dart
|
| deleted file mode 100644
|
| index 22cf299b55beb03bd26cfaa92212dcb28c54bfa5..0000000000000000000000000000000000000000
|
| --- a/pkg/analysis_server/lib/src/utilities/average.dart
|
| +++ /dev/null
|
| @@ -1,28 +0,0 @@
|
| -// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
|
| -// for details. All rights reserved. Use of this source code is governed by a
|
| -// BSD-style license that can be found in the LICENSE file.
|
| -
|
| -/// Simple rolling average sample counter.
|
| -class Average {
|
| - num _val;
|
| - final int _sampleCount;
|
| -
|
| - /// Create an average with the given (optional) sample count size.
|
| - Average([this._sampleCount = 20]);
|
| -
|
| - /// The current average.
|
| - num get value => _val ?? 0;
|
| -
|
| - /// Add the given [sample].
|
| - void addSample(num sample) {
|
| - if (_val == null) {
|
| - _val = sample;
|
| - } else {
|
| - _val = _val * ((_sampleCount - 1) / _sampleCount) +
|
| - sample * (1 / _sampleCount);
|
| - }
|
| - }
|
| -
|
| - @override
|
| - String toString() => 'average: $value';
|
| -}
|
|
|