public void Run(long samples) { if (!System.IO.File.Exists(m_options.Dbpath)) { throw new UserInformationException(string.Format("Database file does not exist: {0}", m_options.Dbpath), "DatabaseDoesNotExist"); } using (var db = new LocalTestDatabase(m_options.Dbpath)) using (var backend = new BackendManager(m_backendurl, m_options, m_results.BackendWriter, db)) { db.SetResult(m_results); Utility.UpdateOptionsFromDb(db, m_options); Utility.VerifyParameters(db, m_options); db.VerifyConsistency(m_options.Blocksize, m_options.BlockhashSize, true, null); if (!m_options.NoBackendverification) { var backupDatabase = new LocalBackupDatabase(db, m_options); var latestFilelist = backupDatabase.GetTemporaryFilelistVolumeNames(latestOnly: true); FilelistProcessor.VerifyRemoteList(backend, m_options, db, m_results.BackendWriter, latestFilelist); } DoRun(samples, db, backend); db.WriteResults(); } }
public void Run(long samples) { if (!System.IO.File.Exists(m_options.Dbpath)) { throw new Exception(string.Format("Database file does not exist: {0}", m_options.Dbpath)); } using (var db = new LocalTestDatabase(m_options.Dbpath)) using (var backend = new BackendManager(m_backendurl, m_options, m_results.BackendWriter, db)) { db.SetResult(m_results); Utility.VerifyParameters(db, m_options); if (!m_options.NoBackendverification) { FilelistProcessor.VerifyRemoteList(backend, m_options, db, m_results.BackendWriter); } DoRun(samples, db, backend); db.WriteResults(); } }