btrdb.point#
Module for Point classes
- class btrdb.point.RawPoint(time, value)#
A point of data representing a single position within a time series. Each point contains a read-only time and value attribute.
- Parameters:
time (int) – The time portion of a single value in the time series in nanoseconds since the Unix epoch.
value (float) – The value of a time series at a single point in time.
- Attributes:
Methods
from_proto
from_proto_list
to_proto
to_proto_list
- property time#
The time portion of a data point in nanoseconds since the Unix epoch.
- property value#
The value portion of a data point as a float object.
- class btrdb.point.StatPoint(time, minv, meanv, maxv, count, stddev)#
An aggregated data point representing a summary or rollup of one or more points of data within a single time series.
This aggregation point provides for the min, mean, max, count, and standard deviation of all data values it spans. It is returned by windowing queries such as windows or aligned_windows.
- Parameters:
time (int) – The start time of the window which spans the aggregated values. Represented in nanoseconds since the Unix epoch.
min (float) – The minimum value in a time series within a specified range of time.
mean (float) – The mean value in a time series within a specified range of time.
max (float) – The maximum value in a time series within a specified range of time.
count (float) – The number of values in a time series within a specified range of time.
stddev (float) – The standard deviation of values in a time series within a specified range of time.
Notes
This object may also be treated as a tuple by referencing the values according to position.
// returns time val = point[0] // returns standard deviation val = point[5]
- Attributes:
count
The number of values within the time series for a range of time
max
The maximum value of the time series within a range of time
mean
The mean value of the time series within a range of time
min
The minimum value of the time series within a range of time
stddev
The standard deviation of the values of a time series within a range of time
time
The starting time of the time series within the stat point
Methods
from_proto
from_proto_list
- property count#
The number of values within the time series for a range of time
- property max#
The maximum value of the time series within a range of time
- property mean#
The mean value of the time series within a range of time
- property min#
The minimum value of the time series within a range of time
- property stddev#
The standard deviation of the values of a time series within a range of time
- property time#
The starting time of the time series within the stat point