1
0
mirror of synced 2025-10-20 02:29:24 +03:00

Prewarm Benchmark test

This commit is contained in:
yhirose
2025-09-15 17:12:22 -04:00
parent 41be1e24e3
commit 5282f9e887

View File

@@ -3653,6 +3653,13 @@ void performance_test(const char *host) {
Client cli(host, port);
// Prewarm the server
for (int i = 0; i < 10; i++) {
auto res = cli.Get("/benchmark");
ASSERT_TRUE(res);
EXPECT_EQ(StatusCode::OK_200, res->status);
}
auto start = std::chrono::high_resolution_clock::now();
auto res = cli.Get("/benchmark");