Sha256: 013934a7401dde3a8be72980881ee31f0562c97f4bb0ad71f7b382c55c7b636b

Contents?: true

Size: 408 Bytes

Versions: 618

Compression:

Stored size: 408 Bytes

Contents

require 'spec_helper'
require 'puppet/util/profiler'

describe Puppet::Util::Profiler::WallClock do

  it "logs the number of seconds it took to execute the segment" do
    profiler = Puppet::Util::Profiler::WallClock.new(nil, nil)

    message = profiler.do_finish(profiler.start(["foo", "bar"], "Testing"), ["foo", "bar"], "Testing")[:msg]

    expect(message).to match(/took \d\.\d{4} seconds/)
  end
end

Version data entries

618 entries across 618 versions & 1 rubygems

Version Path
puppet-8.3.0 spec/unit/util/profiler/wall_clock_spec.rb
puppet-8.3.0-x86-mingw32 spec/unit/util/profiler/wall_clock_spec.rb
puppet-8.3.0-x64-mingw32 spec/unit/util/profiler/wall_clock_spec.rb
puppet-8.3.0-universal-darwin spec/unit/util/profiler/wall_clock_spec.rb
puppet-8.4.0 spec/unit/util/profiler/wall_clock_spec.rb
puppet-8.4.0-x86-mingw32 spec/unit/util/profiler/wall_clock_spec.rb
puppet-8.4.0-x64-mingw32 spec/unit/util/profiler/wall_clock_spec.rb
puppet-8.4.0-universal-darwin spec/unit/util/profiler/wall_clock_spec.rb
puppet-7.28.0 spec/unit/util/profiler/wall_clock_spec.rb
puppet-7.28.0-x86-mingw32 spec/unit/util/profiler/wall_clock_spec.rb
puppet-7.28.0-x64-mingw32 spec/unit/util/profiler/wall_clock_spec.rb
puppet-7.28.0-universal-darwin spec/unit/util/profiler/wall_clock_spec.rb
puppet-8.3.1 spec/unit/util/profiler/wall_clock_spec.rb
puppet-8.3.1-x86-mingw32 spec/unit/util/profiler/wall_clock_spec.rb
puppet-8.3.1-x64-mingw32 spec/unit/util/profiler/wall_clock_spec.rb
puppet-8.3.1-universal-darwin spec/unit/util/profiler/wall_clock_spec.rb
puppet-7.27.0 spec/unit/util/profiler/wall_clock_spec.rb
puppet-7.27.0-x86-mingw32 spec/unit/util/profiler/wall_clock_spec.rb
puppet-7.27.0-x64-mingw32 spec/unit/util/profiler/wall_clock_spec.rb
puppet-7.27.0-universal-darwin spec/unit/util/profiler/wall_clock_spec.rb