Skip to content

Commit

Permalink
fix profiler memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
gmega committed Nov 16, 2023
1 parent 4965e11 commit 9cd5db3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions codex/utils/asyncprofiler/asyncprofiler.nim
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ proc handleFutureComplete*[TFutureBase](self: var AsyncProfiler[TFutureBase],
self.futureSummaryMetrics.withValue(loc, metric):
metric[].addRun(runMetrics)

Check warning on line 125 in codex/utils/asyncprofiler/asyncprofiler.nim

View check run for this annotation

Codecov / codecov/patch

codex/utils/asyncprofiler/asyncprofiler.nim#L124-L125

Added lines #L124 - L125 were not covered by tests

self.perFutureMetrics.del(fut.id)

Check warning on line 127 in codex/utils/asyncprofiler/asyncprofiler.nim

View check run for this annotation

Codecov / codecov/patch

codex/utils/asyncprofiler/asyncprofiler.nim#L127

Added line #L127 was not covered by tests

if not isNil(self.onChange):
self.onChange()

Check warning on line 130 in codex/utils/asyncprofiler/asyncprofiler.nim

View check run for this annotation

Codecov / codecov/patch

codex/utils/asyncprofiler/asyncprofiler.nim#L129-L130

Added lines #L129 - L130 were not covered by tests

Expand Down

0 comments on commit 9cd5db3

Please sign in to comment.