uttrflow / uttrflow/uttrflow-swift
Heap soak report omits classes that first appear after the initial snapshot
- Dominant language
- Swift
- Stars
- 4
- Forks
- 17
- Avg merge
- 3h 32m
- Merged PRs (30d)
- 277
Description
## Problem
`Scripts/soak.sh` compares the first and last class tables using an inner `join -j 2`. A class absent from the first snapshot is dropped entirely, even when it has the largest increase by the last snapshot. This hides precisely the new object populations a long-running accumulation investigation needs to see.
## Verified reproduction
At main commit `5c310667cd35c44abd8bbd26c19b0905471287b4`, ran the unchanged script with two samples, zero delay, a live harmless process ID and a PATH-injected synthetic `heap` executable. No application heap or model was used.
Parsed first snapshot:
```text
10 ExistingClass
```
Parsed last snapshot:
```text
11 ExistingClass
1000 NewlyLeakedClass
```
The script exited 0 and printed only `ExistingClass`, growth 1, under “Grew most between the first sample and the last.” `NewlyLeakedClass`, growth 1000, was absent. The separate live-node totals correctly increased from 10 to 1011, so parsing preserved the new population; the join discarded it.
This establishes a diagnostic reporting defect, not an application memory leak. The existing crash investigation #140 and the introduction of this tool in #164 do not address this comparison error.
## Acceptance criteria
- Compare the union of class names, treating an absent count as zero.
- Include newly appearing classes in positive-growth ranking; disappearing classes must not appear as positive growth.
- Add a synthetic snapshot regression covering a new class, an existing growing class, a disappearing class and a class name containing spaces.
- Keep the original snapshot files available for investigation.
Contributor guide
Research direction
Start with Scripts/soak.sh and trace how the first and last class tables are parsed and joined. Reproduce the two-snapshot case from the issue, then add a synthetic regression covering new, growing, disappearing, and space-containing class names. Done means the original snapshots remain available, union-based growth includes new classes, and disappearing classes are not ranked as positive growth.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 82/100