Skip to content

Commit

Permalink
Fix the issue where timeout failure is not counted as failure in stat…
Browse files Browse the repository at this point in the history
…istics. (#96)
  • Loading branch information
r12f authored Aug 9, 2021
1 parent 4387546 commit f00c984
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ impl PingResultProcessorConsoleLogger {
}

self.ping_count += 1;
match ping_result.error() {
Some(_) => self.failure_count += 1,
None => self.success_count += 1,
if ping_result.is_succeeded() {
self.success_count += 1;
} else {
self.failure_count += 1;
}

if let Some(warning) = ping_result.warning() {
Expand Down Expand Up @@ -134,7 +135,6 @@ impl PingResultProcessor for PingResultProcessorConsoleLogger {
fn name(&self) -> &'static str {
"ConsoleLogger"
}

fn config(&self) -> &PingResultProcessorCommonConfig {
self.common_config.as_ref()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ impl PingResultProcessor for PingResultProcessorCsvLogger {
fn name(&self) -> &'static str {
"CsvLogger"
}

fn config(&self) -> &PingResultProcessorCommonConfig {
self.common_config.as_ref()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ impl PingResultProcessor for PingResultProcessorJsonLogger {
fn name(&self) -> &'static str {
"JsonLogger"
}

fn config(&self) -> &PingResultProcessorCommonConfig {
self.common_config.as_ref()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ impl PingResultProcessor for PingResultProcessorLatencyBucketLogger {
fn name(&self) -> &'static str {
"LatencyBucketLogger"
}

fn config(&self) -> &PingResultProcessorCommonConfig {
self.common_config.as_ref()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ impl PingResultProcessor for PingResultProcessorLatencyScatterLogger {
fn name(&self) -> &'static str {
"LatencyScatterLogger"
}

fn config(&self) -> &PingResultProcessorCommonConfig {
self.common_config.as_ref()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ impl PingResultProcessor for PingResultProcessorResultScatterLogger {
fn name(&self) -> &'static str {
"ResultScatterLogger"
}

fn config(&self) -> &PingResultProcessorCommonConfig {
self.common_config.as_ref()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ impl PingResultProcessor for PingResultProcessorTextLogger {
fn name(&self) -> &'static str {
"TextLogger"
}

fn config(&self) -> &PingResultProcessorCommonConfig {
self.common_config.as_ref()
}
Expand Down

0 comments on commit f00c984

Please sign in to comment.