// Collection of code snippets by Arne Vajhøj // (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) using System; using System.Threading; using DBCache.Util; namespace DBCache.Monitor { public class Program : Utility { private static void Monitor() { while(true) { for(int i = 0; i < counters.Count; i++) { Console.WriteLine("{0} : {1}", labels[i], dals[i].GetCounter(counters[i])); } Console.WriteLine("===="); Thread.Sleep(10000); } } public static void Main(string[] args) { StackExchange.Redis.ConnectionMultiplexer con = StackExchange.Redis.ConnectionMultiplexer.Connect("localhost:6379"); NHibernate.Caches.Redis.RedisCacheProvider.SetConnectionMultiplexer(con); AddAll(); Monitor(); CloseAll(); } } }