Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed a bug in url regexp and added a test suite to cover it, also ad…
…ded a test suite for --follow-links option, changed the way options are parsed - now it's possible to specify both '-n100 -c20' and '-n 100 -c 25', releasing 0.0.3
- Loading branch information
Dmitrii Samoilov
committed
Apr 12, 2011
1 parent
c1d64a0
commit 39ccb2e
Showing
8 changed files
with
67 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
v0.0.3 fixed a bug in url regexp and added a test suite to cover it, also added a test suite for --follow-links option, changed the way options are parsed - now it's possible to specify both "-n100 -c20" and "-n 100 -c 25" | ||
|
||
v0.0.2 deleted trollop gem as a requirement, added nokogiri dependency to gemspec, added MIT license file, fixed small issue with benchmarked site's url, added wrong site address handling [06-04-2011] | ||
|
||
v0.0.1. first release [05-04-2011] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
Simple tool to benchmark sites (rpm, response time, etc) | ||
|
||
SIMPLE USAGE | ||
EXAMPLES: | ||
|
||
3 concurrent threads and 100 total requests: | ||
nethttp_ab -n 100 -c 3 http://www.yoursite.com | ||
nethttp_ab -n100 -c3 http://www.yoursite.com | ||
|
||
OR simulate user and follow all local links on the page: | ||
OR simulate one user and follow all local links on the page: | ||
nethttp_ab -f http://localhost:3000 | ||
|
||
simulate 3 users (all local links on the page will be visited once) | ||
nethttp_ab --follow_links -c3 http://localhost:3000 | ||
|
||
Issue tracker: https://github.com/german/nethttp_ab/issues | ||
|
||
|
||
Copyright © 2011 Dmitrii Samoilov, released under the MIT license |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
require 'test/unit' | ||
|
||
require File.dirname(File.expand_path(__FILE__)) + '/../lib/requester.rb' | ||
|
||
class UrlRegexpTest < Test::Unit::TestCase | ||
def setup | ||
@fail_urls = %w{www./yandex.ru yandex.123ru germaninthetown@gmail.com abcde} | ||
|
||
@correct_urls = %w{www.google.com google.com http://google.com http://mail.ya.ru mail.ya.ru/ mail.ya.ru/test http://www.my-site.org/articles/2011/04/12/123-nethttpab-is-great} | ||
end | ||
|
||
def test_url_regexp | ||
@correct_urls.each do |correct_url| | ||
assert(correct_url =~ NethttpAb::Requester::URL_REGEXP) | ||
end | ||
|
||
@fail_urls.each do |fail_url| | ||
assert(fail_url !~ NethttpAb::Requester::URL_REGEXP) | ||
end | ||
end | ||
end |