Module: Simple::Metrics
- Includes:
- Timer
- Included in:
- Healthchecks, Meter
- Defined in:
- lib/simple/metrics.rb,
lib/simple/version.rb,
lib/simple/metrics/meter.rb,
lib/simple/metrics/timer.rb,
lib/simple/metrics/health.rb,
lib/simple/metrics/graphite.rb,
lib/simple/metrics/healthcheck.rb,
lib/simple/metrics/rack_metrics.rb
Defined Under Namespace
Modules: Graphite, Healthchecks, Meter, Timer Classes: Check, HEALTHY, Health, RackMetrics, UNHEALTHY, WARNING
Constant Summary collapse
- DEFAULT_DURATION_UNIT =
TimeUnit::MILLISECONDS
- DEFAULT_RATE_UNIT =
TimeUnit::SECONDS
- DEFAULT_TIMING_UNIT =
TimeUnit::NANOSECONDS
- VERSION =
'0.0.13'
Instance Method Summary collapse
-
#metrics_registry ⇒ Java::ComYammerMetrics::Metrics
The default metrics registry.
-
#new_metric_name(klass_name, name, type) ⇒ MetricName
Create a new metric name.
-
#sanitize_classname(klass_name) ⇒ String
Sanitize classnames for graphite.
Methods included from Timer
Instance Method Details
#metrics_registry ⇒ Java::ComYammerMetrics::Metrics
The default metrics registry
37 38 39 |
# File 'lib/simple/metrics.rb', line 37 def metrics_registry Java::ComYammerMetrics::Metrics.defaultRegistry end |
#new_metric_name(klass_name, name, type) ⇒ MetricName
Create a new metric name
47 48 49 |
# File 'lib/simple/metrics.rb', line 47 def new_metric_name(klass_name, name, type) MetricName.new(klass_name.downcase, type, name.to_s) end |
#sanitize_classname(klass_name) ⇒ String
Sanitize classnames for graphite
30 31 32 |
# File 'lib/simple/metrics.rb', line 30 def sanitize_classname(klass_name) klass_name.gsub(":","") end |