public void Test(int count) { var lst = new List <SortedTreeTable <HistorianKey, HistorianValue> >(); for (int x = 0; x < count; x++) { lst.Add(CreateTable()); } using (var reader = new UnionTreeStream <HistorianKey, HistorianValue>(lst.Select(x => new ArchiveTreeStreamWrapper <HistorianKey, HistorianValue>(x)), true)) { var key = new HistorianKey(); var value = new HistorianValue(); Stopwatch sw = new Stopwatch(); sw.Start(); while (reader.Read(key, value)) { ; } sw.Stop(); System.Console.Write("{0}\t{1}\t{2}", count, sw.Elapsed.TotalSeconds, sw.Elapsed.TotalSeconds / count); System.Console.WriteLine(); } lst.ForEach(x => x.Dispose()); }
public void Test(int count) { var lst = new List<SortedTreeTable<HistorianKey, HistorianValue>>(); for (int x = 0; x < count; x++) { lst.Add(CreateTable()); } using (var reader = new UnionTreeStream<HistorianKey, HistorianValue>(lst.Select(x => new ArchiveTreeStreamWrapper<HistorianKey, HistorianValue>(x)), true)) { var key = new HistorianKey(); var value = new HistorianValue(); Stopwatch sw = new Stopwatch(); sw.Start(); while (reader.Read(key, value)) ; sw.Stop(); System.Console.Write("{0}\t{1}\t{2}", count, sw.Elapsed.TotalSeconds, sw.Elapsed.TotalSeconds / count); System.Console.WriteLine(); } lst.ForEach(x => x.Dispose()); }
protected override bool ReadNext(TKey key, TValue value) { return(m_reader.Read(key, value)); }