static void ProcessQuery <P>(IStreamable <Empty, P> query, string name) { GC.Collect(); GC.WaitForPendingFinalizers(); Console.WriteLine("Query: {0}", name); Stopwatch sw = new Stopwatch(); sw.Start(); for (int i = 0; i < NumRepeats; i++) { using (var result = query.Cache()) { } } GC.Collect(); GC.WaitForPendingFinalizers(); sw.Stop(); Console.WriteLine("Throughput: {0} K ev/sec", ((long)NumRepeats * TotalInputEvents) / sw.ElapsedMilliseconds); }