Sha256: 35481830f2f1ddb58556bb3cc46a25d90af098027b7c9b3ab508768235fd8026

Contents?: true

Size: 517 Bytes

Versions: 19

Compression:

Stored size: 517 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

19 entries across 19 versions & 1 rubygems

Version Path
metric_fu-4.11.3 lib/metric_fu/metrics/hotspots/analysis/grouping.rb
metric_fu-4.11.2 lib/metric_fu/metrics/hotspots/analysis/grouping.rb
metric_fu-4.11.1 lib/metric_fu/metrics/hotspots/analysis/grouping.rb
metric_fu-4.11.0 lib/metric_fu/metrics/hotspots/analysis/grouping.rb
metric_fu-4.10.0 lib/metric_fu/metrics/hotspots/analysis/grouping.rb
metric_fu-4.9.0 lib/metric_fu/metrics/hotspots/analysis/grouping.rb
metric_fu-4.8.0 lib/metric_fu/metrics/hotspots/analysis/grouping.rb
metric_fu-4.7.4 lib/metric_fu/metrics/hotspots/analysis/grouping.rb
metric_fu-4.7.3 lib/metric_fu/metrics/hotspots/analysis/grouping.rb
metric_fu-4.7.2 lib/metric_fu/metrics/hotspots/analysis/grouping.rb
metric_fu-4.7.1 lib/metric_fu/metrics/hotspots/analysis/grouping.rb
metric_fu-4.7.0 lib/metric_fu/metrics/hotspots/analysis/grouping.rb
metric_fu-4.6.0 lib/metric_fu/metrics/hotspots/analysis/grouping.rb
metric_fu-4.5.2 lib/metric_fu/metrics/hotspots/analysis/grouping.rb
metric_fu-4.5.1 lib/metric_fu/metrics/hotspots/analysis/grouping.rb
metric_fu-4.4.4 lib/metric_fu/metrics/hotspots/analysis/grouping.rb
metric_fu-4.4.3 lib/metric_fu/metrics/hotspots/analysis/grouping.rb
metric_fu-4.4.2 lib/metric_fu/metrics/hotspots/analysis/grouping.rb
metric_fu-4.4.1 lib/metric_fu/metrics/hotspots/analysis/grouping.rb