We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c7ed0a1 commit f37dcf2Copy full SHA for f37dcf2
libcachesim/synthetic_reader.py
@@ -185,8 +185,8 @@ def get_read_pos(self) -> float:
185
def get_working_set_size(self) -> Tuple[int, int]:
186
"""Calculate working set size"""
187
wss_obj, wss_byte = 0, 0
188
- if self._obj_ids is not None:
189
- unique_ids = np.unique(self._obj_ids[:self.current_pos])
+ if self.current_pos > 0:
+ unique_ids = np.unique(self.obj_ids[:self.current_pos])
190
wss_obj = len(unique_ids)
191
wss_byte = wss_obj * self.obj_size
192
return wss_obj, wss_byte
0 commit comments