getMetric

fun <P : TimestampedEntity, T> getMetric(score: Metric<P, T>, from: Long = Instant.now().minus(60, ChronoUnit.DAYS).toEpochMilli(), to: Long = Instant.now().toEpochMilli(), refresh: Boolean = false): Flow<TimeSeries<T>>

Get a QA metric or trend relative to the device in use. Check the the list of available metrics from Metric and Trend. The function returns an object of type TimeSeries which contains timestamps and values of the requested metric. The call is asynchronous ans returns a flow.

Return

A flow wrapping a TimeSeries

Parameters

score

Object of type Metric indicating which metric to retrieve

from

first Timestamp (in ms) to included in the returned metric TimeSeries

to

last Timestamp (in ms) to included in the returned metric TimeSeries