Code Monkey home page Code Monkey logo

rstats's People

Contributors

arthurjamain avatar brianpeiris avatar cedricpinson avatar cvan avatar kevinzwhuang avatar ngokevin avatar spite avatar statico avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rstats's Issues

Allow CSS stylesheets to be passed in as settings

Right now, rStats will always load CSS for the "Roboto Condensed" Google Font and a stylesheet that must be called rStats.css (though it can live in a parent directory, not just the current directory).

It'd be nice if you could pass in a setting to override that.

Visibility of panel

I am trying to load a page with the rStats panel hidden. I do $('.rs-base').hide(); after loading jquery and rStats but the panel shows up. What am I missing?

Doesn't sanitize for in loops

All the for (var j in x) loops don't check x.hasOwnProperty(j). This breaks rstats whenever an app also uses a library that extends the array prototype. Or just iterating using a normal for loop works as well.

rstats fps throws error.

I just with rstats and using the very basic code : rS( 'frame' ).start();
rS( 'rAF' ).tick();
rS( 'FPS' ).frame();--> this line throws error "Cannot read property 'interpolate' of undefined" . any way i can fix it?

Destroy method

Is there any way to destroy rStats after initing? I'm trying to integrate this into a multi-level environment, so I need to be able to take it apart. I'm not seeing anything in the code or docs.

rstats is causing a full document layout on each update

On your example pages (as well as my own experiments), I'm seeing a full document layout in Chrome:

screenshot 2014-01-21 22 15 46

It's only taking around 0.5ms, but I still find it strange that rstats is forcing the entire document to relayout. And in terms of a single frame, that's almost 3% of the total time allotted for 60fps. Obviously rendering rstats is not free, but it should ideally use as little time as possible.

Thanks for making rstats, it's been really cool to use!

Feature: Count over time

I think I'm looking for something like:

function physicsEngineCollisionCallback(a, b) {
  rstats('collisions').mark(); // alternative: .inc()
}

The idea being that we want to know the "flow frequency" of how many collisions are happening over time without manually managing decay.

I could also see this being used to monitor a stream:

someStream.on('data', function(chunk) {
  rstats('someStream emit').mark();
});

If I wanted to measure flow rate, .set is good enough, but not for frequency of flow.

Perhaps this is possible today, and I'm missing something?

For context, I'm measuring both a standard game loop as well as when asynchronous messages arrive via postMessage from a web worker:

worker.addEventListener('message', function(ev) {
  rstats('msgs: recv').tick();
  rstats().update(); // ensure the graph always reflects
  // Do stuff with message
});

.tick will measure the time between calls, but I want to measure how many calls over time. Not sure how best to handle that, which is why I'm opening this ticket.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.