Skip to content

Commit

Permalink
Fixed speed test warning for path-matcher version, and hopefully also…
Browse files Browse the repository at this point in the history
… test logic for single-thread env.
  • Loading branch information
andrewlalis committed Jun 29, 2024
1 parent b489164 commit 9e5b0b5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion integration-tests/speed-test/dub.selections.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"cachetools": "0.4.1",
"handy-httpd": {"path":"../../"},
"httparsed": "1.2.1",
"path-matcher": "1.1.4",
"path-matcher": "1.2.0",
"requests": "2.1.3",
"slf4d": "3.0.0",
"streams": "3.5.0",
Expand Down
15 changes: 13 additions & 2 deletions integration-tests/speed-test/source/app.d
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import slf4d.writer;
import slf4d.default_provider;
import handy_httpd;

import std.algorithm;
import core.cpuid;

import requester;
Expand All @@ -19,8 +20,18 @@ int main() {

return runTests(
// () => new SpeedTest("Single-Thread BlockingWorkerPool", getBlockingServer(), 4, LimitType.RequestCount, 10_000),
() => new SpeedTest("Single-Thread DistributingWorkerPool", getTestingServer(1), 1, LimitType.Time, 10_000),
() => new SpeedTest("Multi-Thread DistributingWorkerPool", getTestingServer(cpuThreads), cpuThreads / 2, LimitType.Time, 10_000)
() => new SpeedTest(
"Single-Thread DistributingWorkerPool",
getTestingServer(1),
1,
LimitType.Time, 10_000
),
() => new SpeedTest(
"Multi-Thread DistributingWorkerPool",
getTestingServer(max(1, cpuThreads)),
max(1, cpuThreads / 2),
LimitType.Time, 10_000
)
);
}

Expand Down

0 comments on commit 9e5b0b5

Please sign in to comment.