module AppPerfAgent::Plugin

Public Class Methods

load_plugins() click to toggle source
# File lib/app_perf_agent/plugin.rb, line 4
def load_plugins
  pattern = File.join(File.dirname(__FILE__), 'plugin', '**', '*.rb')

  Dir.glob(pattern) do |f|
    begin
      require f
    rescue => e
      AppPerfAgent.logger.info "Error loading plugin '#{f}' : #{e}"
      AppPerfAgent.logger.info "#{e.backtrace.first}"
    end
  end
end
plugins() click to toggle source
# File lib/app_perf_agent/plugin.rb, line 17
def plugins
  @plugins ||= ::AppPerfAgent::Plugin::Base
    .descendants
    .map(&:new)
end