Function vector::test_util::random_metrics_with_stream_timestamp
source · pub fn random_metrics_with_stream_timestamp(
count: usize,
batch: Option<BatchNotifier>,
tags: Option<MetricTags>,
timestamp: DateTime<Utc>,
timestamp_offset: Duration,
) -> (Vec<Event>, impl Stream<Item = EventArray>)
Expand description
Generates event metrics with the provided tags and timestamp.
§Parameters
count
: the number of metrics to generatebatch
: the batch notifier to use with the streamtags
: the tags to apply to each metric eventtimestamp
: the timestamp to use for each metric eventtimestamp_offset
: the offset from thetimestamp
to use for each additional metric
§Returns
A tuple of the generated metric events and the stream of the generated events