// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
package dbcache;

import java.net.URISyntaxException;
import java.sql.SQLException;

public class Monitor extends Utility {
    private static void monitor() throws InterruptedException {
        while(true) {
            for(int i = 0; i < counters.size(); i++) {
                System.out.printf("%s : %d\n", labels.get(i), dals.get(i).getCounter(counters.get(i)));
            }
            System.out.println("====");
            Thread.sleep(10000);
        }
    }
    public static void main(String[] args) throws ClassNotFoundException, SQLException, InterruptedException, URISyntaxException {
        addAll();
        monitor();
        closeAll();
    }
}
