diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2022-09-19 18:02:33 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2022-09-19 18:02:33 +0200 |
commit | 0664442648a8fd3627fc3d72c3bb33155612aadf (patch) | |
tree | 63ad37129cf8bac0b1261e5dfc804a320ba39e66 /mknet | |
parent | 549c548e7cc8f99da37b931b6aa991093f097fd7 (diff) | |
download | mknet-0664442648a8fd3627fc3d72c3bb33155612aadf.tar.gz mknet-0664442648a8fd3627fc3d72c3bb33155612aadf.zip |
Add support for txqueuelen
Diffstat (limited to 'mknet')
-rwxr-xr-x | mknet | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -87,21 +87,23 @@ class Bandwidth: class LinkInfo: - def __init__(self, bandwidth, latency, jitter = None, offset = None, limit = None, **kwargs): + def __init__(self, bandwidth, latency, jitter = None, offset = None, limit = None, txqueuelen = None, **kwargs): self.bandwidth = Bandwidth(bandwidth) self.latency = Latency(latency, offset) self.jitter = Latency(jitter or 0) self.limit = limit + self.txqueuelen = txqueuelen def __eq__(self, o): return (isinstance(o, LinkInfo) and o.bandwidth == self.bandwidth and o.latency == self.latency and o.jitter == self.jitter and - o.limit == self.limit) + o.limit == self.limit and + o.txqueuelen == self.txqueuelen) def __str__(self): - return f'LinkInfo{{bw: {self.bandwidth}, latency: {self.latency}, jitter: {self.jitter}, limit: {self.limit}}}' + return f'LinkInfo{{bw: {self.bandwidth}, latency: {self.latency}, jitter: {self.jitter}, limit: {self.limit}, txqueuelen: {self.txqueuelen}}}' class Server: def __init__(self, name, link): |