pub struct MetricEventLoggerQuerierProxy { /* private fields */ }
Implementations§
Source§impl MetricEventLoggerQuerierProxy
impl MetricEventLoggerQuerierProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.metrics.test/MetricEventLoggerQuerier.
Sourcepub fn take_event_stream(&self) -> MetricEventLoggerQuerierEventStream
pub fn take_event_stream(&self) -> MetricEventLoggerQuerierEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn watch_logs(
&self,
project_id: u32,
method: LogMethod,
) -> QueryResponseFut<(Vec<MetricEvent>, bool), DefaultFuchsiaResourceDialect>
pub fn watch_logs( &self, project_id: u32, method: LogMethod, ) -> QueryResponseFut<(Vec<MetricEvent>, bool), DefaultFuchsiaResourceDialect>
Returns the first N events that were logged for the logger with the
given project_id
and a more
flag indicating whether there were
more than N events logged. There is no way to retrieve events logged
after the first N events.
Will hang until at least one metrics metric is recorded for the given
project_id
and method
.
Repeated calls to WatchLogs for a given LogMethod will block until new events are logged with that method, enabling tests to synchronize without sleeps or timeouts.
Sourcepub fn reset_logger(
&self,
project_id: u32,
method: LogMethod,
) -> Result<(), Error>
pub fn reset_logger( &self, project_id: u32, method: LogMethod, ) -> Result<(), Error>
Clear all logged events by logging method
for the logger with the
given project_id
.
This is a no-op if a logger for the given project_id
does not exist.
Notably, it does not create a new logger with project_id
if one
does not already exist.
Trait Implementations§
Source§impl Clone for MetricEventLoggerQuerierProxy
impl Clone for MetricEventLoggerQuerierProxy
Source§fn clone(&self) -> MetricEventLoggerQuerierProxy
fn clone(&self) -> MetricEventLoggerQuerierProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl MetricEventLoggerQuerierProxyInterface for MetricEventLoggerQuerierProxy
impl MetricEventLoggerQuerierProxyInterface for MetricEventLoggerQuerierProxy
type WatchLogsResponseFut = QueryResponseFut<(Vec<MetricEvent>, bool)>
fn watch_logs( &self, project_id: u32, method: LogMethod, ) -> Self::WatchLogsResponseFut
fn reset_logger(&self, project_id: u32, method: LogMethod) -> Result<(), Error>
Source§impl Proxy for MetricEventLoggerQuerierProxy
impl Proxy for MetricEventLoggerQuerierProxy
Source§type Protocol = MetricEventLoggerQuerierMarker
type Protocol = MetricEventLoggerQuerierMarker
Proxy
controls.