summaryrefslogtreecommitdiff
path: root/project2/cgi
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2012-01-09 21:03:19 +0000
committerrandomdan <randomdan@localhost>2012-01-09 21:03:19 +0000
commit04cb9c3fd13b5dfac9d3ea9aef6fa4d61b9561d0 (patch)
treedd0528be91331a27c1c592c7745c2702b6995b28 /project2/cgi
parentDon't implicitally follow symlinks (diff)
downloadproject2-04cb9c3fd13b5dfac9d3ea9aef6fa4d61b9561d0.tar.bz2
project2-04cb9c3fd13b5dfac9d3ea9aef6fa4d61b9561d0.tar.xz
project2-04cb9c3fd13b5dfac9d3ea9aef6fa4d61b9561d0.zip
Add some configurability to the Html2Text transform
Add option for repeating a testCgi run for benchmarking
Diffstat (limited to 'project2/cgi')
-rw-r--r--project2/cgi/testCgi.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/project2/cgi/testCgi.cpp b/project2/cgi/testCgi.cpp
index 624f2d7..6250cb0 100644
--- a/project2/cgi/testCgi.cpp
+++ b/project2/cgi/testCgi.cpp
@@ -56,6 +56,7 @@ class TestInput : public cgicc::CgiInput {
TESTOPT("HTTP_REFERER", "", "Referrer")
TESTOPT("HTTP_COOKIE", "", "Cookie")
TESTOPT("HTTPS", "No", "HTTPS?")
+ ("runCount", Options::value(&runCount, 1), "Repeat run this many times")
;
FileOptions fo(".testCgi.settings");
opts.reset();
@@ -71,15 +72,22 @@ class TestInput : public cgicc::CgiInput {
StrPtr def(new std::string());
return *defaultMapFind(optStore, varName, def);
}
+ void run()
+ {
+ for (int run = 0; run < runCount; run += 1) {
+ cgiServe(this, std::cout);
+ }
+ }
private:
Options opts;
+ int runCount;
};
int
main(int, char **)
{
TestInput ti;
- cgiServe(&ti, std::cout);
+ ti.run();
}