newrelic_rpm 3.5.8.72 → 3.6.0.74.beta
Sign up to get free protection for your applications and to get access to all the features.
- data/.travis.yml +1 -0
- data/CHANGELOG +16 -0
- data/LICENSE +70 -6
- data/init.rb +4 -0
- data/install.rb +4 -0
- data/lib/conditional_vendored_dependency_detection.rb +4 -0
- data/lib/conditional_vendored_metric_parser.rb +4 -0
- data/lib/new_relic/agent/agent.rb +10 -7
- data/lib/new_relic/agent/agent_logger.rb +4 -0
- data/lib/new_relic/agent/audit_logger.rb +4 -0
- data/lib/new_relic/agent/beacon_configuration.rb +4 -0
- data/lib/new_relic/agent/browser_monitoring.rb +4 -0
- data/lib/new_relic/agent/busy_calculator.rb +7 -6
- data/lib/new_relic/agent/chained_call.rb +4 -0
- data/lib/new_relic/agent/configuration/defaults.rb +4 -0
- data/lib/new_relic/agent/configuration/environment_source.rb +4 -0
- data/lib/new_relic/agent/configuration/manager.rb +4 -0
- data/lib/new_relic/agent/configuration/mask_defaults.rb +4 -0
- data/lib/new_relic/agent/configuration/server_source.rb +4 -0
- data/lib/new_relic/agent/configuration/yaml_source.rb +5 -1
- data/lib/new_relic/agent/configuration.rb +4 -0
- data/lib/new_relic/agent/cross_app_monitor.rb +9 -10
- data/lib/new_relic/agent/cross_app_tracing.rb +6 -18
- data/lib/new_relic/agent/database.rb +4 -0
- data/lib/new_relic/agent/error_collector.rb +23 -10
- data/lib/new_relic/agent/event_listener.rb +4 -0
- data/lib/new_relic/agent/instrumentation/active_merchant.rb +4 -0
- data/lib/new_relic/agent/instrumentation/active_record.rb +4 -0
- data/lib/new_relic/agent/instrumentation/acts_as_solr.rb +4 -0
- data/lib/new_relic/agent/instrumentation/authlogic.rb +4 -0
- data/lib/new_relic/agent/instrumentation/browser_monitoring_timings.rb +4 -0
- data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +5 -8
- data/lib/new_relic/agent/instrumentation/data_mapper.rb +5 -1
- data/lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb +4 -0
- data/lib/new_relic/agent/instrumentation/memcache.rb +4 -0
- data/lib/new_relic/agent/instrumentation/merb/controller.rb +4 -0
- data/lib/new_relic/agent/instrumentation/merb/errors.rb +4 -0
- data/lib/new_relic/agent/instrumentation/metric_frame/pop.rb +5 -1
- data/lib/new_relic/agent/instrumentation/metric_frame.rb +15 -18
- data/lib/new_relic/agent/instrumentation/net.rb +4 -2
- data/lib/new_relic/agent/instrumentation/passenger_instrumentation.rb +4 -0
- data/lib/new_relic/agent/instrumentation/queue_time.rb +6 -2
- data/lib/new_relic/agent/instrumentation/rack.rb +4 -0
- data/lib/new_relic/agent/instrumentation/rails/action_controller.rb +4 -0
- data/lib/new_relic/agent/instrumentation/rails/action_web_service.rb +4 -0
- data/lib/new_relic/agent/instrumentation/rails/errors.rb +4 -0
- data/lib/new_relic/agent/instrumentation/rails3/action_controller.rb +4 -0
- data/lib/new_relic/agent/instrumentation/rails3/errors.rb +4 -0
- data/lib/new_relic/agent/instrumentation/rainbows_instrumentation.rb +26 -0
- data/lib/new_relic/agent/instrumentation/resque.rb +4 -0
- data/lib/new_relic/agent/instrumentation/sidekiq.rb +36 -0
- data/lib/new_relic/agent/instrumentation/sinatra.rb +4 -0
- data/lib/new_relic/agent/instrumentation/sunspot.rb +4 -0
- data/lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb +4 -0
- data/lib/new_relic/agent/instrumentation.rb +4 -0
- data/lib/new_relic/agent/method_tracer.rb +26 -31
- data/lib/new_relic/agent/new_relic_service.rb +7 -6
- data/lib/new_relic/agent/pipe_channel_manager.rb +58 -15
- data/lib/new_relic/agent/pipe_service.rb +13 -6
- data/lib/new_relic/agent/rules_engine.rb +4 -0
- data/lib/new_relic/agent/sampler.rb +4 -0
- data/lib/new_relic/agent/samplers/cpu_sampler.rb +20 -12
- data/lib/new_relic/agent/samplers/delayed_job_sampler.rb +15 -12
- data/lib/new_relic/agent/samplers/memory_sampler.rb +9 -5
- data/lib/new_relic/agent/samplers/object_sampler.rb +6 -6
- data/lib/new_relic/agent/shim_agent.rb +4 -0
- data/lib/new_relic/agent/sql_sampler.rb +4 -0
- data/lib/new_relic/agent/stats.rb +3 -0
- data/lib/new_relic/agent/stats_engine/gc_profiler.rb +8 -4
- data/lib/new_relic/agent/stats_engine/metric_stats.rb +13 -13
- data/lib/new_relic/agent/stats_engine/samplers.rb +6 -3
- data/lib/new_relic/agent/stats_engine/stats_hash.rb +4 -0
- data/lib/new_relic/agent/stats_engine/transactions.rb +4 -0
- data/lib/new_relic/agent/stats_engine.rb +4 -0
- data/lib/new_relic/agent/thread.rb +4 -0
- data/lib/new_relic/agent/thread_profiler.rb +4 -0
- data/lib/new_relic/agent/transaction_info.rb +4 -0
- data/lib/new_relic/agent/transaction_sample_builder.rb +4 -0
- data/lib/new_relic/agent/transaction_sampler.rb +4 -0
- data/lib/new_relic/agent/worker_loop.rb +4 -0
- data/lib/new_relic/agent.rb +7 -3
- data/lib/new_relic/build.rb +2 -2
- data/lib/new_relic/coerce.rb +4 -0
- data/lib/new_relic/collection_helper.rb +4 -0
- data/lib/new_relic/command.rb +4 -0
- data/lib/new_relic/commands/deployments.rb +4 -0
- data/lib/new_relic/commands/install.rb +4 -0
- data/lib/new_relic/control/class_methods.rb +4 -0
- data/lib/new_relic/control/frameworks/external.rb +4 -0
- data/lib/new_relic/control/frameworks/merb.rb +4 -0
- data/lib/new_relic/control/frameworks/rails.rb +4 -0
- data/lib/new_relic/control/frameworks/rails3.rb +4 -0
- data/lib/new_relic/control/frameworks/rails4.rb +4 -0
- data/lib/new_relic/control/frameworks/ruby.rb +4 -0
- data/lib/new_relic/control/frameworks/sinatra.rb +4 -0
- data/lib/new_relic/control/frameworks.rb +4 -0
- data/lib/new_relic/control/instance_methods.rb +4 -0
- data/lib/new_relic/control/instrumentation.rb +4 -0
- data/lib/new_relic/control/profiling.rb +4 -0
- data/lib/new_relic/control/server_methods.rb +4 -0
- data/lib/new_relic/control.rb +4 -0
- data/lib/new_relic/delayed_job_injection.rb +4 -0
- data/lib/new_relic/helper.rb +4 -1
- data/lib/new_relic/language_support.rb +4 -0
- data/lib/new_relic/latest_changes.rb +5 -1
- data/lib/new_relic/local_environment.rb +18 -1
- data/lib/new_relic/merbtasks.rb +4 -0
- data/lib/new_relic/metric_data.rb +4 -0
- data/lib/new_relic/metric_spec.rb +4 -0
- data/lib/new_relic/metrics.rb +4 -0
- data/lib/new_relic/noticed_error.rb +4 -0
- data/lib/new_relic/okjson.rb +4 -1
- data/lib/new_relic/rack/agent_hooks.rb +4 -0
- data/lib/new_relic/rack/browser_monitoring.rb +4 -0
- data/lib/new_relic/rack/developer_mode.rb +4 -0
- data/lib/new_relic/rack/error_collector.rb +4 -0
- data/lib/new_relic/rack.rb +4 -0
- data/lib/new_relic/recipes.rb +4 -0
- data/lib/new_relic/timer_lib.rb +4 -0
- data/lib/new_relic/transaction_analysis/segment_summary.rb +4 -0
- data/lib/new_relic/transaction_analysis.rb +4 -0
- data/lib/new_relic/transaction_sample/composite_segment.rb +4 -0
- data/lib/new_relic/transaction_sample/fake_segment.rb +4 -0
- data/lib/new_relic/transaction_sample/segment.rb +4 -0
- data/lib/new_relic/transaction_sample/summary_segment.rb +4 -0
- data/lib/new_relic/transaction_sample.rb +4 -0
- data/lib/new_relic/url_rule.rb +4 -0
- data/lib/new_relic/version.rb +6 -2
- data/lib/newrelic_rpm.rb +4 -0
- data/lib/tasks/all.rb +4 -0
- data/recipes/newrelic.rb +4 -0
- data/test/active_record_fixtures.rb +4 -0
- data/test/config/test_control.rb +4 -0
- data/test/intentional_fail.rb +4 -0
- data/test/multiverse/lib/multiverse/color.rb +4 -0
- data/test/multiverse/lib/multiverse/envfile.rb +4 -0
- data/test/multiverse/lib/multiverse/environment.rb +4 -0
- data/test/multiverse/lib/multiverse/output_collector.rb +4 -0
- data/test/multiverse/lib/multiverse/runner.rb +4 -0
- data/test/multiverse/lib/multiverse/suite.rb +4 -0
- data/test/multiverse/suites/active_record/ar_method_aliasing.rb +4 -0
- data/test/multiverse/suites/active_record/encoding_test.rb +4 -0
- data/test/multiverse/suites/agent_only/audit_log_test.rb +4 -0
- data/test/multiverse/suites/agent_only/cross_application_tracing_test.rb +4 -0
- data/test/multiverse/suites/agent_only/http_response_code_test.rb +4 -0
- data/test/multiverse/suites/agent_only/key_transactions_test.rb +4 -0
- data/test/multiverse/suites/agent_only/logging_test.rb +4 -0
- data/test/multiverse/suites/agent_only/marshaling_test.rb +4 -0
- data/test/multiverse/suites/agent_only/method_visibility_test.rb +4 -0
- data/test/multiverse/suites/agent_only/no_dns_resolv.rb +4 -0
- data/test/multiverse/suites/agent_only/pipe_manager_test.rb +4 -0
- data/test/multiverse/suites/agent_only/rename_rule_test.rb +4 -0
- data/test/multiverse/suites/agent_only/rum_instrumentation_test.rb +4 -0
- data/test/multiverse/suites/agent_only/service_timeout_test.rb +4 -0
- data/test/multiverse/suites/agent_only/ssl_test.rb +4 -0
- data/test/multiverse/suites/agent_only/start_up_test.rb +4 -0
- data/test/multiverse/suites/agent_only/test_trace_method_with_punctuation.rb +4 -0
- data/test/multiverse/suites/agent_only/test_trace_transaction_with_punctuation.rb +4 -0
- data/test/multiverse/suites/agent_only/testing_app.rb +4 -0
- data/test/multiverse/suites/agent_only/thread_profiling_test.rb +4 -0
- data/test/multiverse/suites/config_file_loading/config_file_loading_test.rb +4 -0
- data/test/multiverse/suites/datamapper/encoding_test.rb +4 -0
- data/test/multiverse/suites/rails/app.rb +4 -0
- data/test/multiverse/suites/rails/error_tracing_test.rb +4 -0
- data/test/multiverse/suites/rails/gc_instrumentation_test.rb +4 -0
- data/test/multiverse/suites/rails/queue_time_test.rb +4 -0
- data/test/multiverse/suites/rails/view_instrumentation_test.rb +4 -0
- data/test/multiverse/suites/resque/instrumentation_test.rb +5 -1
- data/test/multiverse/suites/resque/resque_setup.rb +4 -0
- data/test/multiverse/suites/sidekiq/Envfile +21 -0
- data/test/multiverse/suites/sidekiq/app.rb +25 -0
- data/test/multiverse/suites/sidekiq/config/newrelic.yml +22 -0
- data/test/multiverse/suites/sidekiq/log/.gitkeep +0 -0
- data/test/multiverse/suites/sidekiq/sidekiq_instrumentation_test.rb +137 -0
- data/test/multiverse/suites/sinatra/sinatra_error_tracing_test.rb +4 -0
- data/test/multiverse/suites/sinatra/sinatra_metric_explosion_test.rb +4 -0
- data/test/multiverse/suites/sinatra/sinatra_routes_test.rb +4 -0
- data/test/multiverse/suites/sinatra/sinatra_test.rb +4 -0
- data/test/multiverse/test/multiverse_test.rb +4 -0
- data/test/multiverse/test/suite_examples/one/a/a_test.rb +4 -0
- data/test/multiverse/test/suite_examples/one/b/b_test.rb +4 -0
- data/test/multiverse/test/suite_examples/three/a/fail_test.rb +4 -0
- data/test/multiverse/test/suite_examples/three/b/win_test.rb +4 -0
- data/test/multiverse/test/suite_examples/two/a/fail_test.rb +4 -0
- data/test/new_relic/agent/agent/connect_test.rb +4 -0
- data/test/new_relic/agent/agent/start_test.rb +4 -0
- data/test/new_relic/agent/agent/start_worker_thread_test.rb +4 -0
- data/test/new_relic/agent/agent_logger_test.rb +4 -0
- data/test/new_relic/agent/agent_test.rb +6 -1
- data/test/new_relic/agent/agent_test_controller.rb +4 -0
- data/test/new_relic/agent/agent_test_controller_test.rb +4 -0
- data/test/new_relic/agent/apdex_from_server_test.rb +4 -0
- data/test/new_relic/agent/audit_logger_test.rb +4 -0
- data/test/new_relic/agent/beacon_configuration_test.rb +4 -0
- data/test/new_relic/agent/browser_monitoring_test.rb +4 -0
- data/test/new_relic/agent/busy_calculator_test.rb +6 -2
- data/test/new_relic/agent/configuration/environment_source_test.rb +4 -0
- data/test/new_relic/agent/configuration/manager_test.rb +4 -0
- data/test/new_relic/agent/configuration/server_source_test.rb +4 -0
- data/test/new_relic/agent/configuration/yaml_source_test.rb +4 -0
- data/test/new_relic/agent/cross_app_monitor_test.rb +12 -8
- data/test/new_relic/agent/database_test.rb +4 -0
- data/test/new_relic/agent/error_collector/notice_error_test.rb +4 -0
- data/test/new_relic/agent/error_collector_test.rb +4 -0
- data/test/new_relic/agent/event_listener_test.rb +4 -0
- data/test/new_relic/agent/instrumentation/active_record_instrumentation_test.rb +4 -0
- data/test/new_relic/agent/instrumentation/browser_monitoring_timings_test.rb +4 -0
- data/test/new_relic/agent/instrumentation/controller_instrumentation_test.rb +4 -0
- data/test/new_relic/agent/instrumentation/instrumentation_test.rb +4 -0
- data/test/new_relic/agent/instrumentation/metric_frame/pop_test.rb +4 -0
- data/test/new_relic/agent/instrumentation/metric_frame_test.rb +4 -0
- data/test/new_relic/agent/instrumentation/net_instrumentation_test.rb +3 -0
- data/test/new_relic/agent/instrumentation/queue_time_test.rb +4 -0
- data/test/new_relic/agent/instrumentation/rack_test.rb +4 -0
- data/test/new_relic/agent/instrumentation/sinatra_test.rb +4 -0
- data/test/new_relic/agent/instrumentation/task_instrumentation_test.rb +4 -0
- data/test/new_relic/agent/memcache_instrumentation_test.rb +4 -0
- data/test/new_relic/agent/method_tracer/class_methods/add_method_tracer_test.rb +4 -0
- data/test/new_relic/agent/method_tracer/instance_methods/trace_execution_scoped_test.rb +48 -26
- data/test/new_relic/agent/method_tracer_test.rb +4 -0
- data/test/new_relic/agent/mock_scope_listener.rb +4 -0
- data/test/new_relic/agent/new_relic_service_test.rb +4 -0
- data/test/new_relic/agent/pipe_channel_manager_test.rb +24 -6
- data/test/new_relic/agent/pipe_service_test.rb +6 -10
- data/test/new_relic/agent/rpm_agent_test.rb +4 -0
- data/test/new_relic/agent/rules_engine_test.rb +4 -0
- data/test/new_relic/agent/sampler_test.rb +4 -0
- data/test/new_relic/agent/shim_agent_test.rb +4 -0
- data/test/new_relic/agent/sql_sampler_test.rb +4 -0
- data/test/new_relic/agent/stats_engine/gc_profiler_test.rb +4 -0
- data/test/new_relic/agent/stats_engine/metric_stats_test.rb +21 -17
- data/test/new_relic/agent/stats_engine/samplers_test.rb +20 -10
- data/test/new_relic/agent/stats_engine_test.rb +4 -0
- data/test/new_relic/agent/stats_hash_test.rb +4 -0
- data/test/new_relic/agent/stats_test.rb +4 -0
- data/test/new_relic/agent/thread_profiler_test.rb +4 -0
- data/test/new_relic/agent/thread_test.rb +4 -0
- data/test/new_relic/agent/threaded_test.rb +4 -0
- data/test/new_relic/agent/transaction_info_test.rb +4 -0
- data/test/new_relic/agent/transaction_sample_builder_test.rb +4 -0
- data/test/new_relic/agent/transaction_sampler_test.rb +5 -1
- data/test/new_relic/agent/worker_loop_test.rb +4 -0
- data/test/new_relic/agent_test.rb +7 -3
- data/test/new_relic/coerce_test.rb +4 -0
- data/test/new_relic/collection_helper_test.rb +4 -0
- data/test/new_relic/command/deployments_test.rb +4 -0
- data/test/new_relic/control/class_methods_test.rb +4 -0
- data/test/new_relic/control/frameworks/rails_test.rb +4 -0
- data/test/new_relic/control_test.rb +4 -0
- data/test/new_relic/delayed_job_injection_test.rb +4 -0
- data/test/new_relic/dispatcher_test.rb +4 -0
- data/test/new_relic/fake_collector.rb +16 -4
- data/test/new_relic/framework_test.rb +4 -0
- data/test/new_relic/helper_test.rb +4 -1
- data/test/new_relic/license_test.rb +127 -0
- data/test/new_relic/load_test.rb +4 -0
- data/test/new_relic/local_environment_test.rb +4 -0
- data/test/new_relic/metric_data_test.rb +4 -0
- data/test/new_relic/metric_parser/metric_parser_test.rb +4 -0
- data/test/new_relic/metric_spec_test.rb +4 -0
- data/test/new_relic/noticed_error_test.rb +4 -0
- data/test/new_relic/rack/agent_hooks_test.rb +4 -0
- data/test/new_relic/rack/all_test.rb +4 -0
- data/test/new_relic/rack/browser_monitoring_test.rb +4 -0
- data/test/new_relic/rack/developer_mode_helper_test.rb +4 -0
- data/test/new_relic/rack/developer_mode_test.rb +4 -0
- data/test/new_relic/rack/error_collector_test.rb +4 -0
- data/test/new_relic/transaction_analysis/segment_summary_test.rb +4 -0
- data/test/new_relic/transaction_analysis_test.rb +4 -0
- data/test/new_relic/transaction_sample/composite_segment_test.rb +4 -0
- data/test/new_relic/transaction_sample/fake_segment_test.rb +4 -0
- data/test/new_relic/transaction_sample/segment_test.rb +4 -0
- data/test/new_relic/transaction_sample/summary_segment_test.rb +4 -0
- data/test/new_relic/transaction_sample_subtest_test.rb +4 -0
- data/test/new_relic/transaction_sample_test.rb +4 -0
- data/test/new_relic/version_number_test.rb +4 -0
- data/test/test_contexts.rb +4 -0
- data/test/test_helper.rb +4 -0
- data/ui/helpers/developer_mode_helper.rb +4 -0
- data/ui/helpers/google_pie_chart.rb +4 -0
- data/ui/views/newrelic/file/javascript/jquery-1.4.2.js +3 -0
- data/ui/views/newrelic/file/javascript/transaction_sample.js +3 -0
- data/ui/views/newrelic/index.rhtml +2 -2
- data/vendor/gems/dependency_detection-0.0.1.build/lib/dependency_detection/version.rb +4 -0
- data/vendor/gems/dependency_detection-0.0.1.build/lib/dependency_detection.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/metric_parser.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/action_mailer.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/active_merchant.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/active_record.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/apdex.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/background_transaction.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/client.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_cpu.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/controller_ext.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/database_pool.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/dot_net.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/dot_net_parser.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/errors.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/external.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/frontend.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/gc.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/hibernate_session.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/java.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/java_parser.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/jsp.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/jsp_tag.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/mem_cache.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/metric_parser.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/orm.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/other_transaction.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet_context_listener.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet_filter.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/servlet_init.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/solr.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/solr_request_handler.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/spring.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/spring_controller.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/spring_view.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/struts_action.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/struts_result.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/version.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/view.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_frontend.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_service.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser/web_transaction.rb +4 -0
- data/vendor/gems/metric_parser-0.1.0.pre1/lib/new_relic/metric_parser.rb +4 -0
- data.tar.gz.sig +0 -0
- metadata +47 -19
- metadata.gz.sig +0 -0
- data/vendor/gems/dependency_detection-0.0.1.build/LICENSE +0 -5
@@ -1,3 +1,7 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# This file is distributed under New Relic's license terms.
|
3
|
+
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
+
|
1
5
|
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..', 'test_helper'))
|
2
6
|
require 'new_relic/agent/instrumentation/sinatra'
|
3
7
|
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# This file is distributed under New Relic's license terms.
|
3
|
+
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
+
|
1
5
|
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..', 'test_helper'))
|
2
6
|
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', '..', 'test_contexts'))
|
3
7
|
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# This file is distributed under New Relic's license terms.
|
3
|
+
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
+
|
1
5
|
require File.expand_path(File.join(File.dirname(__FILE__),'..','..','test_helper'))
|
2
6
|
|
3
7
|
memcached_ready = false
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# This file is distributed under New Relic's license terms.
|
3
|
+
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
+
|
1
5
|
require File.expand_path(File.join(File.dirname(__FILE__),'..','..','..','..','test_helper'))
|
2
6
|
|
3
7
|
require 'set'
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# This file is distributed under New Relic's license terms.
|
3
|
+
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
+
|
1
5
|
require File.expand_path(File.join(File.dirname(__FILE__),'..','..','..','..','test_helper'))
|
2
6
|
class NewRelic::Agent::MethodTracer::InstanceMethods::TraceExecutionScopedTest < Test::Unit::TestCase
|
3
7
|
require 'new_relic/agent/method_tracer'
|
@@ -47,29 +51,36 @@ class NewRelic::Agent::MethodTracer::InstanceMethods::TraceExecutionScopedTest <
|
|
47
51
|
assert_equal NewRelic::Agent.instance, agent_instance
|
48
52
|
end
|
49
53
|
|
50
|
-
def
|
51
|
-
|
52
|
-
|
53
|
-
main_stat('hello', opts)
|
54
|
-
end
|
55
|
-
|
56
|
-
def test_get_metric_stats_metric
|
57
|
-
metrics = ['foo', 'bar', 'baz']
|
54
|
+
def test_get_metric_specs_with_metric_option
|
55
|
+
first_name = 'foo'
|
56
|
+
other_names = ['bar', 'baz']
|
58
57
|
opts = {:metric => true}
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
58
|
+
|
59
|
+
specs = get_metric_specs(first_name, other_names, 'scope', opts)
|
60
|
+
|
61
|
+
expected_specs = [
|
62
|
+
NewRelic::MetricSpec.new('foo', 'scope'),
|
63
|
+
NewRelic::MetricSpec.new('foo'),
|
64
|
+
NewRelic::MetricSpec.new('bar'),
|
65
|
+
NewRelic::MetricSpec.new('baz')
|
66
|
+
]
|
67
|
+
|
68
|
+
assert_equal(expected_specs.sort, specs.sort)
|
64
69
|
end
|
65
70
|
|
66
|
-
def
|
67
|
-
|
71
|
+
def test_get_metric_stats_without_metric_option
|
72
|
+
first_name = 'foo'
|
73
|
+
other_names = ['bar', 'baz']
|
68
74
|
opts = {:metric => false}
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
75
|
+
|
76
|
+
specs = get_metric_specs(first_name, other_names, 'scope', opts)
|
77
|
+
|
78
|
+
expected_specs = [
|
79
|
+
NewRelic::MetricSpec.new('bar'),
|
80
|
+
NewRelic::MetricSpec.new('baz')
|
81
|
+
]
|
82
|
+
|
83
|
+
assert_equal(expected_specs.sort, specs.sort)
|
73
84
|
end
|
74
85
|
|
75
86
|
def test_set_if_nil
|
@@ -145,17 +156,20 @@ class NewRelic::Agent::MethodTracer::InstanceMethods::TraceExecutionScopedTest <
|
|
145
156
|
t0 = 1.0
|
146
157
|
t1 = 2.0
|
147
158
|
metric = 'foo'
|
148
|
-
|
149
|
-
|
159
|
+
metric_specs = [NewRelic::MetricSpec.new('foo'), NewRelic::MetricSpec.new('bar')]
|
160
|
+
stats = [NewRelic::Agent::Stats.new, NewRelic::Agent::Stats.new]
|
150
161
|
expected_scope = 'an expected scope'
|
151
162
|
engine = mocked_object('stat_engine')
|
152
163
|
scope = mock('scope')
|
153
164
|
engine.expects(:pop_scope).with('an expected scope', 1.0, 2.0).returns(scope)
|
165
|
+
engine.expects(:record_metrics).with(metric_specs).multiple_yields(*stats)
|
166
|
+
stats[0].expects(:record_data_point).with(1.0, 0.5)
|
167
|
+
stats[1].expects(:record_data_point).with(1.0, 0.5)
|
154
168
|
scope.expects(:children_time).returns(0.5)
|
155
169
|
self.expects(:pop_flag!).with(false)
|
156
170
|
self.expects(:log_errors).with('trace_method_execution footer', 'foo').yields
|
157
171
|
|
158
|
-
trace_execution_scoped_footer(t0, metric,
|
172
|
+
trace_execution_scoped_footer(t0, metric, metric_specs, expected_scope, false, t1)
|
159
173
|
end
|
160
174
|
|
161
175
|
def test_trace_execution_scoped_disabled
|
@@ -175,10 +189,14 @@ class NewRelic::Agent::MethodTracer::InstanceMethods::TraceExecutionScopedTest <
|
|
175
189
|
def test_trace_execution_scoped_default
|
176
190
|
passed_in_opts = {}
|
177
191
|
opts_after_correction = {:metric => true, :deduct_call_time_from_parent => true}
|
192
|
+
specs = [
|
193
|
+
NewRelic::MetricSpec.new('metric'),
|
194
|
+
NewRelic::MetricSpec.new('array')
|
195
|
+
]
|
178
196
|
self.expects(:trace_disabled?).returns(false)
|
179
|
-
self.expects(:
|
197
|
+
self.expects(:get_metric_specs).with('metric', ['array'], nil, opts_after_correction).returns(specs)
|
180
198
|
self.expects(:trace_execution_scoped_header).with('metric', opts_after_correction).returns(['start_time', 'expected_scope'])
|
181
|
-
self.expects(:trace_execution_scoped_footer).with('start_time', 'metric',
|
199
|
+
self.expects(:trace_execution_scoped_footer).with('start_time', 'metric', specs, 'expected_scope', nil)
|
182
200
|
ran = false
|
183
201
|
value = trace_execution_scoped(['metric', 'array'], passed_in_opts) do
|
184
202
|
ran = true
|
@@ -192,10 +210,14 @@ class NewRelic::Agent::MethodTracer::InstanceMethods::TraceExecutionScopedTest <
|
|
192
210
|
def test_trace_execution_scoped_with_error
|
193
211
|
passed_in_opts = {}
|
194
212
|
opts_after_correction = {:metric => true, :deduct_call_time_from_parent => true}
|
213
|
+
specs = [
|
214
|
+
NewRelic::MetricSpec.new('metric'),
|
215
|
+
NewRelic::MetricSpec.new('array')
|
216
|
+
]
|
195
217
|
self.expects(:trace_disabled?).returns(false)
|
196
|
-
self.expects(:
|
218
|
+
self.expects(:get_metric_specs).with('metric', ['array'], nil, opts_after_correction).returns(specs)
|
197
219
|
self.expects(:trace_execution_scoped_header).with('metric', opts_after_correction).returns(['start_time', 'expected_scope'])
|
198
|
-
self.expects(:trace_execution_scoped_footer).with('start_time', 'metric',
|
220
|
+
self.expects(:trace_execution_scoped_footer).with('start_time', 'metric', specs, 'expected_scope', nil)
|
199
221
|
ran = false
|
200
222
|
assert_raises(RuntimeError) do
|
201
223
|
trace_execution_scoped(['metric', 'array'], passed_in_opts) do
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# This file is distributed under New Relic's license terms.
|
3
|
+
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
+
|
1
5
|
require File.expand_path(File.join(File.dirname(__FILE__),'..','..','test_helper'))
|
2
6
|
require 'new_relic/agent/mock_scope_listener'
|
3
7
|
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# This file is distributed under New Relic's license terms.
|
3
|
+
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
+
|
1
5
|
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'test_helper'))
|
2
6
|
require 'new_relic/agent/thread_profiler'
|
3
7
|
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# This file is distributed under New Relic's license terms.
|
3
|
+
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
+
|
1
5
|
require 'timeout'
|
2
6
|
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'test_helper'))
|
3
7
|
require 'new_relic/agent/pipe_channel_manager'
|
@@ -97,17 +101,31 @@ class NewRelic::Agent::PipeChannelManagerTest < Test::Unit::TestCase
|
|
97
101
|
assert_equal(2, NewRelic::Agent.agent.error_collector.errors.size)
|
98
102
|
end
|
99
103
|
|
100
|
-
def
|
101
|
-
|
104
|
+
def assert_pipe_finished(id)
|
105
|
+
assert(!NewRelic::Agent::PipeChannelManager.channels[id] ||
|
106
|
+
NewRelic::Agent::PipeChannelManager.channels[id].closed?,
|
107
|
+
"Expected pipe with ID #{id} to be nil or closed")
|
108
|
+
end
|
102
109
|
|
110
|
+
def test_close_pipe_on_child_explicit_close
|
111
|
+
listener = start_listener_with_pipe(669)
|
103
112
|
pid = Process.fork do
|
104
|
-
|
113
|
+
NewRelic::Agent::PipeService.new(669)
|
105
114
|
end
|
106
115
|
Process.wait(pid)
|
107
|
-
listener.
|
116
|
+
listener.stop_listener_thread
|
117
|
+
assert_pipe_finished(669)
|
118
|
+
end
|
108
119
|
|
109
|
-
|
110
|
-
|
120
|
+
def test_close_pipe_on_child_exit
|
121
|
+
listener = start_listener_with_pipe(669)
|
122
|
+
pid = Process.fork do
|
123
|
+
NewRelic::Agent::PipeService.new(669)
|
124
|
+
exit!
|
125
|
+
end
|
126
|
+
Process.wait(pid)
|
127
|
+
listener.stop_listener_thread
|
128
|
+
assert_pipe_finished(669)
|
111
129
|
end
|
112
130
|
|
113
131
|
def test_manager_does_not_crash_when_given_bad_data
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# This file is distributed under New Relic's license terms.
|
3
|
+
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
+
|
1
5
|
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'test_helper'))
|
2
6
|
|
3
7
|
class PipeServiceTest < Test::Unit::TestCase
|
@@ -26,10 +30,9 @@ class PipeServiceTest < Test::Unit::TestCase
|
|
26
30
|
end
|
27
31
|
|
28
32
|
def test_write_to_missing_pipe_logs_error
|
29
|
-
service = NewRelic::Agent::PipeService.new(:non_existant)
|
30
33
|
::NewRelic::Agent.logger.expects(:error) \
|
31
|
-
.with(regexp_matches(/
|
32
|
-
|
34
|
+
.with(regexp_matches(/No communication channel to parent process/)).once
|
35
|
+
service = NewRelic::Agent::PipeService.new(:non_existant)
|
33
36
|
assert_nothing_raised do
|
34
37
|
service.metric_data(Time.now, Time.now, {})
|
35
38
|
end
|
@@ -87,13 +90,6 @@ class PipeServiceTest < Test::Unit::TestCase
|
|
87
90
|
assert_equal ['err0'], received_data[:error_traces].sort
|
88
91
|
end
|
89
92
|
|
90
|
-
def test_shutdown_sends_EOF
|
91
|
-
received_data = data_from_forked_process do
|
92
|
-
@service.shutdown(Time.now)
|
93
|
-
end
|
94
|
-
assert_equal 'EOF', received_data[:EOF]
|
95
|
-
end
|
96
|
-
|
97
93
|
def test_shutdown_closes_pipe
|
98
94
|
data_from_forked_process do
|
99
95
|
@service.shutdown(Time.now)
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# This file is distributed under New Relic's license terms.
|
3
|
+
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
+
|
1
5
|
ENV['SKIP_RAILS'] = 'true'
|
2
6
|
require File.expand_path('../../../test_helper', __FILE__)
|
3
7
|
require File.expand_path('../../../test_contexts', __FILE__)
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# This file is distributed under New Relic's license terms.
|
3
|
+
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
+
|
1
5
|
require File.expand_path(File.join(File.dirname(__FILE__),'..','..','test_helper'))
|
2
6
|
|
3
7
|
class RulesEngineTest < Test::Unit::TestCase
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# This file is distributed under New Relic's license terms.
|
3
|
+
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
+
|
1
5
|
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'test_helper'))
|
2
6
|
class NewRelic::Agent::SamplerTest < Test::Unit::TestCase
|
3
7
|
require 'new_relic/agent/sampler'
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# This file is distributed under New Relic's license terms.
|
3
|
+
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
+
|
1
5
|
require File.expand_path(File.join(File.dirname(__FILE__),'..','..','test_helper'))
|
2
6
|
module NewRelic
|
3
7
|
module Agent
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# This file is distributed under New Relic's license terms.
|
3
|
+
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
+
|
1
5
|
require File.expand_path(File.join(File.dirname(__FILE__),'..','..','test_helper'))
|
2
6
|
|
3
7
|
class NewRelic::Agent::SqlSamplerTest < Test::Unit::TestCase
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# This file is distributed under New Relic's license terms.
|
3
|
+
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
+
|
1
5
|
require File.expand_path(File.join(File.dirname(__FILE__),'..','..','..','test_helper'))
|
2
6
|
|
3
7
|
class NewRelic::Agent::StatsEngine::GCProfilerTest < Test::Unit::TestCase
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# This file is distributed under New Relic's license terms.
|
3
|
+
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
+
|
1
5
|
require File.expand_path(File.join(File.dirname(__FILE__),'..','..','..','test_helper'))
|
2
6
|
|
3
7
|
class NewRelic::Agent::MetricStatsTest < Test::Unit::TestCase
|
@@ -112,36 +116,36 @@ class NewRelic::Agent::MetricStatsTest < Test::Unit::TestCase
|
|
112
116
|
assert_equal(1, bar_stats.call_count)
|
113
117
|
end
|
114
118
|
|
115
|
-
def
|
116
|
-
@engine.stubs(:
|
117
|
-
@engine.
|
119
|
+
def test_record_metrics_unscoped_metrics_only_by_default
|
120
|
+
@engine.stubs(:scope_name).returns('scopey')
|
121
|
+
@engine.record_metrics('foo', 42)
|
118
122
|
unscoped_stats = @engine.get_stats('foo', false)
|
119
123
|
scoped_stats = @engine.get_stats('foo', true, true, 'scopey')
|
120
124
|
assert_equal(1, unscoped_stats.call_count)
|
121
125
|
assert_equal(0, scoped_stats.call_count)
|
122
126
|
end
|
123
127
|
|
124
|
-
def
|
125
|
-
@engine.stubs(:
|
126
|
-
@engine.
|
128
|
+
def test_record_metrics_records_to_scoped_metric_if_requested
|
129
|
+
@engine.stubs(:scope_name).returns('scopey')
|
130
|
+
@engine.record_metrics('foo', 42, :scoped => true)
|
127
131
|
unscoped_stats = @engine.get_stats('foo', false)
|
128
132
|
scoped_stats = @engine.get_stats('foo', true, true, 'scopey')
|
129
133
|
assert_equal(1, unscoped_stats.call_count)
|
130
134
|
assert_equal(1, scoped_stats.call_count)
|
131
135
|
end
|
132
136
|
|
133
|
-
def
|
137
|
+
def test_record_metrics_elides_scoped_metric_if_not_in_transaction
|
134
138
|
@engine.clear_stats
|
135
|
-
@engine.stubs(:
|
136
|
-
@engine.
|
139
|
+
@engine.stubs(:scope_name).returns(nil)
|
140
|
+
@engine.record_metrics('foo', 42, :scoped => true)
|
137
141
|
unscoped_stats = @engine.get_stats('foo', false)
|
138
142
|
assert_equal(1, unscoped_stats.call_count)
|
139
143
|
assert_equal(1, @engine.metrics.size)
|
140
144
|
end
|
141
145
|
|
142
|
-
def
|
143
|
-
@engine.stubs(:
|
144
|
-
@engine.
|
146
|
+
def test_record_metrics_accepts_explicit_scope
|
147
|
+
@engine.stubs(:scope_name).returns('scopey')
|
148
|
+
@engine.record_metrics('foo', 42, :scoped => true, :scope => 'not scopey')
|
145
149
|
unscoped_stats = @engine.get_stats('foo', false)
|
146
150
|
scoped_stats_scopey = @engine.get_stats('foo', true, true, 'scopey')
|
147
151
|
scoped_stats_not_scopey = @engine.get_stats('foo', true, true, 'not scopey')
|
@@ -150,23 +154,23 @@ class NewRelic::Agent::MetricStatsTest < Test::Unit::TestCase
|
|
150
154
|
assert_equal(1, scoped_stats_not_scopey.call_count)
|
151
155
|
end
|
152
156
|
|
153
|
-
def
|
154
|
-
@engine.
|
157
|
+
def test_record_metrics_accepts_block
|
158
|
+
@engine.record_metrics('foo') do |stats|
|
155
159
|
stats.call_count = 999
|
156
160
|
end
|
157
161
|
stats = @engine.get_stats_no_scope('foo')
|
158
162
|
assert_equal(999, stats.call_count)
|
159
163
|
end
|
160
164
|
|
161
|
-
def
|
165
|
+
def test_record_metrics_is_thread_safe
|
162
166
|
threads = []
|
163
167
|
nthreads = 25
|
164
168
|
iterations = 100
|
165
169
|
nthreads.times do |tid|
|
166
170
|
threads << Thread.new do
|
167
171
|
iterations.times do
|
168
|
-
@engine.
|
169
|
-
@engine.
|
172
|
+
@engine.record_metrics('m1', 1)
|
173
|
+
@engine.record_metrics('m2', 1)
|
170
174
|
end
|
171
175
|
end
|
172
176
|
end
|
@@ -1,3 +1,7 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# This file is distributed under New Relic's license terms.
|
3
|
+
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
|
4
|
+
|
1
5
|
require File.expand_path(File.join(File.dirname(__FILE__),'..', '..','..','test_helper'))
|
2
6
|
require 'new_relic/agent/samplers/cpu_sampler'
|
3
7
|
|
@@ -42,10 +46,13 @@ class NewRelic::Agent::StatsEngine::SamplersTest < Test::Unit::TestCase
|
|
42
46
|
s.poll
|
43
47
|
s.instance_eval { @last_time = Time.now - 1.1 }
|
44
48
|
s.poll
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
+
|
50
|
+
systemtime_stats = s.stats_engine.get_stats_no_scope("CPU/System Time")
|
51
|
+
usertime_stats = s.stats_engine.get_stats_no_scope("CPU/User Time")
|
52
|
+
assert_equal 2, systemtime_stats.call_count
|
53
|
+
assert_equal 2, usertime_stats.call_count
|
54
|
+
assert usertime_stats.total_call_time >= 0, "user cpu greater/equal to 0: #{usertime_stats.total_call_time}"
|
55
|
+
assert systemtime_stats.total_call_time >= 0, "system cpu greater/equal to 0: #{systemtime_stats.total_call_time}"
|
49
56
|
end
|
50
57
|
def test_memory__default
|
51
58
|
s = NewRelic::Agent::Samplers::MemorySampler.new
|
@@ -53,8 +60,9 @@ class NewRelic::Agent::StatsEngine::SamplersTest < Test::Unit::TestCase
|
|
53
60
|
s.poll
|
54
61
|
s.poll
|
55
62
|
s.poll
|
56
|
-
|
57
|
-
|
63
|
+
stats = @stats_engine.get_stats_no_scope("Memory/Physical")
|
64
|
+
assert_equal(3, stats.call_count)
|
65
|
+
assert stats.total_call_time > 0.5, "cpu greater than 0.5 ms: #{stats.total_call_time}"
|
58
66
|
end
|
59
67
|
def test_memory__linux
|
60
68
|
return if RUBY_PLATFORM =~ /darwin/
|
@@ -64,8 +72,9 @@ class NewRelic::Agent::StatsEngine::SamplersTest < Test::Unit::TestCase
|
|
64
72
|
s.poll
|
65
73
|
s.poll
|
66
74
|
s.poll
|
67
|
-
|
68
|
-
|
75
|
+
stats = @stats_engine.get_stats_no_scope("Memory/Physical")
|
76
|
+
assert_equal 3, stats.call_count
|
77
|
+
assert stats.total_call_time > 0.5, "cpu greater than 0.5 ms: #{stats.total_call_time}"
|
69
78
|
end
|
70
79
|
def test_memory__solaris
|
71
80
|
return if defined? JRuby
|
@@ -74,8 +83,9 @@ class NewRelic::Agent::StatsEngine::SamplersTest < Test::Unit::TestCase
|
|
74
83
|
s = NewRelic::Agent::Samplers::MemorySampler.new
|
75
84
|
s.stats_engine = @stats_engine
|
76
85
|
s.poll
|
77
|
-
|
78
|
-
assert_equal
|
86
|
+
stats = s.stats_engine.get_stats_no_scope("Memory/Physical")
|
87
|
+
assert_equal 1, stats.call_count
|
88
|
+
assert_equal 999, stats.total_call_time
|
79
89
|
end
|
80
90
|
def test_memory__windows
|
81
91
|
return if defined? JRuby
|