Commit be90985e authored by juga's avatar juga
Browse files

Add methods to log stats

parent 02f0f815
......@@ -724,6 +724,22 @@ class V3BWFile(object):
def median_bw(self):
return median([ for l in self.bw_lines])
def max_bw(self):
return max([ for l in self.bw_lines])
def min_bw(self):
return min([ for l in self.bw_lines])
def info_stats(self):
if not self.bw_lines:
[': '.join([attr, str(getattr(self, attr))])) for attr in
['sum_bw', 'mean_bw', 'median_bw', 'num',
'max_bw', 'min_bw']]
def bw_line_for_node_id(self, node_id):
"""Returns the bandwidth line for a given node fingerprint.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment