A small ruby gem that exposes a cli to check status of a website. After probing the website for one minute every ten seconds it prints the average response time.
This gem would be looking to do the average like in apache benchmark.
For Example:
ab -k -c 1 -n 1 -t 60 -s 10 https://www.gitlab.com/
Add this line to your application's Gemfile:
gem 'one_minute_ping'
And then execute:
bundle
Or install it yourself as:
gem install one_minute_ping
bundle exec exe/one_minute_ping for https://www.gitlab.com/
Sample Output:
Server Hostname: https://www.gitlab.com/
Counted requests: 6
Time taken for tests: 6.025 seconds
Time for status 308: 561.648 [ms] (mean, only per all responses with status 308)
Time per request: 561.648 [ms] (mean, across all concurrent requests)
bundle exec exe/one_minute_ping for https://www.about.gitlab.com/
Would Output:
Server Hostname: https://www.about.gitlab.com/
Counted requests: 6
Time taken for tests: 6.025 seconds
Time for status 308: 561.648 [ms] (mean, only per all responses with status 308)
Time per request: 561.648 [ms] (mean, across all concurrent requests)
rake build
rake install
After install there should be a new CLI command:
one_minute_ping
which now you can call simply:
one_minute_ping for https://www.about.gitlab.com/
rake
and with coverage
deep-cover exec rspec
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 install this gem onto your local machine,
run bundle exec rake install
.
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 rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://gitlab.com/jesusalc/one_minute_ping/issues
- Create your feature branch (
git checkout -b my-new-feature
) - Create tests (
rake
) - Pass your tests (
deep-cover exec rspec
) - Check with Rubocop (
bundle exec rubocop -a
) - Commit your changes (
git commit -am "Add some feature"
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request