Module: Perfm
- Defined in:
- lib/perfm/pid_store.rb,
lib/perfm.rb,
lib/perfm/agent.rb,
lib/perfm/queue.rb,
lib/perfm/client.rb,
lib/perfm/engine.rb,
lib/perfm/version.rb,
lib/perfm/heap_dumper.rb,
lib/perfm/storage/api.rb,
lib/perfm/storage/base.rb,
lib/perfm/configuration.rb,
lib/perfm/queue_latency.rb,
lib/perfm/storage/local.rb,
lib/perfm/metrics/sidekiq.rb,
app/models/perfm/gvl_metric.rb,
lib/perfm/gvl_metrics_analyzer.rb,
app/models/perfm/application_record.rb,
app/models/perfm/sidekiq_gvl_metric.rb,
lib/perfm/sidekiq_gvl_metrics_analyzer.rb,
lib/perfm/errors/latency_exceeded_error.rb,
lib/perfm/middleware/gvl_instrumentation.rb,
lib/generators/perfm/install/install_generator.rb,
lib/perfm/middleware/sidekiq_gvl_instrumentation.rb,
lib/generators/perfm/uninstall/uninstall_generator.rb,
lib/generators/perfm/sidekiq_gvl_metrics/sidekiq_gvl_metrics_generator.rb
Overview
TODO: Or read from Puma pidfile?
TODO: Handle single mode
Defined Under Namespace
Modules: Errors, Metrics, Middleware, QueueLatency, Storage
Classes: Agent, ApplicationRecord, Client, Configuration, Engine, GvlMetric, GvlMetricsAnalyzer, HeapDumper, InstallGenerator, PidStore, Queue, SidekiqGvlMetric, SidekiqGvlMetricsAnalyzer, SidekiqGvlMetricsGenerator, UninstallGenerator
Constant Summary
collapse
- VERSION =
"1.1.0"
Class Attribute Summary collapse
Class Method Summary
collapse
Class Attribute Details
.configuration ⇒ Object
30
31
32
|
# File 'lib/perfm.rb', line 30
def configuration
@configuration ||= Configuration.new
end
|
Class Method Details
.agent ⇒ Object
38
39
40
|
# File 'lib/perfm.rb', line 38
def agent
@agent
end
|
34
35
36
|
# File 'lib/perfm.rb', line 34
def configure
yield(configuration)
end
|
.generate_heap_dump ⇒ Object
.setup! ⇒ Object
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# File 'lib/perfm.rb', line 42
def setup!
return unless configuration.enabled?
setup_sidekiq if configuration.monitor_sidekiq?
storage = if configuration.storage == :local
Storage::Local.new
else
Storage::Api.new(Client.new(configuration))
end
@agent = Agent.new(configuration, storage)
end
|