Sha256: 32aeb3e0bd881f522ddb3faf9481a733476e403cad7461b446a63359153abe30
Contents?: true
Size: 698 Bytes
Versions: 8
Compression:
Stored size: 698 Bytes
Contents
require "vagrant-libvirt/util/timer" module VagrantPlugins module ProviderLibvirt 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) env[:ui].info(I18n.t("vagrant.actions.vm.provision.beginning", :provisioner => name)) 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
8 entries across 8 versions & 1 rubygems