コード例 #1
0
ファイル: TestImportDMS3.cs プロジェクト: ruo2012/Pisces
        public void ImportParameterWithUnderscore()
        {
            Logger.OnLogEvent += Logger_OnLogEvent;
            var fn1 = FileUtility.GetTempFileName(".pdb");

            Console.WriteLine(fn1);
            var svr = new SQLiteServer(fn1);
            var db  = new TimeSeriesDatabase(svr, Reclamation.TimeSeries.Parser.LookupOption.TableName, false);

            var tmpDir = TestRatingTableDependency.CopyTestDecodesFileToTempDirectory("instant_20150708152901.txt");

            FileImporter import = new FileImporter(db);

            import.Import(tmpDir, RouteOptions.None, computeDependencies: true, searchPattern: "*.txt");
            db.Inventory();
            //Assert.IsFalse(anyErrors);
        }
コード例 #2
0
ファイル: TestRawGoesData.cs プロジェクト: woohn/Pisces
        public void ProcessRawFile()
        {
            FileUtility.CleanTempPath();
            Performance perf = new Performance();
            var         fn1  = FileUtility.GetTempFileName(".pdb");

            Console.WriteLine(fn1);
            var svr = new SQLiteServer(fn1);
            var db  = new TimeSeriesDatabase(svr, Reclamation.TimeSeries.Parser.LookupOption.TableName, false);

            Logger.EnableLogger();

            var tmpDir = TestRatingTableDependency.CopyTestDecodesFileToTempDirectory("bigi.txt");

            FileImporter import = new FileImporter(db);

            import.Import(tmpDir, searchPattern: "*.txt");
            //Assert.IsTrue(db.GetSeriesCatalog().Count>1);
            perf.Report();// 5.4 seconds
        }
コード例 #3
0
        public void ImportParameterWithUnderscore()
        {
            Logger.OnLogEvent += Logger_OnLogEvent;
            var fn1 = FileUtility.GetTempFileName(".pdb");

            Console.WriteLine(fn1);
            var svr = new SQLiteServer(fn1);
            var db  = new TimeSeriesDatabase(svr, Reclamation.TimeSeries.Parser.LookupOption.TableName, false);

            var tmpDir = TestRatingTableDependency.CopyTestDecodesFileToTempDirectory("curdata_2018-1-2.csv", "efo");

            FileImporter import = new FileImporter(db);

            import.Import(tmpDir, computeDependencies: true, searchPattern: "*.txt");
            var sc = db.GetSeriesCatalog();

            Assert.AreEqual(86, sc.Rows.Count);
            db.Inventory();
            //Assert.IsFalse(anyErrors);
        }