Sha256: 5637aff06f329c9915ca2b8981b5e98651e6c8988a932548cd9b852eadd05e4e
Contents?: true
Size: 907 Bytes
Versions: 15
Compression:
Stored size: 907 Bytes
Contents
# frozen_string_literal: true require 'statsd-instrument' require 'benchmark/ips' Benchmark.ips do |bench| bench.report("normalized tags with simple hash") do StatsD::Instrument::Metric.normalize_tags(tag: 'value') end bench.report("normalized tags with simple array") do StatsD::Instrument::Metric.normalize_tags(['test:test']) end bench.report("normalized tags with large hash") do StatsD::Instrument::Metric.normalize_tags( mobile: true, pod: "1", protocol: "https", country: "Langbortistan", complete: true, shop: "omg shop that has a longer name", ) end bench.report("normalized tags with large array") do StatsD::Instrument::Metric.normalize_tags([ "mobile:true", "pod:1", "protocol:https", "country:Langbortistan", "complete:true", "shop:omg_shop_that_has_a_longer_name", ]) end end
Version data entries
15 entries across 15 versions & 1 rubygems