Class: VagrantPlugins::Skytap::Action::TimedProvision

Inherits:
Vagrant::Action::Builtin::Provision
  • Object
show all
Defined in:
lib/vagrant-skytap/action/timed_provision.rb

Overview

This is the same as the builtin provision except it times the provisioner runs.

Instance Method Summary collapse

Instance Method Details

#run_provisioner(env, name, p) ⇒ Object


9
10
11
12
13
14
15
16
17
# File 'lib/vagrant-skytap/action/timed_provision.rb', line 9

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