MetricsBatch
extends Message
in package
Generated from protobuf message <code>livekit.MetricsBatch</code>
Table of Contents
Properties
- $normalized_timestamp : mixed
- Generated from protobuf field <code>.google.protobuf.Timestamp normalized_timestamp = 2;</code>
- $timestamp_ms : mixed
- time at which this batch is sent based on a monotonic clock (millisecond resolution)
- $events : mixed
- Generated from protobuf field <code>repeated .livekit.EventMetric events = 5;</code>
- $str_data : mixed
- To avoid repeating string values, we store them in a separate list and reference them by index This is useful for storing participant identities, track names, etc.
- $time_series : mixed
- Generated from protobuf field <code>repeated .livekit.TimeSeriesMetric time_series = 4;</code>
Methods
- __construct() : mixed
- Constructor.
- clearNormalizedTimestamp() : mixed
- getEvents() : RepeatedField<string|int, EventMetric>
- Generated from protobuf field <code>repeated .livekit.EventMetric events = 5;</code>
- getNormalizedTimestamp() : Timestamp|null
- Generated from protobuf field <code>.google.protobuf.Timestamp normalized_timestamp = 2;</code>
- getStrData() : RepeatedField<string|int, string>
- To avoid repeating string values, we store them in a separate list and reference them by index This is useful for storing participant identities, track names, etc.
- getTimeSeries() : RepeatedField<string|int, TimeSeriesMetric>
- Generated from protobuf field <code>repeated .livekit.TimeSeriesMetric time_series = 4;</code>
- getTimestampMs() : int|string
- time at which this batch is sent based on a monotonic clock (millisecond resolution)
- hasNormalizedTimestamp() : mixed
- setEvents() : $this
- Generated from protobuf field <code>repeated .livekit.EventMetric events = 5;</code>
- setNormalizedTimestamp() : $this
- Generated from protobuf field <code>.google.protobuf.Timestamp normalized_timestamp = 2;</code>
- setStrData() : $this
- To avoid repeating string values, we store them in a separate list and reference them by index This is useful for storing participant identities, track names, etc.
- setTimeSeries() : $this
- Generated from protobuf field <code>repeated .livekit.TimeSeriesMetric time_series = 4;</code>
- setTimestampMs() : $this
- time at which this batch is sent based on a monotonic clock (millisecond resolution)
Properties
$normalized_timestamp
Generated from protobuf field <code>.google.protobuf.Timestamp normalized_timestamp = 2;</code>
protected
mixed
$normalized_timestamp
= null
$timestamp_ms
time at which this batch is sent based on a monotonic clock (millisecond resolution)
protected
mixed
$timestamp_ms
= 0
Generated from protobuf field int64 timestamp_ms = 1;
$events
Generated from protobuf field <code>repeated .livekit.EventMetric events = 5;</code>
private
mixed
$events
$str_data
To avoid repeating string values, we store them in a separate list and reference them by index This is useful for storing participant identities, track names, etc.
private
mixed
$str_data
There is also a predefined list of labels that can be used to reference common metrics. They have reserved indices from 0 to (METRIC_LABEL_PREDEFINED_MAX_VALUE - 1). Indexes pointing at str_data should start from METRIC_LABEL_PREDEFINED_MAX_VALUE, such that str_data[0] == index of METRIC_LABEL_PREDEFINED_MAX_VALUE.
Generated from protobuf field repeated string str_data = 3;
$time_series
Generated from protobuf field <code>repeated .livekit.TimeSeriesMetric time_series = 4;</code>
private
mixed
$time_series
Methods
__construct()
Constructor.
public
__construct([array<string|int, mixed> $data = null ]) : mixed
Parameters
- $data : array<string|int, mixed> = null
-
{ Optional. Data for populating the Message object.
@type int|string $timestamp_ms time at which this batch is sent based on a monotonic clock (millisecond resolution) @type \Google\Protobuf\Timestamp $normalized_timestamp @type string[] $str_data To avoid repeating string values, we store them in a separate list and reference them by index This is useful for storing participant identities, track names, etc. There is also a predefined list of labels that can be used to reference common metrics. They have reserved indices from 0 to (METRIC_LABEL_PREDEFINED_MAX_VALUE - 1). Indexes pointing at str_data should start from METRIC_LABEL_PREDEFINED_MAX_VALUE, such that str_data[0] == index of METRIC_LABEL_PREDEFINED_MAX_VALUE. @type \Livekit\TimeSeriesMetric[] $time_series @type \Livekit\EventMetric[] $events}
clearNormalizedTimestamp()
public
clearNormalizedTimestamp() : mixed
getEvents()
Generated from protobuf field <code>repeated .livekit.EventMetric events = 5;</code>
public
getEvents() : RepeatedField<string|int, EventMetric>
Return values
RepeatedField<string|int, EventMetric>getNormalizedTimestamp()
Generated from protobuf field <code>.google.protobuf.Timestamp normalized_timestamp = 2;</code>
public
getNormalizedTimestamp() : Timestamp|null
Return values
Timestamp|nullgetStrData()
To avoid repeating string values, we store them in a separate list and reference them by index This is useful for storing participant identities, track names, etc.
public
getStrData() : RepeatedField<string|int, string>
There is also a predefined list of labels that can be used to reference common metrics. They have reserved indices from 0 to (METRIC_LABEL_PREDEFINED_MAX_VALUE - 1). Indexes pointing at str_data should start from METRIC_LABEL_PREDEFINED_MAX_VALUE, such that str_data[0] == index of METRIC_LABEL_PREDEFINED_MAX_VALUE.
Generated from protobuf field repeated string str_data = 3;
Return values
RepeatedField<string|int, string>getTimeSeries()
Generated from protobuf field <code>repeated .livekit.TimeSeriesMetric time_series = 4;</code>
public
getTimeSeries() : RepeatedField<string|int, TimeSeriesMetric>
Return values
RepeatedField<string|int, TimeSeriesMetric>getTimestampMs()
time at which this batch is sent based on a monotonic clock (millisecond resolution)
public
getTimestampMs() : int|string
Generated from protobuf field int64 timestamp_ms = 1;
Return values
int|stringhasNormalizedTimestamp()
public
hasNormalizedTimestamp() : mixed
setEvents()
Generated from protobuf field <code>repeated .livekit.EventMetric events = 5;</code>
public
setEvents(array<string|int, EventMetric> $var) : $this
Parameters
- $var : array<string|int, EventMetric>
Return values
$thissetNormalizedTimestamp()
Generated from protobuf field <code>.google.protobuf.Timestamp normalized_timestamp = 2;</code>
public
setNormalizedTimestamp(Timestamp $var) : $this
Parameters
- $var : Timestamp
Return values
$thissetStrData()
To avoid repeating string values, we store them in a separate list and reference them by index This is useful for storing participant identities, track names, etc.
public
setStrData(array<string|int, string> $var) : $this
There is also a predefined list of labels that can be used to reference common metrics. They have reserved indices from 0 to (METRIC_LABEL_PREDEFINED_MAX_VALUE - 1). Indexes pointing at str_data should start from METRIC_LABEL_PREDEFINED_MAX_VALUE, such that str_data[0] == index of METRIC_LABEL_PREDEFINED_MAX_VALUE.
Generated from protobuf field repeated string str_data = 3;
Parameters
- $var : array<string|int, string>
Return values
$thissetTimeSeries()
Generated from protobuf field <code>repeated .livekit.TimeSeriesMetric time_series = 4;</code>
public
setTimeSeries(array<string|int, TimeSeriesMetric> $var) : $this
Parameters
- $var : array<string|int, TimeSeriesMetric>
Return values
$thissetTimestampMs()
time at which this batch is sent based on a monotonic clock (millisecond resolution)
public
setTimestampMs(int|string $var) : $this
Generated from protobuf field int64 timestamp_ms = 1;
Parameters
- $var : int|string