Skip to content

HistoricSamplingConfiguration

A PersistentSamplingConfiguration that collects data from a time window past and future relative to now.

Used by probes that read stored data, e.g. app usage or calls and texts.

Inheritance
Annotations

Constructors

HistoricSamplingConfiguration.fromJson

HistoricSamplingConfiguration.fromJson(
  1. Map<String, dynamic> json
)

HistoricSamplingConfiguration

HistoricSamplingConfiguration({
  1. Duration? past,
  2. Duration? future,
})

Constants

DEFAULT_NUMBER_OF_DAYS

int const DEFAULT_NUMBER_OF_DAYS

The default length of past and future, in days.

Properties

fromJsonFunction

Function get fromJsonFunction
override

The function which can convert a JSON string to an object of this type.

future

Duration future
getter/setter pair

How far ahead in time to collect data. Default is one day.

past

Duration past
getter/setter pair

How far back in time to collect data. Default is one day.

Methods

toJson

Map<String, dynamic> toJson()
override

Return a JSON encoding of this object.