Sha256: 5a45504c605f8d0961d2b2f509f762571f6ae39fc84c535355baf24cced6e9c1

Contents?: true

Size: 550 Bytes

Versions: 16

Compression:

Stored size: 550 Bytes

Contents

require "vagrant-shell/util/timer"

module VagrantPlugins
  module Shell
    module Action
      # This is the same as the builtin provision except it times the
      # provisioner runs.
      class TimedProvision < Vagrant::Action::Builtin::Provision
        def run_provisioner(env, name, p)
          timer = Util::Timer.time do
            super
          end

          env[:metrics] ||= {}
          env[:metrics]["provisioner_times"] ||= []
          env[:metrics]["provisioner_times"] << [name, timer]
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
vagrant-shell-0.2.22 lib/vagrant-shell/action/timed_provision.rb
vagrant-shell-0.2.21 lib/vagrant-shell/action/timed_provision.rb
vagrant-shell-0.2.20 lib/vagrant-shell/action/timed_provision.rb
vagrant-shell-0.2.19 lib/vagrant-shell/action/timed_provision.rb
vagrant-shell-0.2.17 lib/vagrant-shell/action/timed_provision.rb
vagrant-shell-0.2.16 lib/vagrant-shell/action/timed_provision.rb
vagrant-shell-0.2.15 lib/vagrant-shell/action/timed_provision.rb
vagrant-shell-0.2.14 lib/vagrant-shell/action/timed_provision.rb
vagrant-shell-0.2.13 lib/vagrant-shell/action/timed_provision.rb
vagrant-shell-0.2.12 lib/vagrant-shell/action/timed_provision.rb
vagrant-shell-0.2.9 lib/vagrant-shell/action/timed_provision.rb
vagrant-shell-0.2.8 lib/vagrant-shell/action/timed_provision.rb
vagrant-shell-0.2.6 lib/vagrant-shell/action/timed_provision.rb
vagrant-shell-0.2.5 lib/vagrant-shell/action/timed_provision.rb
vagrant-shell-0.2.4 lib/vagrant-shell/action/timed_provision.rb
vagrant-shell-0.2.3 lib/vagrant-shell/action/timed_provision.rb