Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 122 lines (87 sloc) 4.658 kb
b505224 @paulosuzart README
authored
1 Intro
2 =====
3
c1fa575 @paulosuzart standalone mode enable
authored
4 gb is a stress test tool based on [Apache Benchmark](http://httpd.apache.org/docs/2.0/programs/ab.html "ab"). It has zero dependencies, so you should be able to build the project and start using it.
b505224 @paulosuzart README
authored
5
29ea49e @paulosuzart readme
authored
6 Architecture
7 ============
b505224 @paulosuzart README
authored
8
29ea49e @paulosuzart readme
authored
9 The figure bellow depicts the distributed architeture behind gb:
10
a9ac9c6 @paulosuzart Fixer image URL
authored
11 ![gb](https://raw.githubusercontent.com/paulosuzart/gb/master/arch.jpg)
29ea49e @paulosuzart readme
authored
12
0b7fe68 @paulosuzart readme
authored
13 Note that distributed gb is optional. You can run it in standalone mode.
14
29ea49e @paulosuzart readme
authored
15 Using it
16 ========
053da41 @paulosuzart forgoten Makefile and a better README
authored
17
18 Before, clone the project and build it:
19
20 git clone git@github.com:paulosuzart/gb.git
21 gomake
22
a639b66 @paulosuzart README fix
authored
23 You can also use `goinstall github.com/paulosuzart/gb`. `goinstall` will put a compile gb to you `$GOROOT/bin` after clonning the git repo to `$GOROOT/src/pkg/github.com`.
053da41 @paulosuzart forgoten Makefile and a better README
authored
24
25
b505224 @paulosuzart README
authored
26 Running gb in Master/Workers mode:
27
f4589af @paulosuzart README
authored
28 Run, say, two Workers:
29
39aac61 @paulosuzart README
authored
30 ./gb -M worker -H localhost:1978
31 ./gb -M worker -H localhost:1977
b505224 @paulosuzart README
authored
32
33 They should print something like:
34
39aac61 @paulosuzart README
authored
35 2011/05/15 13:23:22 Starting in worker mode
36 2011/05/15 13:23:22 Setting up a Localworker...
37 2011/05/15 13:23:22 Waiting for tasks...
b505224 @paulosuzart README
authored
38
39 Now you are able to run the Master:
d9b9bab @paulosuzart readme update
authored
40
49402bf @paulosuzart timout added. many improvements
authored
41 ./gb -M master -W localhost:1978,localhost:1979 -c 2 -n 20 -T 70
b505224 @paulosuzart README
authored
42
43 Note: Every Worker should be up and running before starting the master
44
45 The Master should print something like:
46
49402bf @paulosuzart timout added. many improvements
authored
47 2011/05/18 00:38:19 Starting in master mode
48 2011/05/18 00:38:19 Starting Master...
f6ebe7a @paulosuzart update readme
authored
49 2011/05/18 00:38:19 TEST SESSION {1311125723245295000 700000000
50 2011/05/18 00:38:19 2 ProxyWorker(s) may be used by gb
49402bf @paulosuzart timout added. many improvements
authored
51 2011/05/18 00:38:19 Setting up a ProxyWorker for localhost:1978
52 2011/05/18 00:38:19 Setting up a ProxyWorker for localhost:1979
53 2011/05/18 00:38:19 2 ProxyWorker(s) may be used by gb
54 2011/05/18 00:38:19 Tasks distributed. Waiting for summaries...
55 2011/05/18 00:38:19
56 =========================================================================
eb69a52 @paulosuzart fixed readme
authored
57 Test Summary (gb. Version: 0.0.2 beta)
49402bf @paulosuzart timout added. many improvements
authored
58 -------------------------------------------------------------------------
c8a4e27 @paulosuzart grammar fix
authored
59 Total Go Benchmark Time | 60.768 milisecs
60 Requests Performed | 20
61 Requests Lost | 0
30303ca @paulosuzart Bug fix
authored
62 Target supports (reqs/s) | ~272
c8a4e27 @paulosuzart grammar fix
authored
63 Average Response Time | 4.7511 milisecs
64 Max Response Time | 18.089 milisecs
65 Min Response Time | 1.528 milisecs
66
b505224 @paulosuzart README
authored
67
68 At the same time Workers should print:
69
49402bf @paulosuzart timout added. many improvements
authored
70 2011/05/18 00:38:14 Starting in worker mode
71 2011/05/18 00:38:14 Waiting for tasks...
72 2011/05/18 00:38:19 Task Received from localhost:1970
73 2011/05/18 00:38:19 Summary sent to localhost:1970
b505224 @paulosuzart README
authored
74
75 `netchan import: header:EOF` is a Go log.
76
77 Parameters
78 ==========
79
80 Available parameters by now are:
81
49402bf @paulosuzart timout added. many improvements
authored
82 * `-c concurrent`. Number of clients to perform the requests.
053da41 @paulosuzart forgoten Makefile and a better README
authored
83 * `-C Content-Type`. Http header to be sent.
49402bf @paulosuzart timout added. many improvements
authored
84 * `-n requests`. Number of request each client should perform.
85 * `-A username:password`. For Http Basic Authentication.
86 * `-M mode`: standalone, master, worker.
d9b9bab @paulosuzart readme update
authored
87 * `-H host`: Used for identify the host running gb. No effect in standalone mode. Default is ($hostname):1970.
49402bf @paulosuzart timout added. many improvements
authored
88 * `-W workers addresses`: Used for distributed gb. Separated by comma.
89 * `-T max time`: Max time in milisecs for gb execution.
053da41 @paulosuzart forgoten Makefile and a better README
authored
90 * `-t target`. Target http server. The protocol is mandatory.
2619d06 @paulosuzart Added support for Cookie with -O flag
authored
91 * `-O cookie`. cookie-name=value. A Cookie Header to be added to request.
b505224 @paulosuzart README
authored
92
5ca1d86 @paulosuzart readme
authored
93 Licensing?
b505224 @paulosuzart README
authored
94 ==========
832d98b @paulosuzart license added. timout for workers with masterChann cache.
authored
95 Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
b505224 @paulosuzart README
authored
96
97
98 TODO
99 ====
1093982 @paulosuzart todo added
authored
100 * Websocket to report in real time the status of request. A browser will be
b505224 @paulosuzart README
authored
101 welcome.
f6ebe7a @paulosuzart update readme
authored
102 * Test coverage using a go test server to ensure all the options provided by GB (URGENT).
832d98b @paulosuzart license added. timout for workers with masterChann cache.
authored
103 * Timeout for workers and Master. **DONE!**
1093982 @paulosuzart todo added
authored
104 * Distribute workers using a worker mode for gb. **DONE!**
92fe502 @paulosuzart Added support to POST if Content-Type (-C) is present.
authored
105 * Cover HTTP POST. **DONE!** Now the usage of `-C` sets the method to POST.
2619d06 @paulosuzart Added support for Cookie with -O flag
authored
106 * Support for cookies. **DONE!** Need some improvements.
92fe502 @paulosuzart Added support to POST if Content-Type (-C) is present.
authored
107 * File upload.
108 * POST data file.
1093982 @paulosuzart todo added
authored
109 * Request parameters by csv file
c6d5fab @paulosuzart removing some ifs
authored
110 * Enable standalone mode again. **DONE!**
71c7bc8 @paulosuzart readme fix
authored
111 * Improve netchan.Importer usage in worker mode. **DONE! Now workers keeps the channel open for masters no more than -M. after -M the worker closes the Test session (imported channel) by its own, avoiding holding the dead channel forever.**
35d35d8 @paulosuzart moved contributor information to contributing section
authored
112
113 CONTRIBUTING
114 ============
115 You can contribute with your code at any time. Just make your pull request like:
116
117
118 - [andrewzeneski](https://github.com/andrewzeneski) made gb compatible with go0.6
119 - [mattn](https://github.com/mattn) made changes necessary to make it compatible with go1.3 and the absence of `netchan` package in the starndard lib.
120 and .
121
Something went wrong with that request. Please try again.