Git Product home page Git Product logo

Comments (3)

andywer avatar andywer commented on July 23, 2024 1

Hey @mishrsud. Thanks for your feedback! :)

Yeah, to be perfectly honest I am not completely sure about this yet either.
It's definitely a trade-off. More iterations might provide a higher confidence level, but will also take longer and longer to run. And memory leak testing is quite expensive in terms of time consumption...

I think we still need more experience in using leakage for memory leak testing. The lib is not even one month old, so for me it is hard to tell as well.

My experience so far: The heap snapshotting/diffing works quite precisely, except for the first snapshot (still got to debug why) and it triggers a full GC before snapshotting, providing almost noise-free results.

I am quite confident that even few iterations work well for simple cases. I would assume it works for more complex tests just as fine, since a heap snapshot is a heap snapshot, no matter how much heap operations have been done and the test fails if the heap size increased, regardless of what made it grow.

Please share your experiences any time! :)

from leakage.

andywer avatar andywer commented on July 23, 2024 1

Update: The new version that is about to be released comes with a slightly changed API.

In future you won't have to pass the iterations count anymore. You can pass an options object and set a custom value, though, if you need to. But I think the default values (30 x 6) work pretty good and will make this issue way less important.

So I will close the issue as soon as the new version is released. If you feel that this issue is still important, share your thoughts any time 😉

from leakage.

andywer avatar andywer commented on July 23, 2024

Leakage 0.3 is out and the new API will make this topic less interesting. It is also mentioned in the readme's FAQ.

from leakage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.