Sha256: 2fc05563ac39c220f4f9e31d0605a0f9876dec39eb4ddaa163b5318c680f3d40

Contents?: true

Size: 515 Bytes

Versions: 9

Compression:

Stored size: 515 Bytes

Contents

%w(table).each do |path|
  MetricFu.metrics_require   { "hotspots/analysis/#{path}" }
end
module MetricFu
  class Grouping
    def initialize(table, opts)
      column_name = opts.fetch(:by)
      hash = {}
      if column_name.to_sym == :metric # special optimized case
        hash = table.group_by_metric
      else
        raise "Unexpected column_name #{column_name}"
      end
      @arr = hash.to_a
    end

    def each
      @arr.each do |value, rows|
        yield value, rows
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 3 rubygems

Version Path
metric_fu-4.13.0 lib/metric_fu/metrics/hotspots/analysis/grouping.rb
fastruby-metric_fu-5.0.0 lib/metric_fu/metrics/hotspots/analysis/grouping.rb
code_metric_fu-4.14.4 lib/metric_fu/metrics/hotspots/analysis/grouping.rb
code_metric_fu-4.14.3 lib/metric_fu/metrics/hotspots/analysis/grouping.rb
code_metric_fu-4.14.2 lib/metric_fu/metrics/hotspots/analysis/grouping.rb
code_metric_fu-4.14.1 lib/metric_fu/metrics/hotspots/analysis/grouping.rb
code_metric_fu-4.14.0 lib/metric_fu/metrics/hotspots/analysis/grouping.rb
metric_fu-4.12.0 lib/metric_fu/metrics/hotspots/analysis/grouping.rb
metric_fu-4.11.4 lib/metric_fu/metrics/hotspots/analysis/grouping.rb