Sha256: b5f073ce5dae9079cad7ded232c638aa7da7d49844dafff2c191e9b53aef9b15
Contents?: true
Size: 688 Bytes
Versions: 2
Compression:
Stored size: 688 Bytes
Contents
# # Author:: Mohit Sethi (<mohit@sethis.in>) # Copyright:: Copyright (c) 2013 Mohit Sethi. # require "vagrant-hp/util/timer" module VagrantPlugins module HP 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, p) env[:ui].info("Insde TimedProvision") timer = Util::Timer.time do super end env[:metrics] ||= {} env[:metrics]["provisioner_times"] ||= [] env[:metrics]["provisioner_times"] << [p.class.to_s, timer] end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
vagrant-hp-0.1.2 | lib/vagrant-hp/action/timed_provision.rb |
vagrant-hp-0.1.1 | lib/vagrant-hp/action/timed_provision.rb |