Skip to content

Commit

Permalink
increment the pythonic way
Browse files Browse the repository at this point in the history
Co-authored-by: John T. Wodder II <[email protected]>
  • Loading branch information
asmacdo and jwodder authored Jun 20, 2024
1 parent f5c8d6c commit 97ea981
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/duct/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class Averages:
num_samples: int = 0

def update(self: Averages, other: Sample) -> None:
self.num_samples = self.num_samples + 1
self.num_samples += 1
self.rss += (other.total_rss - self.rss) / self.num_samples
self.vsz += (other.total_vsz - self.vsz) / self.num_samples
self.pmem += (other.total_pmem - self.pmem) / self.num_samples
Expand Down

0 comments on commit 97ea981

Please sign in to comment.