Struct glean_core::storage::StorageManager [−][src]
pub struct StorageManager;
Expand description
Snapshot metrics from the underlying database.
Implementations
Gets the current value of a single metric identified by name.
Use this API, rather than snapshot_metric
within the testing API, so
that the usage will be reported in coverage, if enabled.
Arguments
storage
- The database to get data from.store_name
- The store name to look into.metric_id
- The full metric identifier.
Returns
The decoded metric or None
if no data is found.
pub fn snapshot_experiments_as_json(
&self,
storage: &Database,
store_name: &str
) -> Option<JsonValue>
pub fn snapshot_experiments_as_json(
&self,
storage: &Database,
store_name: &str
) -> Option<JsonValue>
Snapshots the experiments.
Arguments
storage
- The database to get data from.store_name
- The store name to look into.
Returns
A JSON representation of the experiment data, in the following format:
{ "experiment-id": { "branch": "branch-id", "extra": { "additional": "property", // ... } } }
If no data for the store exists, None
is returned.
Auto Trait Implementations
impl RefUnwindSafe for StorageManager
impl Send for StorageManager
impl Sync for StorageManager
impl Unpin for StorageManager
impl UnwindSafe for StorageManager