private static void ReadEnsembles() { var sw = Stopwatch.StartNew(); var fn = @"c:\temp\ensemble_V71000.dss"; int count = 0; // initial 6 sec // using (DSSReader r = new DSSReader(fn, DSSReader.MethodID.MESS_METHOD_GLOBAL_ID, DSSReader.LevelID.MESS_LEVEL_CRITICAL)) { var paths = r.GetCatalog(); foreach (DSSPath item in paths) { var s = r.GetTimeSeries(item.PathWithoutDate); count++; if (count % 100 == 0) { Console.Write("."); } // if (count > 400) // break; } } Console.WriteLine(); sw.Stop(); Console.WriteLine(sw.Elapsed.TotalSeconds.ToString("F2")); }
public void GetCondensedPathNamesInterned() { using (DSSReader reader = new DSSReader(_fileToUse)) { var paths = reader.GetCatalog(_includeRecordType); } }
public static void ReadDataset(string filename) { // Testing - remove safety checks //DSSReader.UseTrainingWheels = false; DSSReader.UseTrainingWheels = false; using (var reader = new DSSReader(filename, DSSReader.MethodID.MESS_METHOD_GENERAL_ID, DSSReader.LevelID.MESS_LEVEL_NONE)) { var dssPaths = reader.GetCatalog(); // sorted //var pc = new PathComparer(); //var dssPaths = rawDssPaths.OrderBy(a => a, pc).ToArray(); // sorted int size = dssPaths.Count; if (size == 0) { throw new Exception("Empty DSS catalog"); } // /RUSSIANNAPA/APCC1/FLOW/01SEP2019/1HOUR/C:000002|T:0212019/ for (int i = 0; i < size; i++) { if (i % 100 == 0) { Console.Write("."); } DSSPath path = dssPaths[i]; //string location = path.Bpart; //int memberidx = int.Parse(path.Fpart.Split('|')[0].Split(':').Last().TrimStart('0')); // DateTime issueDate = ParseIssueDate(path.Fpart); var ts = reader.GetTimeSeries(path); } } }
public void GetCondensedPathNamesNotInterned() { using (DSSReader reader = new DSSReader(_fileToUse)) { //var paths = reader.GetCondensedPathNamesUnInterned(_includeRecordType, _headerInfo, _locationInfo); //throw new NotImplementedException("No longer in the file.. It sucks trust me"); } }