https://github.com/inside/moment-memory-poc
A poc repo to demonstrate server side memory consumption with moment
https://github.com/inside/moment-memory-poc
Last synced: about 1 year ago
JSON representation
A poc repo to demonstrate server side memory consumption with moment
- Host: GitHub
- URL: https://github.com/inside/moment-memory-poc
- Owner: inside
- Created: 2018-03-05T09:46:28.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-05T16:54:11.000Z (over 8 years ago)
- Last Synced: 2025-02-01T20:25:33.541Z (over 1 year ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# moment-memory-poc
A poc repo to demonstrate server side memory consumption with moment
- Installation:
```
git clone https://github.com/inside/moment-memory-poc.git
cd moment-memory-poc
npm install
```
- Run this program with:
```
NODE_ENV=production node --expose-gc ./index.js
```
- Let it run for less than a minute
- Be sure to only have this node process running otherwise replace `$(pgrep node)` by your `pid`
- Clear timers 1 and 2 by sending a signal:
```
kill -USR2 $(pgrep node)
```
- Inspect the RAM in kilobytes used with:
```
ps -p $(pgrep node) -o rss
```
- You should see the amount of RAM is never reallocated.