Documentation ¶
Overview ¶
* This file is part of Go Responsiveness. * * Go Responsiveness is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software Foundation, * either version 2 of the License, or (at your option) any later version. * Go Responsiveness is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with Go Responsiveness. If not, see <https://www.gnu.org/licenses/>.
Index ¶
- func AllSequentialIncreasesLessThan[Data utilities.Number, Bucket utilities.Number](s WindowSeries[Data, Bucket], limit float64) (bool, bool, float64)
- func CalculateAverage[Data utilities.Number, Bucket utilities.Number](s WindowSeries[Data, Bucket]) (bool, float64)
- func Percentile[Data utilities.Number, Bucket utilities.Number](s WindowSeries[Data, Bucket], p uint) (bool, Data)
- func SeriesStandardDeviation[Data utilities.Number, Bucket utilities.Number](s WindowSeries[Data, Bucket]) (bool, float64)
- func TrimmedMean[Data utilities.Number, Bucket utilities.Number](s WindowSeries[Data, Bucket], trim int) (bool, float64, []Data)
- type NumericBucketGenerator
- type SeriesMessage
- type SeriesMessageType
- type WindowSeries
- type WindowSeriesDuration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateAverage ¶
func Percentile ¶
func SeriesStandardDeviation ¶
func TrimmedMean ¶
Types ¶
type NumericBucketGenerator ¶
type NumericBucketGenerator[T utilities.Number] struct { // contains filtered or unexported fields }
func NewNumericBucketGenerator ¶
func NewNumericBucketGenerator[T utilities.Number](initialValue T) NumericBucketGenerator[T]
func (*NumericBucketGenerator[T]) Generate ¶
func (bg *NumericBucketGenerator[T]) Generate() T
type SeriesMessage ¶
type SeriesMessage[Data any, BucketType constraints.Ordered] struct { Type SeriesMessageType Bucket BucketType Measure utilities.Optional[Data] }
type SeriesMessageType ¶
type SeriesMessageType int
const ( SeriesMessageReserve SeriesMessageType = iota SeriesMessageMeasure SeriesMessageType = iota )
type WindowSeries ¶
type WindowSeries[Data any, Bucket utilities.Number] interface { fmt.Stringer Reserve(b Bucket) error Fill(b Bucket, d Data) error Count() (some int, none int) ForEach(func(Bucket, *utilities.Optional[Data])) GetValues() []utilities.Optional[Data] Complete() bool GetType() WindowSeriesDuration ExtractBoundedSeries() WindowSeries[Data, Bucket] Append(appended *WindowSeries[Data, Bucket]) BoundedAppend(appended *WindowSeries[Data, Bucket]) GetBucketBounds() (Bucket, Bucket) SetTrimmingBucketBounds(Bucket, Bucket) ResetTrimmingBucketBounds() }
func NewWindowSeries ¶
func NewWindowSeries[Data any, Bucket utilities.Number](tipe WindowSeriesDuration, windowSize int) WindowSeries[Data, Bucket]
type WindowSeriesDuration ¶
type WindowSeriesDuration int
const ( Forever WindowSeriesDuration = iota WindowOnly WindowSeriesDuration = iota )