Skip to content

Commit 5282f9e

Browse files
committed
Prewarm Benchmark test
1 parent 41be1e2 commit 5282f9e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/test.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3653,6 +3653,13 @@ void performance_test(const char *host) {
36533653

36543654
Client cli(host, port);
36553655

3656+
// Prewarm the server
3657+
for (int i = 0; i < 10; i++) {
3658+
auto res = cli.Get("/benchmark");
3659+
ASSERT_TRUE(res);
3660+
EXPECT_EQ(StatusCode::OK_200, res->status);
3661+
}
3662+
36563663
auto start = std::chrono::high_resolution_clock::now();
36573664

36583665
auto res = cli.Get("/benchmark");

0 commit comments

Comments
 (0)