Documentation ¶
Index ¶
- Constants
- type HistoryMetric
- func (m *HistoryMetric) AppendValue(metric TimestampMetric) (int, bool)
- func (m *HistoryMetric) Capacity() int
- func (m *HistoryMetric) Empty() bool
- func (m *HistoryMetric) GetMaxValueInRangeTime(start, end time.Time) (float64, error)
- func (m *HistoryMetric) Len() int
- func (m *HistoryMetric) SetMaxSize(size int) bool
- func (m *HistoryMetric) String() (s string)
- func (m *HistoryMetric) SubHistoryMetricInRangeTime(start, end time.Time) (subMetric HistoryMetric)
- type TimestampMetric
Constants ¶
View Source
const (
INT_MAX = int(^uint(0) >> 1)
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HistoryMetric ¶
type HistoryMetric struct { Timestamps []time.Time // time from early to late Values []float64 // contains filtered or unexported fields }
func NewHistoryMetric ¶
func NewHistoryMetric() HistoryMetric
func (*HistoryMetric) AppendValue ¶
func (m *HistoryMetric) AppendValue(metric TimestampMetric) (int, bool)
func (*HistoryMetric) Capacity ¶
func (m *HistoryMetric) Capacity() int
func (*HistoryMetric) Empty ¶
func (m *HistoryMetric) Empty() bool
func (*HistoryMetric) GetMaxValueInRangeTime ¶
func (m *HistoryMetric) GetMaxValueInRangeTime(start, end time.Time) (float64, error)
Get max value from specific time
func (*HistoryMetric) Len ¶
func (m *HistoryMetric) Len() int
func (*HistoryMetric) SetMaxSize ¶
func (m *HistoryMetric) SetMaxSize(size int) bool
func (*HistoryMetric) String ¶
func (m *HistoryMetric) String() (s string)
func (*HistoryMetric) SubHistoryMetricInRangeTime ¶
func (m *HistoryMetric) SubHistoryMetricInRangeTime(start, end time.Time) (subMetric HistoryMetric)
get sub history metric
type TimestampMetric ¶
Click to show internal directories.
Click to hide internal directories.