blob: da52728e0d2724e46f92ec8715d5c3b8e0ea7f78 [file] [log] [blame]
<?xml version="1.0"?>
<!DOCTYPE flood SYSTEM "flood.dtd">
<!-- Hi, I'm a flood config file. They call me "round-robin.xml"
I am an example of a "round-robin" configuration. All of the URLs in
the urllist "Test Hosts" will be hit in sequential order.
Flood's syntax is XML based.
After compiling flood (./configure && make), you can execute me as:
./flood examples/round-robin.xml
(The path to me.)
Flood will then output data to stdout in the format as specified below
(relative_times) for each URL that it hits:
998951597871780 1389 57420 7960273 7960282 OK 4
The columns are as follows:
- Absolute Time in usec that the request was started by flood
- Relative Time in usec (to first column) that it took to open the socket
to the specified server
- Relative Time in usec (to first column) that it took to write the
generated request to the server.
- Relative Time in usec (to first column) that it took to read the
generated response from the server.
- Relative Time in usec (to first column) that it took to close the
socket. On a keepalive socket, it may not close the socket.
- OK/FAIL indicates what the verification module (in this case,
verify_200) thought of the request.
- The thread/process id of the farmer that made the request.
- The URL that was hit (without query strings)
To get a "nice" summary of the output (as well as an idea of how to
further process this info), try out:
./flood examples/round-robin.xml > my-output
./examples/analyze-relative my-output
<flood configversion="1">
<!-- A urllist describes which hosts and which methods we want to hit. -->
<name>Test Hosts</name>
<description>A bunch of hosts we want to hit</description>
<!-- We first send a POST request to looking for "foo"
Notice the payload attribute - this allows us to specify the POST
content. -->
<url method="POST" payload="version=2&amp;keyword=foo&amp;results=20&amp;"></url>
<!-- Then, we perform a HEAD request on -->
<url method="HEAD"></url>
<!-- Then, we retrieve the index page of -->
<url method="GET"></url>
<!-- The default method is "GET", so let's get APR's index page. -->
<!-- The profile describes how we will hit the urllists. For this
example, we execute with the round_robin profile.
Round robin runs all of the URLs in the urllist in order once. -->
<name>Example Profile</name>
<description>A Test Round Robin Configuration</description>
<!-- See above. This indicates which URLs we will hit. -->
<useurllist>Test Hosts</useurllist>
<!-- Specifies that we will use round_robin profile logic -->
<!-- Specifies that we will use generic socket logic
We also have "keepalive" as an option - this option indicates that
we should attempt to use HTTP Keepalive when available. -->
<!-- Specifies that we will use verify_200 for response verification
This verification step ensures that we received a 2xx or 3xx
status code from the server. -->
<!-- Specifies that we will use the "relative_times" report generation
We also have "easy" - this option is similar to "relative_times",
but the times posted are absolute instead of relative to the start
of the request. -->
<!-- A farmer runs one profile a certain number of times. This farmer is
called Joe. -->
<!-- We run the Joe farmer 5 times
Note that we have the "time" option which indicates for how many
seconds a farmer should run. The "time" and "count" elements are
exclusive. -->
<!-- Farmer Joe uses this profile -->
<useprofile>Example Profile</useprofile>
<!-- A farm contains a bunch of farmers - each farmer is an independent
worker (i.e. a thread or child process). -->
<!-- We call our farm "Bingo" - note that the farm must be called Bingo
in the current implementation. -->
<!-- We will start 5 farmers named Joe. We will start 2 farmers every 5
seconds. -->
<usefarmer count="5" startcount="2" startdelay="5">Joe</usefarmer>
<!-- Set the seed to a known value so we can reproduce the same tests.
Flood uses a seeded PRNG - this allows the tests which use random
numbers to be reproduced. -->
<!-- That's all folks! -->