← Back to CorePulse

CorePulse — Documentation

Quick Install

Install from npm (for bundlers):

npm install corepulse

Or simply copy corepulse.js to your project and include it via a <script> tag.

Basic Usage

After including the SDK, initialize and start collecting metrics:

CorePulse.init({ interval: 2000, track: ['fps','memory'] });
CorePulse.start();

Receiving Data

By default the SDK logs to browser console. To handle metrics yourself, assign CorePulse.onData:

CorePulse.onData = function(stats){
  // stats contains fps, memory, network
  console.log('received', stats);
};

Send to Server

Use CorePulse.sendTo(url) to POST collected data to your endpoint:

CorePulse.sendTo('https://your-server.example.com/metrics');

Advanced Ideas

Contributing

If you'd like to add features or fix bugs, fork the repo, make changes and open a pull request. Add tests under tests/ and update docs.

License

CorePulse is MIT-licensed — see LICENSE in the repo.