compute
¤
Bucket
dataclass
¤
Bucket(
timestamp: NanosecondsUTC,
min: float,
max: float,
mean: float,
variance: float,
count: int,
)
Time-bucketed data for a numeric series within Nominal
batch_compute_buckets
¤
batch_compute_buckets(
client: NominalClient,
exprs: Iterable[NumericExpr],
start: NanosecondsUTC,
end: NanosecondsUTC,
buckets: int = 1000,
) -> Sequence[Sequence[Bucket]]
Computed bucketed summaries for a batch of numeric expressions
Parameters:
-
(client¤NominalClient) –Nominal client to make requests with
-
(exprs¤Iterable[NumericExpr]) –Expressions to compute buckets for
-
(start¤NanosecondsUTC) –Starting timestamp to summarize data from
-
(end¤NanosecondsUTC) –Ending timestamp to summarize data until
-
(buckets¤int, default:1000) –Number of buckets to return per expression
Returns:
-
Sequence[Sequence[Bucket]]–A Sequence of sequences of buckets. The top level sequence corresponds to the input expressions, whereas the
-
Sequence[Sequence[Bucket]]–inner sequences correspond to the individual buckets for each input expression. The order of buckets returned
-
Sequence[Sequence[Bucket]]–matches the order of expressions provided.
-
NOTE(Sequence[Sequence[Bucket]]) –it is not a safe guarantee that the number of buckets returned is the same as the number requested
compute_buckets
¤
compute_buckets(
client: NominalClient,
expr: NumericExpr,
start: NanosecondsUTC,
end: NanosecondsUTC,
buckets: int = 1000,
) -> Sequence[Bucket]
Compute a bucketed summary of the requested expression.
Parameters:
-
(client¤NominalClient) –Nominal client to make requests with
-
(expr¤NumericExpr) –Expression to compute buckets for
-
(start¤NanosecondsUTC) –Starting timestamp to summarize data from
-
(end¤NanosecondsUTC) –Ending timestamp to summarize data until
-
(buckets¤int, default:1000) –Number of buckets to return
Returns: