diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-01-18 01:36:06 +0000 |
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-01-18 01:36:06 +0000 |
| commit | 04acfa679fd846ac829ded5562093b3766c85154 (patch) | |
| tree | a9625eb96c8c4ed246b1f4d172c06d85df577dfe /test/testing-util.cpp | |
| parent | 34051da2f27ffa40d0b6d20ae891a497fe73bfe5 (diff) | |
| download | webstat-04acfa679fd846ac829ded5562093b3766c85154.tar.bz2 webstat-04acfa679fd846ac829ded5562093b3766c85154.tar.xz webstat-04acfa679fd846ac829ded5562093b3766c85154.zip | |
Diffstat (limited to 'test/testing-util.cpp')
| -rw-r--r-- | test/testing-util.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/testing-util.cpp b/test/testing-util.cpp index 010b2c6..6e75354 100644 --- a/test/testing-util.cpp +++ b/test/testing-util.cpp @@ -34,6 +34,7 @@ namespace WebStat { std::vector<std::string> qss; std::vector<std::string> refs; std::vector<std::string> uas; + std::vector<std::string> ct; }; Strings strings; @@ -65,6 +66,7 @@ namespace WebStat { {strings.qss, 100, getStrGen(1, 50)}, {strings.refs, 50, getStrGen(10, 50)}, {strings.uas, 10, getStrGen(50, 70)}, + {strings.ct, 10, getStrGen(10, 20)}, }) { std::generate_n(std::back_inserter(out), count, stringGenerator); } @@ -86,10 +88,11 @@ namespace WebStat { std::ofstream logfile {path}; for (size_t line = 0; line < entries; ++line) { - std::println(logfile, R"LOG({} {} {} GET "/{}" "?{}" HTTP/1.1 200 {} {} "{}" "{}")LOG", + std::println(logfile, R"LOG({} {} {} GET "/{}" "?{}" HTTP/1.1 200 {} {} "{}" "{}" "{}")LOG", randomString(strings.vhosts), randomString(strings.ips), tick += tickDistrib(generator), randomString(strings.paths), randomString(strings.qss), sizeDistrib(generator), - durationDistrib(generator), randomString(strings.refs), randomString(strings.uas)); + durationDistrib(generator), randomString(strings.refs), randomString(strings.uas), + randomString(strings.ct)); } } |
