mirror of
https://github.com/ceph/s3-tests.git
synced 2024-11-24 19:30:38 +00:00
fix zero devision error in readwrite test
Was dividing by 0 if somehow it managed to upload or download a file in under .01 seconds.
This commit is contained in:
parent
91c4f88860
commit
7b51f55a1b
1 changed files with 6 additions and 1 deletions
|
@ -32,13 +32,18 @@ class Result:
|
|||
else:
|
||||
status = 'FAILURE'
|
||||
|
||||
if (self.time == 0):
|
||||
mbps = '?'
|
||||
else:
|
||||
mbps = self.size / self.time / 1024.0
|
||||
|
||||
return "<Result: [{success}] {type}{name} -- {size} KB in {time}s = {mbps} MB/s {details}>".format(
|
||||
success=status,
|
||||
type=type_s,
|
||||
name=self.name,
|
||||
size=self.size,
|
||||
time=self.time,
|
||||
mbps=self.size / self.time / 1024.0,
|
||||
mbps=mbps,
|
||||
details=self.details
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue