26 $path = explode(
".", $key);
27 $this->metrics = $this->
doStore($this->metrics, $path, $metric);
33 protected function doStore(array
$base, array $path, $metric) : array
35 $key = array_shift($path);
36 if (count($path) == 0) {
37 $base[$key] = $metric;
41 $base[$key] = $this->
doStore($base[$key] ?? [], $path, $metric);
45 public function get() : array
trait StorageConvenience
Implements the convenience methods of Storage over Storage::store.
doStore(array $base, array $path, $metric)
Recursive implementation of storing.
A metric is something we can measure about the system.
store(string $key, Metric $metric)