Struct glean_core::storage::StorageManager [−][src]
pub struct StorageManager;
Expand description
Snapshot metrics from the underlying database.
Implementations
impl StorageManager[src]
impl StorageManager[src]pub fn snapshot(
&self,
storage: &Database,
store_name: &str,
clear_store: bool
) -> Option<String>[src]
pub fn snapshot(
&self,
storage: &Database,
store_name: &str,
clear_store: bool
) -> Option<String>[src]pub fn snapshot_as_json(
&self,
storage: &Database,
store_name: &str,
clear_store: bool
) -> Option<JsonValue>[src]
pub fn snapshot_as_json(
&self,
storage: &Database,
store_name: &str,
clear_store: bool
) -> Option<JsonValue>[src]pub fn snapshot_metric(
&self,
storage: &Database,
store_name: &str,
metric_id: &str,
metric_lifetime: Lifetime
) -> Option<Metric>[src]
pub fn snapshot_metric(
&self,
storage: &Database,
store_name: &str,
metric_id: &str,
metric_lifetime: Lifetime
) -> Option<Metric>[src]pub fn snapshot_metric_for_test(
&self,
storage: &Database,
store_name: &str,
metric_id: &str,
metric_lifetime: Lifetime
) -> Option<Metric>[src]
pub fn snapshot_metric_for_test(
&self,
storage: &Database,
store_name: &str,
metric_id: &str,
metric_lifetime: Lifetime
) -> Option<Metric>[src]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>[src]
pub fn snapshot_experiments_as_json(
&self,
storage: &Database,
store_name: &str
) -> Option<JsonValue>[src]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.