Sha256: 54de381bc51dbd6e4011365184c4f953332da4e54d34669dc0b98faaabf90fb7

Contents?: true

Size: 459 Bytes

Versions: 41

Compression:

Stored size: 459 Bytes

Contents

module MCollective
  class Aggregate
    class Sum<Base
      def startup_hook
        @result[:value] = 0
        @result[:type] = :numeric

        # Set default aggregate_function if it is undefined
        @aggregate_format = "Sum of #{@result[:output]}: %f" unless @aggregate_format
      end

      # Determines the average of a set of numerical values
      def process_result(value, reply)
        @result[:value] += value
      end
    end
  end
end

Version data entries

41 entries across 41 versions & 2 rubygems

Version Path
choria-mcorpc-support-2.22.1 lib/mcollective/aggregate/sum.rb
choria-mcorpc-support-2.22.0 lib/mcollective/aggregate/sum.rb
choria-mcorpc-support-2.21.1 lib/mcollective/aggregate/sum.rb
choria-mcorpc-support-2.21.0 lib/mcollective/aggregate/sum.rb
choria-mcorpc-support-2.20.8 lib/mcollective/aggregate/sum.rb
mcollective-client-2.12.5 lib/mcollective/aggregate/sum.rb
choria-mcorpc-support-2.20.7 lib/mcollective/aggregate/sum.rb
choria-mcorpc-support-2.20.6 lib/mcollective/aggregate/sum.rb
choria-mcorpc-support-2.20.5 lib/mcollective/aggregate/sum.rb
choria-mcorpc-support-2.20.4 lib/mcollective/aggregate/sum.rb
choria-mcorpc-support-2.20.3 lib/mcollective/aggregate/sum.rb
choria-mcorpc-support-2.20.2 lib/mcollective/aggregate/sum.rb
choria-mcorpc-support-2.20.0 lib/mcollective/aggregate/sum.rb
choria-mcorpc-support-0.0.1 lib/mcollective/aggregate/sum.rb
mcollective-client-2.12.4 lib/mcollective/aggregate/sum.rb
mcollective-client-2.12.3 lib/mcollective/aggregate/sum.rb
mcollective-client-2.12.1 lib/mcollective/aggregate/sum.rb
mcollective-client-2.12.0 lib/mcollective/aggregate/sum.rb
mcollective-client-2.10.6 lib/mcollective/aggregate/sum.rb
mcollective-client-2.11.4 lib/mcollective/aggregate/sum.rb