Sha256: c72185d44fc9f07a85639786e467bb19968b56eadaab2c1012898d2bc2a3748f

Contents?: true

Size: 726 Bytes

Versions: 17

Compression:

Stored size: 726 Bytes

Contents

# encoding: utf-8
# This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.

require 'new_relic/agent/datastores/mongo/metric_translator'

module NewRelic
  module TestHelpers
    module MongoMetricBuilder
      def build_test_metrics(name)
        NewRelic::Agent::Datastores::Mongo::MetricTranslator.build_metrics(
          name,
          @collection_name
        )
      end

      def metrics_with_attributes(metrics, attributes = { :call_count => 1 })
        metric_attributes = {}

        metrics.each do |metric|
          metric_attributes[metric] = attributes.dup
        end

        metric_attributes
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
newrelic_rpm-3.16.0.318 test/helpers/mongo_metric_builder.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/newrelic_rpm-3.15.2.317/test/helpers/mongo_metric_builder.rb
newrelic_rpm-3.15.2.317 test/helpers/mongo_metric_builder.rb
newrelic_rpm-3.15.1.316 test/helpers/mongo_metric_builder.rb
newrelic_rpm-3.15.0.314 test/helpers/mongo_metric_builder.rb
newrelic_rpm-3.14.3.313 test/helpers/mongo_metric_builder.rb
newrelic_rpm-3.14.2.312 test/helpers/mongo_metric_builder.rb
newrelic_rpm-3.14.1.311 test/helpers/mongo_metric_builder.rb
newrelic_rpm-3.14.0.305 test/helpers/mongo_metric_builder.rb
newrelic_rpm-3.13.2.302 test/helpers/mongo_metric_builder.rb
newrelic_rpm-3.13.1.300 test/helpers/mongo_metric_builder.rb
newrelic_rpm-3.13.0.299 test/helpers/mongo_metric_builder.rb
newrelic_rpm-3.12.1.298 test/helpers/mongo_metric_builder.rb
newrelic_rpm-3.12.0.288 test/helpers/mongo_metric_builder.rb
newrelic_rpm-3.11.2.286 test/helpers/mongo_metric_builder.rb
newrelic_rpm-3.11.1.284 test/helpers/mongo_metric_builder.rb
newrelic_rpm-3.11.0.283 test/helpers/mongo_metric_builder.rb