Class: CipherStash::Client::Metrics::Hash
- Inherits:
-
CipherStash::Client::Metrics
- Object
- CipherStash::Client::Metrics
- CipherStash::Client::Metrics::Hash
- Defined in:
- lib/cipherstash/client/metrics.rb
Overview
A CipherStash::Client::Metrics collector that aggregates metrics in a hash.
Pass this metrics instance into a CipherStash::Client like this:
metrics = CipherStash::Client::Metrics::Hash.new
client = CipherStash::Client.new(metrics: metrics)
Then after you've used your client object, you can simply examine all the metrics like so:
pp metrics
This will dump out everything in a big hash, just like magic. For details of all the metrics and what they mean, see the [CipherStash::Client::Metrics] documentation.
Instance Method Summary collapse
- #[](k) ⇒ Object
-
#initialize ⇒ Hash
constructor
A new instance of Hash.
Constructor Details
#initialize ⇒ Hash
Returns a new instance of Hash.
144 145 146 147 |
# File 'lib/cipherstash/client/metrics.rb', line 144 def initialize @metrics = {} super(Registry.new(@metrics)) end |
Instance Method Details
#[](k) ⇒ Object
149 150 151 |
# File 'lib/cipherstash/client/metrics.rb', line 149 def [](k) @metrics[k] end |