Skip to content

Commit

Permalink
Merge pull request #131 from flcdrg/XmlHelp
Browse files Browse the repository at this point in the history
Enable building XML documentation files.
  • Loading branch information
Aaronontheweb authored Aug 27, 2016
2 parents ebc2a2f + f333dda commit 126e1d9
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public bool CanWarmup
var value = counter.RawValue;
return true;
}
catch (Exception ex)
catch (Exception)
{
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion src/NBench/Collection/Memory/TotalMemorySelector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
namespace NBench.Collection.Memory
{
/// <summary>
/// Allocator responsible for choosing between <see cref="GcTotalMemoryCollector"/> and <see cref="PerformanceCounterTotalMemoryCollector"/>,
/// Allocator responsible for choosing the appropriate memory collector implementation,
/// depending on user settings and <see cref="SysInfo"/>.
/// </summary>
public class TotalMemorySelector : MetricsCollectorSelector
Expand Down
4 changes: 2 additions & 2 deletions src/NBench/MemoryMeasurementAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ public MemoryAssertionAttribute(MemoryMetric metric, MustBe condition, double av
}

/// <summary>
/// The test we're going to perform against the collected value of <see cref="Metric" />
/// The test we're going to perform against the collected value of <see cref="MemoryMetric" />
/// and <see cref="AverageBytes" />.
/// </summary>
public MustBe Condition { get; }

/// <summary>
/// The value that will be compared against the collected metric for <see cref="Metric" />.
/// The value that will be compared against the collected metric for <see cref="MemoryMetric" />.
/// </summary>
public double AverageBytes { get; }

Expand Down
6 changes: 6 additions & 0 deletions src/NBench/NBench.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@
<CodeContractsRuntimeCheckingLevel>Full</CodeContractsRuntimeCheckingLevel>
<CodeContractsReferenceAssembly>Build</CodeContractsReferenceAssembly>
<CodeContractsAnalysisWarningLevel>0</CodeContractsAnalysisWarningLevel>
<DocumentationFile>bin\Debug\NBench.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>1591</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -72,6 +75,9 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Release\NBench.xml</DocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>1591</NoWarn>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down
4 changes: 2 additions & 2 deletions src/NBench/Sdk/Compiler/IDiscovery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ public interface IDiscovery
/// instances.
/// </summary>
/// <param name="targetAssembly">The assembly we're going to scan for benchmarks.</param>
/// <returns>A list of <see cref="Benchmark"/>s we can run based on the classes found inside <see cref="targetAssembly"/>.</returns>
/// <returns>A list of <see cref="Benchmark"/>s we can run based on the classes found inside <paramref name="targetAssembly"/>.</returns>
IEnumerable<Benchmark> FindBenchmarks(Assembly targetAssembly);

/// <summary>
/// Uses reflection on the target assembly to discover <see cref="PerfBenchmarkAttribute"/>
/// instances.
/// </summary>
/// <param name="targetType">The type we're going to scan for benchmarks.</param>
/// <returns>A list of <see cref="Benchmark"/>s we can run based on the classes found inside <see cref="targetType"/>.</returns>
/// <returns>A list of <see cref="Benchmark"/>s we can run based on the classes found inside <paramref name="targetType"/>.</returns>
IEnumerable<Benchmark> FindBenchmarks(Type targetType);
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/NBench/Sdk/Compiler/ReflectionDiscovery.Configurators.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public static Type FindBestMatchingConfiguratorForMeasurement(Type measurementTy
/// <param name="exact">
/// If <c>true</c>, then this method will look for an exact 1:1 type match.
/// If <c>false</c>, which is the default then this method will return <c>true</c>
/// when any applicable types are assignable from <see cref="measurementType"/>.
/// when any applicable types are assignable from <paramref name="measurementType"/>.
/// </param>
/// <returns><c>true</c> if a match was found, <c>false</c> otherwise.</returns>
public static bool ConfiguratorSupportsMeasurement(Type measurementType,
Expand Down Expand Up @@ -171,10 +171,10 @@ private static bool SupportsType(Type measurementType, Type configuratorType, bo
}

/// <summary>
/// Check if a given <see cref="configuratorType"/> is a valid implementation of <see cref="IMeasurementConfigurator{T}"/>.
/// Check if a given <paramref name="configuratorType"/> is a valid implementation of <see cref="IMeasurementConfigurator{T}"/>.
/// </summary>
/// <param name="configuratorType">The <see cref="Type"/> we're going to test.</param>
/// <returns>true if <see cref="configuratorType"/> implements <see cref="IMeasurementConfigurator{T}"/>, false otherwise.</returns>
/// <returns>true if <paramref name="configuratorType"/> implements <see cref="IMeasurementConfigurator{T}"/>, false otherwise.</returns>
public static bool IsValidConfiguratorType(Type configuratorType)
{
return GetConfiguratorInterfaces(configuratorType).Any();
Expand Down
2 changes: 1 addition & 1 deletion src/NBench/Sdk/Compiler/ReflectionDiscovery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public static IBenchmarkInvoker CreateInvokerForBenchmark(BenchmarkClassMetadata

/// <summary>
/// Finds all classes with at least one method decorated with a <see cref="PerfBenchmarkAttribute" />.
/// inside <see cref="targetAssembly" />.
/// inside <paramref name="targetAssembly" />.
/// </summary>
/// <param name="targetAssembly">The assembly we're scanning for benchmarks.</param>
/// <returns>
Expand Down
8 changes: 4 additions & 4 deletions src/NBench/Sdk/IMeasurementConfigurator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ public interface IMeasurementConfigurator<in T> : IMeasurementConfigurator where
/// <summary>
/// Produce a <see cref="IBenchmarkSetting"/> implementation that will be used to tell the
/// <see cref="Benchmark"/> class which <see cref="Assertion"/>, if any, it should perform against the
/// <see cref="MetricCollector"/> data produced for this setting by the <see cref="MeasurementConfigurator{T}.GetMetricsProvider"/> method
/// <see cref="MetricCollector"/> data produced for this setting by the <see cref="MeasurementConfigurator{T}.GetMetricsProvider(NBench.MeasurementAttribute)"/> method
/// on this configurator.
/// </summary>
/// <param name="instance">
/// An instance of the <see cref="MeasurementAttribute"/> type that corresponds to this configurator.
/// Must not be <c>null</c>.
/// </param>
/// <returns>An <see cref="IBenchmarkSetting"/> implementation instance built specifically for <see cref="T"/></returns>
/// <returns>An <see cref="IBenchmarkSetting"/> implementation instance built specifically for <typeparamref name="T"/></returns>
IEnumerable<IBenchmarkSetting> GetBenchmarkSettings(T instance);
}

Expand Down Expand Up @@ -84,14 +84,14 @@ public interface IMeasurementConfigurator
/// <summary>
/// Produce a <see cref="IBenchmarkSetting"/> implementation that will be used to tell the
/// <see cref="Benchmark"/> class which <see cref="Assertion"/>, if any, it should perform against the
/// <see cref="MetricCollector"/> data produced for this setting by the <see cref="MeasurementConfigurator{T}.GetMetricsProvider"/> method
/// <see cref="MetricCollector"/> data produced for this setting by the <see cref="MeasurementConfigurator{T}.GetMetricsProvider(NBench.MeasurementAttribute)"/> method
/// on this configurator.
/// </summary>
/// <param name="instance">
/// An instance of the <see cref="MeasurementAttribute"/> type that corresponds to this configurator.
/// Must not be <c>null</c>.
/// </param>
/// <returns>A list of <see cref="IBenchmarkSetting"/> implementation instances built specifically for <see cref="T"/></returns>
/// <returns>A list of <see cref="IBenchmarkSetting"/> implementation instances built specifically for <paramref name="instance"/></returns>
IEnumerable<IBenchmarkSetting> GetBenchmarkSettings(MeasurementAttribute instance);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/NBench/Sdk/MeasurementConfigurator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,14 @@ public IEnumerable<IBenchmarkSetting> GetBenchmarkSettings(MeasurementAttribute
/// <summary>
/// Produce a <see cref="IBenchmarkSetting"/> implementation that will be used to tell the
/// <see cref="Benchmark"/> class which <see cref="Assertion"/>, if any, it should perform against the
/// <see cref="MetricCollector"/> data produced for this setting by the <see cref="GetMetricsProvider"/> method
/// <see cref="MetricCollector"/> data produced for this setting by the <see cref="GetMetricsProvider(NBench.MeasurementAttribute)"/> method
/// on this configurator.
/// </summary>
/// <param name="instance">
/// An instance of the <see cref="MeasurementAttribute"/> type that corresponds to this configurator.
/// Must not be <c>null</c>.
/// </param>
/// <returns><see cref="IBenchmarkSetting"/> implementation instances built specifically for <see cref="T"/></returns>
/// <returns><see cref="IBenchmarkSetting"/> implementation instances built specifically for T</returns>
public abstract IEnumerable<IBenchmarkSetting> GetBenchmarkSettings(T instance);
}
}
Expand Down

0 comments on commit 126e1d9

Please sign in to comment.