Shopify / Shopify/liquid-spec

Track memory usage in tests

Open
#19 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
19
Forks
8
Avg merge
6h 41m
Merged PRs (30d)
2

Description

How do we make sure that:

  • there are no memory leaks in our code
  • everything that needs to be GCed by Ruby has been
  • we don't use Ruby objects that have been GCed (GC.stress=trye could do the trick, but is slow, see https://github.com/Shopify/liquid-wasm/issues/168. It could be an option we turn on in CI?).

I think we could leverage #18, and measure memory usage during the execution. After a warmup phase, memory usage should be stable.

Maybe we could also measure allocations like in SFR.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing issue #18 and the existing test execution flow. Investigate Ruby GC.stress and ways to measure memory usage or allocations during tests, including the SFR approach. Done should include a practical CI-compatible check showing stable memory after warmup and coverage for leaks or unsafe use of GCed objects.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
performance, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.