Skip to content

Instantly share code, notes, and snippets.

@rsumbaly
Created April 15, 2011 05:38
Show Gist options
  • Save rsumbaly/921195 to your computer and use it in GitHub Desktop.
Save rsumbaly/921195 to your computer and use it in GitHub Desktop.
ExecutorService service = Executors.newFixedThreadPool(1);
service.execute(new Runnable() {
public void run() {
try {
while(true) {
logger.info("=========PRINTING INFO=========");
logger.info("AvgTime\t" + storeStats.getAvgTimeInMs(Tracked.GET));
logger.info("MaxTime\t" + storeStats.getMaxLatencyInMs(Tracked.GET));
Thread.sleep(10 * 1000);
}
} catch(InterruptedException e) {
e.printStackTrace();
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment