Created
December 12, 2013 13:22
-
-
Save itayw/7927865 to your computer and use it in GitHub Desktop.
stats incr in joola.io
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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