Skip to content

Commit

Permalink
fix tool
Browse files Browse the repository at this point in the history
  • Loading branch information
qicosmos committed Jan 20, 2025
1 parent 6ee8f04 commit 6c631f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions example/benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ int main() {
"127.0.0.1", true);
server.set_http_handler<GET>(
"/plaintext", [](coro_http_request& req, coro_http_response& resp) {
resp.get_conn()->set_multi_buf(false);
resp.set_content_type<resp_content_type::txt>();
resp.set_delay(false);
resp.need_date_head(false);
resp.set_status_and_content(status_type::ok, "Hello, world!");
});
server.sync_start();
Expand Down
5 changes: 2 additions & 3 deletions press_tool/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,8 @@ int main(int argc, char* argv[]) {

timer_thd.join();
auto end = std::chrono::steady_clock::now();
auto dur =
std::chrono::duration_cast<std::chrono::nanoseconds>(end - beg).count();
double dur_s = double(dur) / 1000000000;
double dur_s =
std::chrono::duration_cast<std::chrono::seconds>(end - beg).count();

// statistic
uint64_t total = 0;
Expand Down

0 comments on commit 6c631f9

Please sign in to comment.