public void GcCollectionsSelector_should_create_1_GcCollectionsPerGenerationCollector_per_Generation() { var gcCollectionsSelector = new GcMeasurementConfigurator(); var gcGenerations = SysInfo.Instance.MaxGcGeneration; var gcSetting = new GcMeasurementAttribute(GcMetric.TotalCollections, GcGeneration.AllGc); var gcCollectors = gcCollectionsSelector.GetBenchmarkSettings(gcSetting).Cast<GcBenchmarkSetting>().ToList(); Assert.Equal(gcGenerations + 1,gcCollectors.Count); Assert.Equal(gcGenerations, (int)gcCollectors.Max(x => x.Generation)); }
public void GcCollectionsSelector_should_create_1_GcCollectionsPerGenerationCollector_per_Generation() { var gcCollectionsSelector = new GcMeasurementConfigurator(); var gcGenerations = SysInfo.Instance.MaxGcGeneration; var gcSetting = new GcMeasurementAttribute(GcMetric.TotalCollections, GcGeneration.AllGc); var gcCollectors = gcCollectionsSelector.GetBenchmarkSettings(gcSetting).Cast <GcBenchmarkSetting>().ToList(); Assert.Equal(gcGenerations + 1, gcCollectors.Count); Assert.Equal(gcGenerations, (int)gcCollectors.Max(x => x.Generation)); }