lib/new_relic/agent/agent.rb in newrelic_rpm-4.8.0.341 vs lib/new_relic/agent/agent.rb in newrelic_rpm-5.0.0.342

- old
+ new

@@ -28,11 +28,11 @@ require 'new_relic/agent/javascript_instrumentor' require 'new_relic/agent/vm/monotonic_gc_profiler' require 'new_relic/agent/utilization_data' require 'new_relic/environment_report' require 'new_relic/agent/attribute_filter' -require 'new_relic/agent/throughput_monitor' +require 'new_relic/agent/adaptive_sampler' module NewRelic module Agent # The Agent is a singleton that is instantiated when the plugin is @@ -61,11 +61,11 @@ @error_collector = NewRelic::Agent::ErrorCollector.new @transaction_rules = NewRelic::Agent::RulesEngine.new @harvest_samplers = NewRelic::Agent::SamplerCollection.new(@events) @monotonic_gc_profiler = NewRelic::Agent::VM::MonotonicGCProfiler.new @javascript_instrumentor = NewRelic::Agent::JavascriptInstrumentor.new(@events) - @throughput_monitor = NewRelic::Agent::ThroughputMonitor.new + @adaptive_sampler = NewRelic::Agent::AdaptiveSampler.new @harvester = NewRelic::Agent::Harvester.new(@events) @after_fork_lock = Mutex.new @transaction_event_recorder = NewRelic::Agent::TransactionEventRecorder.new @@ -142,11 +142,11 @@ # GC::Profiler.total_time is not monotonic so we wrap it. attr_reader :monotonic_gc_profiler attr_reader :custom_event_aggregator attr_reader :transaction_event_recorder attr_reader :attribute_filter - attr_reader :throughput_monitor + attr_reader :adaptive_sampler def transaction_event_aggregator @transaction_event_recorder.transaction_event_aggregator end @@ -1152,10 +1152,9 @@ check_for_and_handle_agent_commands harvest_and_send_for_agent_commands end ensure - throughput_monitor.reset! NewRelic::Agent::Database.close_connections duration = (Time.now - now).to_f NewRelic::Agent.record_metric('Supportability/Harvest', duration) end