Sha256: 2e595b31247c4454321c8a0a6f03e937b4aa94e9997bb55dda9bdfa77a721795

Contents?: true

Size: 590 Bytes

Versions: 9

Compression:

Stored size: 590 Bytes

Contents

require "vagrant-cloudstack/util/timer"

module VagrantPlugins
  module Cloudstack
    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, pname, p)
          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

9 entries across 9 versions & 1 rubygems

Version Path
vagrant-cloudstack-1.5.2 lib/vagrant-cloudstack/action/timed_provision.rb
vagrant-cloudstack-1.5.1 lib/vagrant-cloudstack/action/timed_provision.rb
vagrant-cloudstack-1.5.0 lib/vagrant-cloudstack/action/timed_provision.rb
vagrant-cloudstack-1.4.0 lib/vagrant-cloudstack/action/timed_provision.rb
vagrant-cloudstack-1.1.0 lib/vagrant-cloudstack/action/timed_provision.rb
vagrant-cloudstack-1.0.0 lib/vagrant-cloudstack/action/timed_provision.rb
vagrant-cloudstack-0.10.0 lib/vagrant-cloudstack/action/timed_provision.rb
vagrant-cloudstack-0.9.1 lib/vagrant-cloudstack/action/timed_provision.rb
vagrant-cloudstack-0.9.0 lib/vagrant-cloudstack/action/timed_provision.rb