Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/technicalpickles/capistrano-benchmark
Benchmarking for capistrano tasks
https://github.com/technicalpickles/capistrano-benchmark
Last synced: 3 months ago
JSON representation
Benchmarking for capistrano tasks
- Host: GitHub
- URL: https://github.com/technicalpickles/capistrano-benchmark
- Owner: technicalpickles
- License: mit
- Created: 2011-10-20T02:45:56.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2013-05-17T02:11:46.000Z (over 11 years ago)
- Last Synced: 2024-03-25T08:21:29.263Z (9 months ago)
- Language: Ruby
- Homepage:
- Size: 223 KB
- Stars: 8
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.rdoc
- License: LICENSE.txt
Awesome Lists containing this project
README
= capistrano-benchmark
Getting more timing data about your capistrano-tasks. Out of the box, capistrano does include some timing data, particularly for local and remote commands, but not for tasks as a whole.
capistrano-benchmark aims to provide a quick and dirty way to do this.
== Installation
You know the drill:
gem install capistrano-benchmark
== Setup
You can either set this up on a per project basis, or globally on a system.
# Project-specific -- config/deploy.rb
require 'capistrano-benchmark'# Global system -- ~/.caprc
require 'capistrano-benchmark'Timing data isn't showed by default, and respects the ':benchmark' variable. There's a convience task for toggling this:
cap production benchmark deploy
If you want this to happen always, you can set this variable yourself:
# config/deploy.rb
set :benchmark, trueIf you want to see a summarized benchmark report printed at the end:
# config/deploy.rb
after "deploy", "benchmark:report"== Implementation notes
`apistrano-benchmark works by alias chaining Capistrano::Configuration's execute_task to use ruby's built in `Benchmark` to time how long a real task works. Quick and dirty, but it gets the job done.
This is the same pattern as rails's alias\_method\_chain, so ideally this wouldn't really interfer with anything.
== Contributing to capistrano-benchmark
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
* Fork the project
* Start a feature/bugfix branch
* Commit and push until you are happy with your contribution
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.== Copyright
Copyright (c) 2011 Josh Nichols. See LICENSE.txt for further details.