Sha256: 74dc14117c2685fc83e9d248ad82435d394048455e349c1f1278441ccef83304

Contents?: true

Size: 705 Bytes

Versions: 4

Compression:

Stored size: 705 Bytes

Contents

module Timeasure
  module Profiling
    class ReportedMethod
      attr_reader :klass_name, :method_name, :segment, :metadata, :full_path, :method_path, :runtime_sum, :call_count

      def initialize(measurement)
        @klass_name = measurement.klass_name
        @method_name = measurement.method_name
        @segment = measurement.segment
        @metadata = measurement.metadata
        @full_path = measurement.full_path
        @method_path = measurement.method_path

        @runtime_sum = 0
        @call_count = 0
      end

      def increment_runtime_sum(runtime)
        @runtime_sum += runtime
      end

      def increment_call_count
        @call_count += 1
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
timeasure-0.2.1 lib/timeasure/profiling/reported_method.rb
timeasure-0.2.0 lib/timeasure/profiling/reported_method.rb
timeasure-0.1.1 lib/timeasure/profiling/reported_method.rb
timeasure-0.1.0 lib/timeasure/profiling/reported_method.rb