Sha256: 0b8ddda6561a09c011fa361591366fb7285887ada18ad36fd816f3e1900b7ad8

Contents?: true

Size: 548 Bytes

Versions: 6

Compression:

Stored size: 548 Bytes

Contents

require "vagrant-aws/util/timer"

module VagrantPlugins
  module AWS
    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)
          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

6 entries across 6 versions & 1 rubygems

Version Path
vagrant-aws-0.2.1 lib/vagrant-aws/action/timed_provision.rb
vagrant-aws-0.2.0 lib/vagrant-aws/action/timed_provision.rb
vagrant-aws-0.1.3 lib/vagrant-aws/action/timed_provision.rb
vagrant-aws-0.1.2 lib/vagrant-aws/action/timed_provision.rb
vagrant-aws-0.1.1 lib/vagrant-aws/action/timed_provision.rb
vagrant-aws-0.1.0 lib/vagrant-aws/action/timed_provision.rb