Sha256: a79db4840170ec3744d0efbfbccd300b086f2d77712b9e85aa64f175c853406c

Contents?: true

Size: 430 Bytes

Versions: 20

Compression:

Stored size: 430 Bytes

Contents

# frozen_string_literal: true
require_relative '../../../puppet/util/profiler/logging'

class Puppet::Util::Profiler::ObjectCounts < Puppet::Util::Profiler::Logging
  def start
    ObjectSpace.count_objects
  end

  def finish(before)
    after = ObjectSpace.count_objects

    diff = before.collect do |type, count|
      [type, after[type] - count]
    end

    diff.sort.collect { |pair| pair.join(': ') }.join(', ')
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
puppet-8.3.0 lib/puppet/util/profiler/object_counts.rb
puppet-8.3.0-x86-mingw32 lib/puppet/util/profiler/object_counts.rb
puppet-8.3.0-x64-mingw32 lib/puppet/util/profiler/object_counts.rb
puppet-8.3.0-universal-darwin lib/puppet/util/profiler/object_counts.rb
puppet-8.3.1 lib/puppet/util/profiler/object_counts.rb
puppet-8.3.1-x86-mingw32 lib/puppet/util/profiler/object_counts.rb
puppet-8.3.1-x64-mingw32 lib/puppet/util/profiler/object_counts.rb
puppet-8.3.1-universal-darwin lib/puppet/util/profiler/object_counts.rb
puppet-8.2.0 lib/puppet/util/profiler/object_counts.rb
puppet-8.2.0-x86-mingw32 lib/puppet/util/profiler/object_counts.rb
puppet-8.2.0-x64-mingw32 lib/puppet/util/profiler/object_counts.rb
puppet-8.2.0-universal-darwin lib/puppet/util/profiler/object_counts.rb
puppet-8.1.0 lib/puppet/util/profiler/object_counts.rb
puppet-8.1.0-x86-mingw32 lib/puppet/util/profiler/object_counts.rb
puppet-8.1.0-x64-mingw32 lib/puppet/util/profiler/object_counts.rb
puppet-8.1.0-universal-darwin lib/puppet/util/profiler/object_counts.rb
puppet-8.0.1 lib/puppet/util/profiler/object_counts.rb
puppet-8.0.1-x86-mingw32 lib/puppet/util/profiler/object_counts.rb
puppet-8.0.1-x64-mingw32 lib/puppet/util/profiler/object_counts.rb
puppet-8.0.1-universal-darwin lib/puppet/util/profiler/object_counts.rb