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>();
        }
Пример #2
0
 public Recorder(DataBaseTypeEnums dataBaseType)
 {
     this.dataBaseType = dataBaseType;
 }
Пример #3
0
 public Recorder(DataBaseTypeEnums dataBaseType)
 {
    this.dataBaseType = dataBaseType;
 }