etsy / statsd-jvm-profiler

Simple JVM Profiler Using StatsD and Other Metrics Backends
MIT License
330 stars 93 forks source link

refresh graphs every minute #12

Closed stickperson closed 9 years ago

stickperson commented 9 years ago

Wrap graphing logic in a function that's called recursively every minute. The recursive call could be problematic. Maybe have some way to clear the setTimeout after some time?

ajsquared commented 9 years ago

What do you think of doing something like setTimeout( function() { location.reload(); }, 60 * 1000 ); instead of the recursive call?

stickperson commented 9 years ago

That's a much simpler solution. Even if the refresh interval is every 30s, I don't see a drawback in reloading the entire page.

ajsquared commented 9 years ago

It would be interesting to have the refresh interval be configurable, but I don't have any strong feelings about either a 30s vs a 60s refresh period.

ajsquared commented 9 years ago

Looks great, thanks for this!