Vagrant plugin to dump timing information about commands

gem install vagrant-timer -v 0.1.2



The vagrant-timer vagrant plugin allows you to capture diagnostic logging about the duration that various vagrant actions take, and save them to a file for later analysis.

Each line of the log file is a JSON object with the following keys:

The name of the base vagrant box being run
    The hook being executed. Documented
    <a href="">by Vagrant</a>

<dd>ISO 8601 timestame recording the time that the hook was initialized</dd>

<dd>ISO 8601 timestame recording the time that the hook was called</dd>

<dd>ISO 8601 timestame recording the time that the hook call ended</dd>

<dd>Duration in seconds from the time the hook was initialized to when it was called</dd>

<dd>Duration in seconds from the start of the hook call to the end of the hook call</dd>


Run vagrant plugin install vagrant-timer


Set the environment variable VAGRANT_TIMER_LOG to a filename to record the durations of all executed vagrant actions. The log messages will be appended to the specified file. If the variable is unset, no messages will be logged.

The log file name may include formatting variables understood by strftime. These will be interpolated with the start time of the event. For example, if VAGRANT_TIMER_LOG = .vagrant-logs/%Y-%m-%d.log, then an event that happens on July 21st, 2016 will end up in the log file .vagrant-logs/2016-07-21.log.


After checking out the repo, run bin/setup to install dependencies. You can also run bin/console for an interactive prompt that will allow you to experiment.

To run this plugin locally, use bundle exec vagrant <some command>. This will use the local Vagrantfile in the current repository. To install the plugin in your local vagrant environment without publishing to, do the following:

$ rake build
$ bundle cache --all
$ cp pkg/*.gem vendor/cache
$ mv vendor/cache vendor/gems
$ gem generate_index -d vendor
$ vagrant plugin install vagrant-timer --plugin-source=file://$(pwd)/vendor

To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to


Bug reports and pull requests are welcome on GitHub at