Merge pull request #184 from richie5um/RichS-RateDivideByZeroIssue
Fix divide by zero issue when timestamp start and end are the same
This commit is contained in:
commit
83f061c1a0
|
@ -190,7 +190,7 @@ def format_flow(f, focus, extended=False, hostheader=False, padding=2):
|
|||
|
||||
delta = f.response.timestamp_end - f.response.timestamp_start
|
||||
size = len(f.response.content) + f.response.get_header_size()
|
||||
rate = utils.pretty_size(size / delta)
|
||||
rate = utils.pretty_size(size / ( delta if delta > 0 else 1 ) )
|
||||
|
||||
d.update(dict(
|
||||
resp_code = f.response.code,
|
||||
|
|
Loading…
Reference in New Issue