Sha256: 4eac647fa53d3e5cf6e3f295868f52857d46179d636c7b576599a0d1208f328e
Contents?: true
Size: 432 Bytes
Versions: 16
Compression:
Stored size: 432 Bytes
Contents
# frozen_string_literal: true require 'set' require 'zlib' module Sentry module Metrics class SetMetric < Metric attr_reader :value def initialize(value) @value = Set[value] end def add(value) @value << value end def serialize value.map { |x| x.is_a?(String) ? Zlib.crc32(x) : x.to_i } end def weight value.size end end end end
Version data entries
16 entries across 16 versions & 2 rubygems