Log of /httpd/flood/trunk/flood_round_robin.c
Parent Directory
|
Revision Log
Revision
696055 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Tue Sep 16 21:01:30 2008 UTC
(15 years, 10 months ago)
by
jerenkrantz
File length: 49777 byte(s)
Diff to
previous 695998
(
colored)
Fix up various compiler warnings.
* flood_net_ssl.c, flood_net_ssl.h
(ssl_read_socket): Switch from int to apr_size_t.
* flood_socket_keepalive.c
(keepalive_read_chunk, keepalive_load_resp, keepalive_recv_resp): Switch
from int to apr_size_t.
* flood_round_robin.c
(round_robin_postprocess): Switch from int to apr_size_t.
* flood_net.c, flood_net.h
(read_socket): Switch from int to apr_size_t.
Revision
695998 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Tue Sep 16 18:28:46 2008 UTC
(15 years, 10 months ago)
by
jerenkrantz
File length: 49770 byte(s)
Diff to
previous 653656
(
colored)
Fix compilation errors with newer gcc versions.
* flood_round_robin.c
(round_robin_profile_init): Give compiler a bigger clue about what to cast.
Submitted by: Ohad Lutzky
Reviewed by: jerenkrantz
Revision
647747 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Mon Apr 14 12:14:03 2008 UTC
(16 years, 4 months ago)
by
wrowe
Original Path:
httpd/test/trunk/flood/flood_round_robin.c
File length: 49766 byte(s)
Diff to
previous 490946
(
colored)
Implement a random substitution feature; requires a requesttemplate,
one or more substitution variables of the form ${varname) in the
requesttemplate and a substitution file formatted with one value
per newline delimited line (more than one variable per URL permitted).
The variables and files are referred to as subst variables and subst
files. Each time the URL is sent the subst variable is replaced with
one line randomly selected from the subst file. Any part of the
requesttemplate can be randomly substituted, protocol, host, port, etc.
The algorithm tries to make the creation time of the substitution
independent of the size of the subst file. The randomness of the
selection can be adversely impacted if the sizes of the different
entries in the subst file vary considerably.
Submitted by: Guy Ferraiolo <guyf cnet.com>
Revision
490946 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Fri Dec 29 07:49:58 2006 UTC
(17 years, 7 months ago)
by
jerenkrantz
Original Path:
httpd/test/trunk/flood/flood_round_robin.c
File length: 45042 byte(s)
Diff to
previous 490939
(
colored)
Update flood to the new license header.
* flood/NOTICE: Update the copyright year to the date of first publication.
* flood/flood_farmer.c, flood/flood_report_relative_times.h,
flood/flood_simple_reports.h, flood/flood_test.c, flood/flood.c,
flood/flood_farmer.h, flood/flood_socket_generic.c, flood/flood_farm.c,
flood/flood_socket_generic.h, flood/flood_farm.h, flood/flood_config.c,
flood/flood_net_ssl.c, flood/flood_config.h, flood/flood_net_ssl.h,
flood/flood_socket_keepalive.c, flood/flood_easy_reports.c,
flood/flood_round_robin.c, flood/flood_socket_keepalive.h,
flood/flood_easy_reports.h, flood/flood_round_robin.h, flood/flood_net.c,
flood/flood_net.h, flood/flood_profile.c, flood/flood_profile.h,
flood/flood_report_relative_times.c, flood/flood_simple_reports.c:
Update to new license header.
(Used committers/relicense/src/perl/update-AL20.pl)
Revision
490939 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Fri Dec 29 07:34:12 2006 UTC
(17 years, 7 months ago)
by
jerenkrantz
Original Path:
httpd/test/trunk/flood/flood_round_robin.c
File length: 44859 byte(s)
Diff to
previous 490925
(
colored)
Better support Win32/VS2005 out-of-the-box with trunk.
* flood_farm.c
(run_farm): Accept APR_INCOMPLETE from apr_thread_join for Win32.
* flood/flood_pcre.c, flood/flood_pcre.h: Import PCRE wrappers from httpd.
* flood/flood_round_robin.c: Bring in PCRE wrappers if needed.
* flood/NOTICE: Update; note PCRE wrappers inclusion.
* flood/flood.vcproj: Add VS2005 project file.
Revision
394795 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Mon Apr 17 22:32:59 2006 UTC
(18 years, 3 months ago)
by
jerenkrantz
Original Path:
httpd/test/trunk/flood/flood_round_robin.c
File length: 44764 byte(s)
Diff to
previous 106525
(
colored)
Add extraheader, payloadfile attribute to url element; also support custom HTTP
methods.
(This lets flood passably mimic WebDAV requests.)
* flood_round_robin.c
(url_t): Add method_string, extra_headers fields.
(round_robin_create_req): Add short-cut to ->extra_headers field; simplify
request creation based on methods and add in extra headers if present;
(parse_xml_url_info): Set method_string on all variants; support
payloadfile attribute to load the entire payload from a file; include any
extra headers - delimit multiple headers with ; for now.
(round_robin_get_next_url): Fix whitespace.
* flood_profile.h
(method_e): Denote 'other' methods.
* config.h.in
(XML_URLLIST_PAYLOAD_FILE, XML_URLLIST_EXTRA_HEADERS): Define.
Revision
98528 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Wed Jan 29 06:16:59 2003 UTC
(21 years, 6 months ago)
by
jerenkrantz
Original Path:
httpd/test/trunk/flood/flood_round_robin.c
File length: 38120 byte(s)
Diff to
previous 96834
(
colored)
Fixed PASSTHROUGH collision in flood_round_robin.c.
This patch fixes compile errors in flood_round_robin.c
resulting from the Windows header file wingdi.h. That
header file defines PASSTHROUGH, which is the same
identifier used as an enumerated constant for type
expand_param_e. The enumerated constants now use a
prefix, "EPE_", to help make their names more unique.
Below are the compile errors this patch addresses:
<snip>
Submitted by: Phi-Long Tran <ptran@pobox.com>
Reviewed by: Justin Erenkrantz
Revision
94026 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Wed Mar 20 01:35:11 2002 UTC
(22 years, 4 months ago)
by
jerenkrantz
Original Path:
httpd/test/trunk/flood/flood_round_robin.c
File length: 33232 byte(s)
Diff to
previous 92717
(
colored)
* Introduce sequence tag to urllist element. See CHANGES for description.
* Remove shadow declaration of stat in flood_round_robin.c.
* Factor out handling of URI XML fields so that the sequence tag can
function properly.
* Move around handle_parse_elem so that the sequence code can call it.
Note that in order to calculate how many *real* URLs there will be,
we have to parse the sequence tag twice. This isn't a big deal since
this will be done when initializing the profile not during request
processing itself.
Revision
90276 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Fri Aug 17 07:44:02 2001 UTC
(23 years ago)
by
jerenkrantz
Original Path:
httpd/test/trunk/flood/flood_round_robin.c
File length: 28036 byte(s)
Diff to
previous 90164
(
colored)
- Clean up debugging info when using delays.
- Fix error where a url would be chopped off (must follow l.list of apr_text
objects to be valid). This should not affect attributes as they are
handled differently by the expat XML parser.
- Introduce two more random number generators (rand48 and random). Add
autoconf test to choose "best" one. May be good to add support for
/dev/urandom (whatever the non-blocking one is), but Solaris doesn't have
it, so I don't care much right now.
The rand() period is incredibly short. rand48 and random are supposed to
have much longer periods. We'll see...
Revision
90164 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Tue Aug 14 20:14:50 2001 UTC
(23 years ago)
by
jerenkrantz
Original Path:
httpd/test/trunk/flood/flood_round_robin.c
File length: 27936 byte(s)
Diff to
previous 90026
(
colored)
Rewrite the expression/template code to use variable names (backed by a
hash table) and allow use of regular expressions for the response
template.
The new syntax is as follows:
${foo} substitutes foo's value.
${=foo} generates a random number and stores it in foo and substitutes it.
([^>]*) (regex sub-expression) coupled with responsename="foo" allows
that subexpression to be stored in foo based on what is in the
response from the server. It will only take the first
sub-expression in the regex and store it in the value.
Also, remove some silly XML parameters that we no longer need due to
this commit. Should be a cleaner syntax now.
Revision
90008 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Tue Aug 7 20:25:36 2001 UTC
(23 years ago)
by
aaron
Original Path:
httpd/test/trunk/flood/flood_round_robin.c
File length: 31448 byte(s)
Diff to
previous 89929
(
colored)
This patch allows flood to mimmic the special case where
known browsers will generate a POST request that has no
body and no Content-length header. Trying to achieve this
without this patch would get you a segfault. Now a url
formed like this will give a POST with no Content-length:
<url method="POST">http://www.example.com/submit.cgi</url>
...and a url formed like this will submit a body:
<url method="POST" payload="foo">http://www.example.com/bar.cgi</url>
For the sake of completion, I will be adding one addition change
so that we can also generate POST requests that have a
"Content-length: 0" header.
Revision
89918 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Sat Aug 4 04:26:21 2001 UTC
(23 years ago)
by
jerenkrantz
Original Path:
httpd/test/trunk/flood/flood_round_robin.c
File length: 29703 byte(s)
Diff to
previous 89886
(
colored)
Add ability to retrieve some data from the response and place it in
state variables (max of 10). These "state" variables live for the
life of the profile (i.e. all elements in the urllist). They may be
referred in any template via $[0-9]. Add ability to store the
entire response (only active if a response template is present).
This works. Sure. I'm going home now.
Revision
89886 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Thu Aug 2 22:19:49 2001 UTC
(23 years ago)
by
aaron
Original Path:
httpd/test/trunk/flood/flood_round_robin.c
File length: 25045 byte(s)
Diff to
previous 89882
(
colored)
Added pre/post delays, as well as a precision amount for each.
All times are in seconds. The actual delays is calculated as:
actual_delay + (precision * e)
(where e is a number in [-1,1]). I'm using rand() to generate
the 'e' factor, and as this is not threadsafe on some
platforms (I don't really care what the number is, so this
is NBD), I really should change this later to be
something akin to apr_generate_random_bytes().
Also a minor fix to Justin's last update, a symbol wasn't
renamed.
Also moved the place where we increment the current_url to
the next one from get_next_url() to loop_condition(). This
may have side effects later on if someone tries to call
loop_condition() more than once per loop, but right now
I believe it's defined so that we call it only once (and
that can't be overriden).
I updated some autoconf files, so please rerun buildconf.
Revision
89764 -
(
view)
(
download)
(
annotate)
-
[select for diffs]
Modified
Sun Jul 29 15:43:07 2001 UTC
(23 years ago)
by
jerenkrantz
Original Path:
httpd/test/trunk/flood/flood_round_robin.c
File length: 16750 byte(s)
Diff to
previous 89695
(
colored)
Add HTTP Keep-Alive support (rudimentary, but functional).
This is done by adding two new hooks:
open_req - Opens a socket (send_req used to do this implicitly).
create_req - Constructs the request (used to be part of get_next_url).
The open_req is executed *before* the create_req because we need to know
if we are a keepalive request and only the socket code knows whether we
are keepalive or not. This is a slight performance penalty on non-keepalive
requests because we are creating the request buffer *after* we have opened
the socket. We could do a "create_sock" that does everything but connect
and sets the keepalive flag? I'll discuss this with Aaron on Monday.
We now have a field in the request that specifies if it should be
Keep-Alive or not. Also, the response has a keepalive field to indicate
whether the connection was keptalive. If the connection was not keptalive,
then the socket should be closed at each iteration.
This form allows you to request diffs between any two revisions of this file.
For each of the two "sides" of the diff,
enter a numeric revision.