https://github.com/strongloop/profiler-demo-app
Demo app to showcase CPU and heap profiling.
https://github.com/strongloop/profiler-demo-app
Last synced: 6 months ago
JSON representation
Demo app to showcase CPU and heap profiling.
- Host: GitHub
- URL: https://github.com/strongloop/profiler-demo-app
- Owner: strongloop
- License: other
- Created: 2014-09-05T20:12:51.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2018-09-19T03:20:06.000Z (over 7 years ago)
- Last Synced: 2025-05-02T10:51:01.851Z (9 months ago)
- Language: JavaScript
- Homepage: https://strongloop.com/node-js/devops-tools/
- Size: 17.6 KB
- Stars: 3
- Watchers: 13
- Forks: 2
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
=================
profiler-demo-app
=================
Use this demo app to showcase CPU and Heap profiling using StrongOps
hosted service or On-premises monitoring.
The profiler demo app is a simple loopback application.
It includes a load generator script which makes 2 post requests.
The first POST request '/documents' creates multiple instances of the
document object and burns CPU. Use the CPU profiler to see the CPU usage.
The second POST request '/documents/content' increases the 'Document'
count. Use the HEAP Profiler to see the increased object count.
#### Install StrongLoop software
$ npm install -g strongloop
#### Install node_modules
$ npm install
#### On-premises monitoring
Run the app.
$ slc run --cluster 2
Run the load generator script. Update the host and port in loadtest.js.
$ node loadtest.js
You can collect CPU and Heap profiling data using the slc runctl
command and Google Chrome tools.
See [slc runctl](http://docs.strongloop.com/display/SLC/slc+runctl) for more details.
##### CPU Profiler
Click on the CPU Profiler tab. Select the app named profiler-app and
start the profiler. Run it for around 6-10 seconds and you should be able
to see the CPU profiler chart. This will slow down the
CPU usage.
See [CPU Profiling](http://docs.strongloop.com/display/SLA/CPU+profiling)
for more details on CPU profiling.
##### Heap Profiler
Click on the Heap Profiler tab. Select the app named profiler-app and
start the profiler. Leave it running for a while and you should be able
to see the object count increasing.
See [Heap](http://docs.strongloop.com/display/SLA/Heap+memory+profiling)
Memory Profiling for more details on heap profiling data.
Note: Do not leave the app running for too long. Kill the app, once you
generate the graphs. The app is meant to leak objects and consumes a lot of CPU.