forked from TrueCloudLab/frostfs-testlib
fix divizion by zero, when total operations is zero
This commit is contained in:
parent
612e088763
commit
d6e08c477b
2 changed files with 11 additions and 9 deletions
|
@ -49,15 +49,15 @@ class LoadVerifier:
|
|||
if deleters and not delete_operations:
|
||||
exceptions.append(f"No any delete operation was performed")
|
||||
|
||||
if writers and write_errors / write_operations * 100 > self.load_params.error_threshold:
|
||||
if write_operations and writers and write_errors / write_operations * 100 > self.load_params.error_threshold:
|
||||
exceptions.append(
|
||||
f"Write error rate is greater than threshold: {write_errors / write_operations * 100} > {self.load_params.error_threshold}"
|
||||
)
|
||||
if readers and read_errors / read_operations * 100 > self.load_params.error_threshold:
|
||||
if read_operations and readers and read_errors / read_operations * 100 > self.load_params.error_threshold:
|
||||
exceptions.append(
|
||||
f"Read error rate is greater than threshold: {read_errors / read_operations * 100} > {self.load_params.error_threshold}"
|
||||
)
|
||||
if deleters and delete_errors / delete_operations * 100 > self.load_params.error_threshold:
|
||||
if delete_operations and deleters and delete_errors / delete_operations * 100 > self.load_params.error_threshold:
|
||||
exceptions.append(
|
||||
f"Delete error rate is greater than threshold: {delete_errors / delete_operations * 100} > {self.load_params.error_threshold}"
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue