Flood is an HTTP load tester provided by Apache. It's built on APR that should be portable across platforms. Here are some instructions that I figured out this afternoon on how to build it on Win32.
First check out the code from its repository. Remember to get APR ready. You can find a VC project file for flood. Just open it and compile, and it fails. That's OK.
1. Copy config.h.in to config.h. Comment or fill macro definitions as you wish.
2. In flood_round_robin.c there's an include for regex.h. Look for any POSIX compatible regex library for Win32, such as GNU regex or PCRE. Refer to GnuWin32 if you don't want to compile from the source. I used the pre-compiled PCRE from GnuWin32.
3. Flood now should be compiled sucessfully. Try the shipped examples. If it crashes, look into "farmer_worker" function in flood_farm.c and uncomment the call to apr_thread_exit at the end due to some cleanup mess with apr_thread_join/apr_thread_exit on Win32.
One more word: if sample bash scripts cannot run in cygwin, replace all "\r\n" by "\n" in them. That's it. Enjoy!
No comments:
Post a Comment