public void exportToSqliteTest1() { if (File.Exists(sqliteOutfileName)) { File.Delete(sqliteOutfileName); } Run run = new XCaliburRun(xcaliburTestfile); ScanSetCollectionCreator scansetCreator = new ScanSetCollectionCreator(run, 6000, 6020, 1, 1, false); scansetCreator.Create(); Task msgen = new GenericMSGenerator(); Task peakDetector = new DeconToolsPeakDetector(); ((DeconToolsPeakDetector)peakDetector).StorePeakData = true; Task exporter = new PeakListSQLiteExporter(1000000, sqliteOutfileName); //trigger of 1E5 = 310 sec (memory = 150 MB); trigger of 1E6 = 231 Sec (memory = 250 MB); foreach (ScanSet scan in run.ScanSetCollection.ScanSetList) { run.CurrentScanSet = scan; msgen.Execute(run.ResultCollection); peakDetector.Execute(run.ResultCollection); Stopwatch sw = new Stopwatch(); sw.Start(); exporter.Execute(run.ResultCollection); sw.Stop(); if (sw.ElapsedMilliseconds > 5) { Console.WriteLine("PeakListExporter execution time = " + sw.ElapsedMilliseconds); } } exporter.Cleanup(); Assert.AreEqual(true, File.Exists(sqliteOutfileName)); FileInfo fi = new FileInfo(sqliteOutfileName); Assert.AreEqual(81920, fi.Length); Console.Write(fi.Length); }
public static IPeakListExporter Create(Globals.ExporterType exporterType, Globals.MSFileType fileType, int triggerValue, string outputFileName) { IPeakListExporter exporter; switch (exporterType) { case Globals.ExporterType.Text: exporter = new PeakListTextExporter(fileType, triggerValue, outputFileName); break; case Globals.ExporterType.Sqlite: exporter = new PeakListSQLiteExporter(triggerValue, outputFileName); break; default: exporter = new PeakListTextExporter(fileType, triggerValue, outputFileName); break; } return(exporter); }