public ExperimentRunner(DataBaseTypeEnums databaseType) { switch (databaseType) { case DataBaseTypeEnums.UnitTest: case DataBaseTypeEnums.SqlServerWithCommandQuery: { this.dbPerformanceMonitor = new SqlCommandParamQueryPerformanceMonitor(Configuration.SqlConnectionString); this.dbManager = new SqlDatabaseManager(Configuration.SqlConnectionString); } break; case DataBaseTypeEnums.MongoDbNormalizedWriteAck: { this.dbPerformanceMonitor = new MongoPerformanceMonitor(Configuration.MongoConnectionString, Configuration.DatabaseName); this.dbManager = new MongoDatabaseManager(Configuration.MongoConnectionString, Configuration.DatabaseName); } break; default: Console.WriteLine("There is no performance monitor for the given database type."); return; } this.databaseType = databaseType; this.recorder = new Recorder(databaseType); this.stopwatch = new Stopwatch(); this.results = new List <PerformanceResult>(); }
public Recorder(DataBaseTypeEnums dataBaseType) { this.dataBaseType = dataBaseType; }