private static MeasurementColumn[] BuildColumns() { // Target var columns = new List <MeasurementColumn> { new MeasurementColumn("Target", (summary, report, m) => report.Benchmark.Target.Type.Name + "." + report.Benchmark.Target.MethodDisplayInfo), new MeasurementColumn("Target_Namespace", (summary, report, m) => report.Benchmark.Target.Type.Namespace), new MeasurementColumn("Target_Type", (summary, report, m) => report.Benchmark.Target.Type.Name), new MeasurementColumn("Target_Method", (summary, report, m) => report.Benchmark.Target.MethodDisplayInfo) }; // Job foreach (var characteristic in CharacteristicHelper.GetAllPresentableCharacteristics(typeof(Job), true)) { columns.Add(new MeasurementColumn("Job_" + characteristic.Id, (summary, report, m) => Presenter.ToPresentation(report.Benchmark.Job, characteristic))); } columns.Add(new MeasurementColumn("Job_Display", (summary, report, m) => report.Benchmark.Job.DisplayInfo)); // Params columns.Add(new MeasurementColumn("Params", (summary, report, m) => report.Benchmark.Parameters.PrintInfo)); // Measurements columns.Add(new MeasurementColumn("Measurement_LaunchIndex", (summary, report, m) => m.LaunchIndex.ToString())); columns.Add(new MeasurementColumn("Measurement_IterationMode", (summary, report, m) => m.IterationMode.ToString())); columns.Add(new MeasurementColumn("Measurement_IterationIndex", (summary, report, m) => m.IterationIndex.ToString())); columns.Add(new MeasurementColumn("Measurement_Nanoseconds", (summary, report, m) => m.Nanoseconds.ToStr())); columns.Add(new MeasurementColumn("Measurement_Operations", (summary, report, m) => m.Operations.ToString())); columns.Add(new MeasurementColumn("Measurement_Value", (summary, report, m) => (m.Nanoseconds / m.Operations).ToStr())); return(columns.ToArray()); }
public CharacteristicHelper GetCharacteristic() { IEnumerable <Characteristic> characteristics = _dataCharacter.Get(); IEnumerable <Note_Characteristic> characteristicsOfNote = _dataNoteCharacter.Get(); CharacteristicHelper helper = new CharacteristicHelper() { Characteristics = characteristics, CharacteristicsOfNote = characteristicsOfNote }; return(helper); }
public CharacteristicHelper GetCharacteristic(int id) { IEnumerable <Note_Characteristic> characteristicsOfNote = _dataNoteCharacter.GetBy("Id_Note", id.ToString()); IEnumerable <Characteristic> characteristics = _dataCharacter.Get().Join(characteristicsOfNote, f => f.Id_Characteristic, f => f.Id_Characteristic, (f1, f2) => f1); CharacteristicHelper helper = new CharacteristicHelper() { Characteristics = characteristics, CharacteristicsOfNote = characteristicsOfNote }; return(helper); }
public static void Test07GetCharacteristics() { // Update expected values only if Job properties were changed. // Otherwise, there's a bug. var a = CharacteristicHelper .GetThisTypeCharacteristics(typeof(Job)) .Select(c => c.Id); Equal(string.Join(";", a), "Id;Accuracy;Env;Infrastructure;Run"); a = CharacteristicHelper .GetAllCharacteristics(typeof(Job)) .Select(c => c.Id); Equal(string.Join(";", a), "Id;Accuracy;AnalyzeLaunchVariance;EvaluateOverhead;" + "MaxAbsoluteError;MaxRelativeError;MinInvokeCount;MinIterationTime;RemoveOutliers;Env;Affinity;" + "Jit;Platform;Runtime;Gc;AllowVeryLargeObjects;Concurrent;CpuGroups;Force;" + "RetainVm;Server;Infrastructure;Arguments;BuildConfiguration;Clock;EngineFactory;EnvironmentVariables;Toolchain;Run;InvocationCount;IterationTime;" + "LaunchCount;RunStrategy;TargetCount;UnrollFactor;WarmupCount"); }
public static void Test07GetCharacteristics() { // Update expected values only if Job properties were changed. // Otherwise, there's a bug. var a = CharacteristicHelper .GetThisTypeCharacteristics(typeof(Job)) .Select(c => c.Id); Assert.Equal("Id;Accuracy;Environment;Infrastructure;Meta;Run", string.Join(";", a)); a = CharacteristicHelper .GetAllCharacteristics(typeof(Job)) .Select(c => c.Id); Assert.Equal("Id;Accuracy;AnalyzeLaunchVariance;EvaluateOverhead;" + "MaxAbsoluteError;MaxRelativeError;MinInvokeCount;MinIterationTime;OutlierMode;Environment;Affinity;EnvironmentVariables;" + "Jit;Platform;Runtime;Gc;AllowVeryLargeObjects;Concurrent;CpuGroups;Force;HeapAffinitizeMask;HeapCount;NoAffinitize;" + "RetainVm;Server;Infrastructure;Arguments;BuildConfiguration;Clock;EngineFactory;NugetReferences;Toolchain;Meta;Baseline;IsDefault;IsMutator;Run;InvocationCount;IterationCount;IterationTime;" + "LaunchCount;MaxIterationCount;MaxWarmupIterationCount;MinIterationCount;MinWarmupIterationCount;RunStrategy;UnrollFactor;WarmupCount", string.Join(";", a)); }