https://github.com/ably/grpc-memory-leak-test
Node.js gRPC memory leak test script for use with git bisect
https://github.com/ably/grpc-memory-leak-test
Last synced: 24 days ago
JSON representation
Node.js gRPC memory leak test script for use with git bisect
- Host: GitHub
- URL: https://github.com/ably/grpc-memory-leak-test
- Owner: ably
- License: other
- Created: 2017-04-04T21:56:22.000Z (about 9 years ago)
- Default Branch: main
- Last Pushed: 2021-09-19T19:55:37.000Z (over 4 years ago)
- Last Synced: 2025-12-17T06:23:16.456Z (6 months ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gRPC Node.js memory leak tests
This script was created to work out when a gRPC Node.js memory leak was introduced, see https://github.com/grpc/grpc/issues/10445
This script was designed to use with `git bisect` to determine which commit is responsible for the memory leak. To use this:
### 1. Install gRPC in a sub-folder
`git clone git@github.com:grpc/grpc.git`
### 2. Install this git repo in a sibling folder
Ensure this repo and the gRPC repo share the same parent folders (i.e. they are siblings)
`git clone git@github.com:ably/grpc-memory-leak-test.git`
### 3. Run the tests
Find a good commit. For example, `v1.1.0` is a known good commit, however you want to use the most recently known good commit.
Then find the failing commit SHA, for example you may just use `main`.
Then let `git bisect` do it's thing
```
# change working dir to the gRPC git folder
cd grpc
# Start a bisect and set the good and bad SHAs
git bisect start
git good [your-good-commit-SHA]
git bad [your-bad-commit-SHA]
# Run the git best tests until a good SHA is found
git bisect run ../grpc-memory-leak-test/install_and_test_leak.sh
```
Git will return the first SHA that caused the memory leak
## About
[Ably is a realtime data distribution platform-as-a-service](https://www.ably.io). We use [gRPC](https://github.com/grpc/grpc) extensively to communicate between different services across a number of languages.
## License
Copyright (c) 2017 Ably Real-time Ltd, Licensed under the Apache License, Version 2.0. Refer to [LICENSE](LICENSE) for the license terms.