You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: Implement memory leak detection in tests (#2695)
* chore: Implement memory leak detection in tests
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* chore: Implement memory leak detection in tests
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* chore: Implement memory leak detection in tests
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* chore: Implement memory leak detection in tests
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* chore: Implement memory leak detection in tests
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* chore: add docs
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* chore: fix sonar issues
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* chore: formatting
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* chore: small fix
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* chore: trace GC and write snapshot if memory leak > 0.5 MB
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* chore: revert false changes to eth.ts
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* chore: optimize code
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* Merge branch 'main' into 2260-Implement-a-Memory-Leak-detection-Test
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
# Conflicts:
# package-lock.json
# package.json
# packages/server/tsconfig.json
* fix: Do not write heap snapshots for acceptance tests
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* fix: add TODO for removing --trace_gc flag
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* test: add github comment in cases a test is having memory leaks
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* test: add github context env variables
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* test: extract common logic for github api calls
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* test: console.debug -> console.log for successful PR comments
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* test: fix request to github API
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* Merge branch 'main' into 2260-Implement-a-Memory-Leak-detection-Test
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
# Conflicts:
# packages/server/tests/acceptance/index.spec.ts
* Merge branch 'main' into 2260-Implement-a-Memory-Leak-detection-Test
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
# Conflicts:
# packages/server/tests/acceptance/index.spec.ts
* fix: request to github API
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* chore: add upload heap snapshots step in github workflow for acceptance and integration tests
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* fix: add `subject_type: file` to github request for adding comment on PR
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* fix: fix path in request to github API
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* chore: extract github request logic in new file - githubClient.ts
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* fix: path of upload-artifact action for uploading heap snapshots
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* fix: requests in githubClient.ts
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* fix: requests in githubClient.ts
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* fix: format message of github-actions[bot]
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* fix: format message of github-actions[bot]
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* chore: remove unused github context env variable
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* chore: formatting
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* chore: formatting
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* chore: formatting
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* fix: `formatBytes` returns `NaN undefined` when `0` is passed to it
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* fix: `formatBytes` returns `NaN undefined` when negative number is passed to it
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* fix: predicate for updating existing comment
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* fix: remove unused constant + temporary console logs
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* fix: make memory leak report more descriptive
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* chore: remove unnecessary console logs
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* chore: reduce MEMORY_LEAK_SNAPSHOT_THRESHOLD to 500 KB
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* fix: update logic for detecting memory leak based on heap size threshold
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* fix: add separate threshold for taking heap snapshots
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* fix: set `WRITE_SNAPSHOT_ON_MEMORY_LEAK` to be `false` by default
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* test: add warm-up phase to memory leak detection
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
* chore: revert changes to rpc_batch1.spec.ts
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
---------
Signed-off-by: Victor Yanev <victor.yanev@limechain.tech>
Signed-off-by: Eric Badiere <ebadiere@gmail.com>
Co-authored-by: Eric Badiere <ebadiere@gmail.com>
constsummary=`A potential memory leak has been detected in the test titled \`${testTitle}\`. This may impact the application's performance and stability.`;
0 commit comments