Skip to content

Commit

Permalink
Log thread name and number of socket retries in stats output.
Browse files Browse the repository at this point in the history
  • Loading branch information
int08h committed May 29, 2024
1 parent c3703d9 commit ecb9716
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,20 +288,22 @@ impl Server {

for (addr, counts) in vec {
info!(
"{:16}: {} classic req, {} rfc req; {} invalid requests; {} classic resp, {} rfc resp ({} sent); {} failed sends",
"{:16}: {} classic req, {} rfc req; {} invalid requests; {} classic resp, {} rfc resp ({} sent); {} failed sends, {} retried sends",
format!("{}", addr),
counts.classic_requests,
counts.rfc_requests,
counts.invalid_requests,
counts.classic_responses_sent,
counts.rfc_responses_sent,
counts.bytes_sent.file_size(fsopts::BINARY).unwrap(),
counts.failed_send_attempts
counts.failed_send_attempts,
counts.retried_send_attempts
);
}

info!(
"Totals: {} unique clients; {} total req ({} classic req, {} rfc req); {} invalid requests; {} total resp ({} classic resp, {} rfc resp); {} sent; {} failed sends",
"{} Totals: {} unique clients; {} total req ({} classic req, {} rfc req); {} invalid requests; {} total resp ({} classic resp, {} rfc resp); {} sent; {} failed sends, {} retried sends",
self.thread_name(),
self.stats.total_unique_clients(),
self.stats.total_valid_requests(),
self.stats.num_classic_requests(),
Expand All @@ -311,7 +313,8 @@ impl Server {
self.stats.num_classic_responses_sent(),
self.stats.num_rfc_responses_sent(),
self.stats.total_bytes_sent().file_size(fsopts::BINARY).unwrap(),
self.stats.total_failed_send_attempts()
self.stats.total_failed_send_attempts(),
self.stats.total_retried_send_attempts()
);

self.stats.clear();
Expand Down

0 comments on commit ecb9716

Please sign in to comment.