protected void CreateTestMeasureList() { //goes through all the parameters var testParameters = this.SortedTestParameters.Values.First(); foreach (var testParameter in testParameters) { //gets average of rank for each test type var rankQuantity = new StatisticalQuantity((uint)this.TestsConfig.MultipleTestTypes.Length); foreach (var testType in TestsConfig.MultipleTestTypes) { rankQuantity.Value = this.SortedTestParameters[testType].IndexOf(testParameter); } //creates measure based on this rank avg and adds to list var rankMeasure = new TestMeasure { Value = rankQuantity.Mean, StdDev = rankQuantity.StdDev, Parameters = testParameter, ID = testParameter.ToString() }; this.TestMeasures.Add(testParameter, rankMeasure); } }
public TestMeasureList(IScenario scenario, TestMeasure baseMeasure) { if ((scenario == null) || (baseMeasure == null)) { throw new ArgumentException("scenario and base measure cannot be null"); } this._baseMeasure = baseMeasure; this.scenario = scenario; this.WriteTemp = true; }
public virtual void Add(ITestParameters parameters, TestMeasure measure) { //locks from outside access lock (this.locker) if (!this.Contains(parameters)) { this.testMeasures.Add(parameters, measure); //writes test results to temp file if (this.WriteTemp && (this._tempWriter != null) && (this._tempWriter.BaseStream != null) && this._tempWriter.BaseStream.CanWrite) { this._tempWriter.WriteLine(measure.ToValue().ToString(CSV_SEPARATOR)); } } }