MemoryStatsJsRails
Easiest way to get paulirish's memory-stats.js memory stats and mrdoobs stats.js
running in an ember-app. Please refer to the memory-stats.js repo or stats.js repo for further documentation.
Installation
Add this line to your application's Gemfile:
gem 'memory-stats-js-rails'
And then execute:
$ bundle
Or install it yourself as:
$ gem install memory-stats-js-rails
Usage
In app/assets/javascripts/application.js
: //= require memory-stats
And then something like:
var stats = new MemoryStats();
stats.domElement.style.position = 'fixed';
stats.domElement.style.right = '0px';
stats.domElement.style.bottom = '0px';
document.body.appendChild( stats.domElement );
requestAnimationFrame(function rAFloop(){
stats.update();
requestAnimationFrame(rAFloop);
});
Contributing
- Fork it ( https://github.com/[my-github-username]/memory-stats-js-rails/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request