summaryrefslogtreecommitdiff
path: root/aergia
diff options
context:
space:
mode:
authorbd <bdunahu@operationnull.com>2025-06-16 16:26:55 -0400
committerbd <bdunahu@operationnull.com>2025-06-16 16:26:55 -0400
commitf04af4d6e012de6b0b8fb24446db9cba152585b6 (patch)
tree6efe98f9d4cbbc671efe8706c8b2ba3597cf3acb /aergia
parent8391634ea99581e3f50debdb7c599afe4155a998 (diff)
Remove `filter_duplicated_frame`
Diffstat (limited to 'aergia')
-rwxr-xr-xaergia21
1 files changed, 2 insertions, 19 deletions
diff --git a/aergia b/aergia
index 54c86cb..af5a94e 100755
--- a/aergia
+++ b/aergia
@@ -220,28 +220,11 @@ class Aergia(object):
def sort_samples(sample_dict):
'''Returns SAMPLE_DICT in descending order by number of samples.'''
return {k: v for k, v in sorted(sample_dict.items(),
- key=lambda item: Aergia.sum_sample(item[1]),
+ key=lambda item: Aergia.sum_sample(
+ item[1]),
reverse=True)}
@staticmethod
- def filter_duplicated_frames(frames) -> bool:
- s = set()
- dup = []
- for f in frames:
- if f in s:
- dup.append(f)
- else:
- s.add(f)
- # TODO we probably have one because given get_async_frames returns the
- # currently executing task. Would be an easy fix in that method.
- # if there's more than one, I cannot explain it.
- assert len(
- dup) < 2, f"ERROR: More than 1 duplicate frame (shouldn't happen): {dup}"
- if len(dup) != 0:
- print(f"WARN: Duplicate frame found: {dup}", file=sys.stderr)
- return list(s)
-
- @staticmethod
def sum_sample(sample):
return sample[0] + sample[1]