{"id":15015927,"url":"https://github.com/steveszc/ember-cli-memory-leak-detector","last_synced_at":"2025-09-10T10:33:38.653Z","repository":{"id":40420695,"uuid":"304750623","full_name":"steveszc/ember-cli-memory-leak-detector","owner":"steveszc","description":"Automatic memory leak detection for ember apps","archived":false,"fork":false,"pushed_at":"2022-06-25T12:29:22.000Z","size":1443,"stargazers_count":39,"open_issues_count":8,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-24T18:41:16.102Z","etag":null,"topics":["ember-addon","ember-cli","emberjs","heap-snapshot","memory-leak"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/ember-cli-memory-leak-detector","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/steveszc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-16T22:24:58.000Z","updated_at":"2025-02-12T15:56:11.000Z","dependencies_parsed_at":"2022-09-06T08:00:54.565Z","dependency_job_id":null,"html_url":"https://github.com/steveszc/ember-cli-memory-leak-detector","commit_stats":null,"previous_names":["truecoach/ember-cli-memory-leak-detector"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/steveszc/ember-cli-memory-leak-detector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steveszc%2Fember-cli-memory-leak-detector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steveszc%2Fember-cli-memory-leak-detector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steveszc%2Fember-cli-memory-leak-detector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steveszc%2Fember-cli-memory-leak-detector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/steveszc","download_url":"https://codeload.github.com/steveszc/ember-cli-memory-leak-detector/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/steveszc%2Fember-cli-memory-leak-detector/sbom","scorecard":{"id":852879,"data":{"date":"2025-08-11","repo":{"name":"github.com/steveszc/ember-cli-memory-leak-detector","commit":"5d3566950a45bb764b6234355f11986710edf962"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":1,"reason":"Found 4/30 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/node.js.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/steveszc/ember-cli-memory-leak-detector/node.js.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node.js.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/steveszc/ember-cli-memory-leak-detector/node.js.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/node.js.yml:28","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   2 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.md:0","Info: FSF or OSI recognized license: MIT License: LICENSE.md:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 12 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"86 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-whgm-jr23-g3j9","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5","Warn: Project is vulnerable to: GHSA-wxhq-pm8v-cw75","Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-j4f2-536g-r55m","Warn: Project is vulnerable to: GHSA-r7qp-cfhv-p84w","Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc","Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx","Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q","Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq","Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488","Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-6vfc-qv3f-vr6c","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-pc58-wgmc-hfjr","Warn: Project is vulnerable to: GHSA-vvv8-xw5f-3f88","Warn: Project is vulnerable to: GHSA-qrpm-p2h7-hrv2","Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-6fx8-h7jm-663j","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-rhx6-c78j-4q9w","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-xfhp-gmh8-r8v2","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg","Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p","Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7","Warn: Project is vulnerable to: GHSA-25hc-qcg6-38wj","Warn: Project is vulnerable to: GHSA-qm95-pgcg-qqfq","Warn: Project is vulnerable to: GHSA-cqmj-92xf-r6r9","Warn: Project is vulnerable to: GHSA-vx3p-948g-6vhq","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-cf4h-3jhx-xvhq","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7","Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693","Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q","Warn: Project is vulnerable to: GHSA-h6q6-9hqw-rwfv","Warn: Project is vulnerable to: GHSA-5fg8-2547-mr8q","Warn: Project is vulnerable to: GHSA-crh6-fp67-6883","Warn: Project is vulnerable to: GHSA-72mh-269x-7mh5","Warn: Project is vulnerable to: GHSA-h4j5-c7cj-74xg","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T22:59:26.423Z","repository_id":40420695,"created_at":"2025-08-23T22:59:26.423Z","updated_at":"2025-08-23T22:59:26.423Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274447536,"owners_count":25287113,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-10T02:00:12.551Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ember-addon","ember-cli","emberjs","heap-snapshot","memory-leak"],"created_at":"2024-09-24T19:48:09.722Z","updated_at":"2025-09-10T10:33:38.611Z","avatar_url":"https://github.com/steveszc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Node.js CI](https://github.com/steveszc/ember-cli-memory-leak-detector/actions/workflows/node.js.yml/badge.svg)](https://github.com/steveszc/ember-cli-memory-leak-detector/actions/workflows/node.js.yml)\n[![Ember Observer Score](https://emberobserver.com/badges/ember-cli-memory-leak-detector.svg)](https://emberobserver.com/addons/ember-cli-memory-leak-detector)\n[![npm version](https://badge.fury.io/js/ember-cli-memory-leak-detector.svg)](https://www.npmjs.com/package/ember-cli-memory-leak-detector)\n\nember-cli-memory-leak-detector\n==============================================================================\n\nAn ember-cli addon that captures and analyzes a heap snapshot after your tests have finished running in Chrome, in order to detect memory leaks.\nIf any of your app's classes are retained in the heap, your tests will fail.\n\n[Watch the EmberConf 2021 Announcement Video - Ending the plague of memory leaks](https://www.youtube.com/watch?v=slIz90NHKUs)\n\nCompatibility\n------------------------------------------------------------------------------\n\n* Ember.js v3.16 or above\n* Ember CLI v2.13 or above\n* Node.js v10 or above\n\n\nInstallation\n------------------------------------------------------------------------------\n\n```\nember install ember-cli-memory-leak-detector\n```\n\nUpdate `testem.js` to use a `--remote-debugging-port=9222`. 9222 is the recommended default, but this port can be configured. You can not use ember-cli's default of `0`\n\n```js\n// testem.js\nbrowser_args: {\n  Chrome: {\n    dev: [\"--remote-debugging-port=9222\"],\n    ci: [\"--remote-debugging-port=9222\"]\n  },\n},\n```\n\nUsage\n------------------------------------------------------------------------------\n\nWhenever you run your tests in Chrome via Testem (via `ember test` or `ember test --server`), this addon will capture a heap snapshot after the tests complete and search the heap snapshot for any of your app or addon's ES classes. If any of your app or addon's classes are retained in heap snapshot (indicating a memory leak) your test suite will fail and a report of the retained class names will be logged.\n\n### CI\n\nWhen run in CI (via `ember test`/`ember exam`), this addon will ensure that your tests fail if a memory leak is introduced by a commit or PR.\n\n#### A note about production and ci environments \nIt may be desirable to run memory leak detection on a production build of the app using `ember test --environment=production`.\nProduction builds normally mangle class names, which breaks our ability to detect memory leaks, so this needs to be disabled.\n\n```js\n//ember-cli-build.js\n\n'ember-cli-terser': {\n  terser: {\n    compress: { keep_classnames: true },\n    mangle: { keep_classnames: true }\n  }\n}\n```\n\nProduction and CI environments also (by default) add IE11 as a compile target, which will result in classes being transpiled away, so we need to remove this as well.\n```js\n//config/targets.js\n\n'use strict';\n\nconst browsers = [\n  'last 1 Chrome versions',\n  'last 1 Firefox versions',\n  'last 1 Safari versions'\n];\n\n// const isCI = Boolean(process.env.CI);\n// const isProduction = process.env.EMBER_ENV === 'production';\n\n// if (isCI || isProduction) {\n//   browsers.push('ie 11');\n// }\n\nmodule.exports = {\n  browsers\n};\n```\n\nBoth of these changes can be optionally implemented using ENV variables to ensure we are only making these changes when we want to run memory leak detection.\n\n### Dev\n\nWhen run during development, (via `ember test --server`) memory leaks can be detected after running individual tests or modules via the QUnit UI's filter input or module select. This enables a TDD-like experience for fixing memory leaks.\n\n\u003e **Note:** Memory leak detection currently relies on Testem and Chrome's remote debugging API, so it is not possible to detect memory leaks when running `ember server` and then visiting `localhost:4200/tests` in browser.\n\n**The effectiveness of this addon is dependent on:**\n1. **The coverage of your test suite.** If leaky code exists in your app but is not exercised by your tests then this add-on can not detect that leaky code.\n2. **Your usage of ES classes.** This addon functions by getting a list of ES classes in your app/addon code and looking for those objects in the heap snapshot. The addon can only detect leaked objects that have a class name defined in your code.\n\nConfiguration\n------------------------------------------------------------------------------\n\n```js\n// ember-cli-build.js\n\nlet app = new EmberApp(defaults, {\n  'ember-cli-memory-leak-detector': {\n    enabled: process.env.DETECT_MEMORY_LEAKS || false,\n    failTests: false,\n    ignoreClasses: ['ExpectedLeakyClass'],\n    remoteDebuggingPort: '9222',\n    timeout: 90000,\n    writeSnapshot: true,\n  },\n});\n```\n\n1. `enabled` (default `true`)\nSet to false to disables memory leak detection. Consider using an environment variable (`process.env.DETECT_MEMORY_LEAKS`) to control when memory leak detection is run.\n\n1. `failTests`: (default `true`)\nBy default when a leak is detected we add a failed test. Set this to `false` to prevent memory leaks from causing your tests to fail, and instead log a console warning.\n\n1. `ignoreClasses`: (default `[]`)\nBy default, the addon will discover all class names in your app and throw a test error if it detects any of them in the heap snapshot. Use this option to ignore specific classes that you expect to leak or plan to fix later. If any of these ignored classes are leaked they will be output as a warning in the test output. Note: framework-level classes such as App are ignored to avoid false positives.\n\n1. `remoteDebuggingPort`: (default `9222`)\nConfigures which port to connect to the testem Chrome instance. This value must match the `--remote-debugging-port` flag set in your app's `testem.js`\n\n1. `timeout`: (number, default `null`)\nConfigures the length of time, in milliseconds, to wait for the memory leak detection test to complete. This value will override any existing timeouts in your test framework. For example, QUnit has a default test timeout of 60s. If you expect memory leak detection to take longer than this it may be useful to specify a longer timeout for the memory leak detection test. \n*Note*: Currently this timeout is only used with QUnit\n\n1. `writeSnapshot`: (default `false`)\nSet this to `true` to write the heapsnapshot to disk as `Heap.heapsnapshot`. This is helpful for fixing memory leaks, since the file can be uploaded into Chrome DevTool's Memory panel for analysis.\n\nFixing memory leaks\n------------------------------------------------------------------------------\n\nOnce this addon has helped you identify that your app or addon is leaking memory you can begin the process of fixing those memory leaks. \n\nFixing memory leaks requires an understanding of how to find leaky application code in a heap snapshot, and an understanding of what code patterns cause memory leaks and how they can be refactored to prevent leaks. Teaching these things is outside the scope of this addon's documentation (for now, contributions welcome!) but there are some existing resources that can help you here.  \n\n1. https://developers.google.com/web/tools/chrome-devtools/memory-problems is a great introduction to memory problems in the browser and the memory tools available in Chrome DevTools.\n\n1. https://github.com/ember-best-practices/memory-leak-examples is a fantastic free ember-centric resource for learning about patterns that cause memory leaks, how to identify leaky code, and how to fix those leaks.\n\n1. https://embermap.com/topics/memory-leaks Another ember-centric resource for learning about memory leaks in the context.\n\nMost of these resources involve running some code/tests and manually capturing and analyzing a heap snapshot in Chrome DevTools. You may find that this addon paired with the `writeSnapshot` config option and `ember test`'s filter flag provide a handy way to speed up those manual processes.\n\nDealing with large heap snapshots\n-------------------------------------------------------------------------------\n\nDepending on the size of your app and the number of memory leaks it has you may find that the size of your heap snapshot causes problems during your test runs.\n\n1. Consider setting the `enabled` config to an environment variable for more control over when memory leak detection is run, for example to only run in CI.\n\n```js\n'ember-cli-memory-leak-detector': {\n  enabled: process.env.DETECT_MEMORY_LEAKS || false,\n}\n```\n\n```bash\n$ DETECT_MEMORY_LEAKS=true ember test\n```\n\n2. Allocate extra memory to node\n\nYou may find that node's default memory allocation of 512Mb is insufficient for analyzing your app's heap snapshot. In this case you may need to allocate extra memory to node, otherwise node will run out of memory and your test run will crash.\n\nUse the `max_old_space_size` flag to allocate extra memory. The following example increases node's memory to 8Gb.\n\n```bash\nnode --max_old_space_size=8192 node_modules/.bin/ember test\n```\n\nAdditionally, if you are running memory leak detection in a CI environment, you may need to increase the size of your CI resource.\n\n\nContributing\n------------------------------------------------------------------------------\n\nSee the [Contributing](CONTRIBUTING.md) guide for details.\n\n\nLicense\n------------------------------------------------------------------------------\n\nThis project is licensed under the [MIT License](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteveszc%2Fember-cli-memory-leak-detector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsteveszc%2Fember-cli-memory-leak-detector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsteveszc%2Fember-cli-memory-leak-detector/lists"}