pub enum MetricsLoggerRequest {
StartLogging {
client_id: String,
metrics: Vec<Metric>,
duration_ms: u32,
output_samples_to_syslog: bool,
output_stats_to_syslog: bool,
responder: MetricsLoggerStartLoggingResponder,
},
StartLoggingForever {
client_id: String,
metrics: Vec<Metric>,
output_samples_to_syslog: bool,
output_stats_to_syslog: bool,
responder: MetricsLoggerStartLoggingForeverResponder,
},
StopLogging {
client_id: String,
responder: MetricsLoggerStopLoggingResponder,
},
}
Expand description
A protocol for managing on-demand metrics logging.
Variants§
StartLogging
Fields
responder: MetricsLoggerStartLoggingResponder
Initiates logging of specified metrics for the provided duration.
Supports concurrent logging of different metrics. Logging may be
terminated early with a call to StopLogging
.
This call will fail if logging of the specified metric is already
active. For this reason, a client may wish to precede a StartLogging
call with a StopLogging
call, after which the only reason for The
logger to be active would be a conflict with another client.
- request
client_id
String format Id of the client. Client may choose any Id with a maximum byte size of 8 (e.g., “ffxTest”). - request
metrics
Type of the metrics to be polled and logged. - request
duration_ms
Duration of logging in milliseconds. After this duration, polling and logging will cease. - request
output_samples_to_syslog
Toggle for outputting raw data to syslog. - request
output_stats_to_syslog
Toggle for outputting any available statistics to syslog. - error a [fuchsia.metrics.test/MeticsLoggerError] value indicating why the request failed.
StartLoggingForever
Fields
responder: MetricsLoggerStartLoggingForeverResponder
Initiates logging of specified metrics. Supports concurrent logging of
different metrics. Logging will only end upon a StopLogging
call.
StartLogging
should be preferred for usage in automated tests to
ensure that logging terminates even if the test crashes.
- request
client_id
String format Id of the client. Client may choose any Id with a maximum byte size of 8 (e.g., “ffxTest”). - request
metrics
Type of the metrics to be polled and logged. - request
output_samples_to_syslog
Toggle for outputting raw data to syslog. - request
output_stats_to_syslog
Toggle for outputting any available statistics to syslog. - error a [fuchsia.metrics.test/MetricsLoggerError] value indicating why the request failed.
StopLogging
Terminates all active logging tasks with the given client_id. It is valid to call this method when logging is inactive.
- request
client_id
String format Id of the client.
- response
status
A bool value indicating if existing logging was stopped (true) or there’sno existing logging for the client.
Implementations§
source§impl MetricsLoggerRequest
impl MetricsLoggerRequest
pub fn into_start_logging( self ) -> Option<(String, Vec<Metric>, u32, bool, bool, MetricsLoggerStartLoggingResponder)>
pub fn into_start_logging_forever( self ) -> Option<(String, Vec<Metric>, bool, bool, MetricsLoggerStartLoggingForeverResponder)>
pub fn into_stop_logging( self ) -> Option<(String, MetricsLoggerStopLoggingResponder)>
sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL