pub struct MetricEventLoggerProxy { /* private fields */ }
Implementations§
Source§impl MetricEventLoggerProxy
impl MetricEventLoggerProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.metrics/MetricEventLogger.
Sourcepub fn take_event_stream(&self) -> MetricEventLoggerEventStream
pub fn take_event_stream(&self) -> MetricEventLoggerEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn log_occurrence(
&self,
metric_id: u32,
count: u64,
event_codes: &[u32],
) -> QueryResponseFut<MetricEventLoggerLogOccurrenceResult, DefaultFuchsiaResourceDialect>
pub fn log_occurrence( &self, metric_id: u32, count: u64, event_codes: &[u32], ) -> QueryResponseFut<MetricEventLoggerLogOccurrenceResult, DefaultFuchsiaResourceDialect>
Logs the fact that an event has occurred a number of times.
metric_id
ID of the metric being logged.
count
The number of times the event has occurred. The value should
be positive as a value of 0 is ignored.
event_codes
Ordered list of parameters, one for each of the metric’s
dimensions. Occurrence counts with the same event codes are aggregated
based on these parameters.
Sourcepub fn log_integer(
&self,
metric_id: u32,
value: i64,
event_codes: &[u32],
) -> QueryResponseFut<MetricEventLoggerLogIntegerResult, DefaultFuchsiaResourceDialect>
pub fn log_integer( &self, metric_id: u32, value: i64, event_codes: &[u32], ) -> QueryResponseFut<MetricEventLoggerLogIntegerResult, DefaultFuchsiaResourceDialect>
Logs an integer measurement.
metric_id
ID of the metric being logged.
value
The integer measurement.
event_codes
Ordered list of parameters, one for each of the metric’s
dimensions. Integer values with the same event codes are aggregated
based on these parameters.
Sourcepub fn log_integer_histogram(
&self,
metric_id: u32,
histogram: &[HistogramBucket],
event_codes: &[u32],
) -> QueryResponseFut<MetricEventLoggerLogIntegerHistogramResult, DefaultFuchsiaResourceDialect>
pub fn log_integer_histogram( &self, metric_id: u32, histogram: &[HistogramBucket], event_codes: &[u32], ) -> QueryResponseFut<MetricEventLoggerLogIntegerHistogramResult, DefaultFuchsiaResourceDialect>
Logs a histogram giving many approximate integer measurements.
metric_id
ID of the metric being logged.
histogram
The collection of approximate integer measurements. Buckets
that have no measurement (empty buckets) should not be sent.
event_codes
Ordered list of parameters, one for each of the metric’s
dimensions. Histograms with the same event codes are aggregated together
based on these parameters.
Sourcepub fn log_string(
&self,
metric_id: u32,
string_value: &str,
event_codes: &[u32],
) -> QueryResponseFut<MetricEventLoggerLogStringResult, DefaultFuchsiaResourceDialect>
pub fn log_string( &self, metric_id: u32, string_value: &str, event_codes: &[u32], ) -> QueryResponseFut<MetricEventLoggerLogStringResult, DefaultFuchsiaResourceDialect>
Logs a string value that was observed.
metric_id
ID of the metric being logged.
string_value
The string to log.
event_codes
Ordered list of parameters, one for each of the metric’s
dimensions. Counts of logged strings are aggregated separately based on
these parameters.
Sourcepub fn log_metric_events(
&self,
events: &[MetricEvent],
) -> QueryResponseFut<MetricEventLoggerLogMetricEventsResult, DefaultFuchsiaResourceDialect>
pub fn log_metric_events( &self, events: &[MetricEvent], ) -> QueryResponseFut<MetricEventLoggerLogMetricEventsResult, DefaultFuchsiaResourceDialect>
Bulk logging method, equivalent to making many of the above Log*() calls at once.
Trait Implementations§
Source§impl Clone for MetricEventLoggerProxy
impl Clone for MetricEventLoggerProxy
Source§fn clone(&self) -> MetricEventLoggerProxy
fn clone(&self) -> MetricEventLoggerProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for MetricEventLoggerProxy
impl Debug for MetricEventLoggerProxy
Source§impl MetricEventLoggerProxyInterface for MetricEventLoggerProxy
impl MetricEventLoggerProxyInterface for MetricEventLoggerProxy
type LogOccurrenceResponseFut = QueryResponseFut<Result<(), Error>>
type LogIntegerResponseFut = QueryResponseFut<Result<(), Error>>
type LogIntegerHistogramResponseFut = QueryResponseFut<Result<(), Error>>
type LogStringResponseFut = QueryResponseFut<Result<(), Error>>
type LogMetricEventsResponseFut = QueryResponseFut<Result<(), Error>>
fn log_occurrence( &self, metric_id: u32, count: u64, event_codes: &[u32], ) -> Self::LogOccurrenceResponseFut
fn log_integer( &self, metric_id: u32, value: i64, event_codes: &[u32], ) -> Self::LogIntegerResponseFut
fn log_integer_histogram( &self, metric_id: u32, histogram: &[HistogramBucket], event_codes: &[u32], ) -> Self::LogIntegerHistogramResponseFut
fn log_string( &self, metric_id: u32, string_value: &str, event_codes: &[u32], ) -> Self::LogStringResponseFut
fn log_metric_events( &self, events: &[MetricEvent], ) -> Self::LogMetricEventsResponseFut
Source§impl Proxy for MetricEventLoggerProxy
impl Proxy for MetricEventLoggerProxy
Source§type Protocol = MetricEventLoggerMarker
type Protocol = MetricEventLoggerMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for MetricEventLoggerProxy
impl !RefUnwindSafe for MetricEventLoggerProxy
impl Send for MetricEventLoggerProxy
impl Sync for MetricEventLoggerProxy
impl Unpin for MetricEventLoggerProxy
impl !UnwindSafe for MetricEventLoggerProxy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)