Skip to content

Instantly share code, notes, and snippets.

@itayw
Created December 12, 2013 13:22
Show Gist options
  • Save itayw/7927865 to your computer and use it in GitHub Desktop.
Save itayw/7927865 to your computer and use it in GitHub Desktop.
stats incr in joola.io
function getInterval(){
//The interval in ms
return Math.floor(Math.random() * 1500) + 1
}
function getValue(){
//The value to push
return Math.floor(Math.random() * 100) + 0
}
function run(){
joola.stats.incr('dummy:counter');
setTimeout(run, getInterval());
}
setTimeout(run, getInterval());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment