diff --git a/test/functional/api/cas/statistics.py b/test/functional/api/cas/statistics.py index 580264a..37f3d26 100644 --- a/test/functional/api/cas/statistics.py +++ b/test/functional/api/cas/statistics.py @@ -387,6 +387,9 @@ class UsageStats: f"Dirty: {self.dirty}\n" ) + def __repr__(self): + return str(self) + def __eq__(self, other): if not other: return False @@ -397,6 +400,24 @@ class UsageStats: and self.dirty == other.dirty ) + def __ne__(self, other): + return not self == other + + def __add__(self, other): + return UsageStats( + self.occupancy + other.occupancy, + self.free + other.free, + self.clean + other.clean, + self.dirty + other.dirty + ) + + def __iadd__(self, other): + self.occupancy += other.occupancy + self.free += other.free + self.clean += other.clean + self.dirty += other.dirty + return self + class InactiveUsageStats: def __init__(self, inactive_occupancy, inactive_clean, inactive_dirty):