Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewvk committed May 23, 2016
1 parent b07d07a commit 6375e8d
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System;

using static BenchmarkDotNet.Loggers.HostLogger;

namespace BenchmarkDotNet.Competitions
{
internal static class CompetitionLimitConstants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ private bool UnionWithMax(double newMax)

public bool UnionWith(CompetitionLimit newProperties)
{
bool result = false;
var result = false;
result |= UnionWithMin(newProperties.Min);
result |= UnionWithMax(newProperties.Max);
return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ private static XDocument[] GetDocumentsFromLogCore(string previousLogUri)
var result = new List<XDocument>();

var buffer = new StringBuilder();
bool append = false;
var append = false;
foreach (var logLine in File.ReadLines(previousLogUri))
{
if (logLine.StartsWith(LogAnnotationStart, StringComparison.OrdinalIgnoreCase))
Expand Down Expand Up @@ -288,7 +288,7 @@ public static void LogAdjustedCompetitionTargets(
ILogger logger)
{

bool updated = false;
var updated = false;
var xDoc = CreateEmptyResourceDoc(true);
foreach (var competitionTarget in competitionTargets)
{
Expand Down
2 changes: 1 addition & 1 deletion BenchmarkDotNet/tests/PerfTestConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public PerfTestConfig() : this(Platform.Host, false) { }

private PerfTestConfig(Platform platform, bool noWarmup)
{
var job = new Job()
var job = new Job
{
LaunchCount = 1,
Mode = Mode.SingleRun,
Expand Down
1 change: 0 additions & 1 deletion BenchmarkDotNet/tests/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static class CompetitionLimitsAnalyserTest
public static void TestCompetitionLimitsAnalyser()
{
var config = PerfTestConfig.NoWarmup;
var expectedRunCount = 2 * PerfTestConfig.ExpectedRunCountNoWarmup;
const int expectedRunCount = 2 * PerfTestConfig.ExpectedRunCountNoWarmup;

Interlocked.Exchange(ref _testCount, 0);
var summary = CompetitionBenchmarkRunner.Run<EmptyBenchmark>(config);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\BenchmarkDotNet\src\CodeJam.BenchmarkDotNet.csproj">
<Project>{1D650545-A151-4211-8C29-C38A939403A6}</Project>
<Project>{1d650545-a151-4211-8c29-c38a939403a6}</Project>
<Name>CodeJam.BenchmarkDotNet</Name>
</ProjectReference>
<ProjectReference Include="..\..\Main\src\CodeJam.Main.csproj">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;

Expand Down Expand Up @@ -77,7 +76,7 @@ public RangeStub(RangeBoundaryFrom<T> from, RangeBoundaryTo<T> to)
public bool IsEmpty => From.IsEmpty;
public bool IsNotEmpty => From.IsNotEmpty;

public RangeStub<T> CreateRange(RangeBoundaryFrom<T> @from, RangeBoundaryTo<T> to) =>
public RangeStub<T> CreateRange(RangeBoundaryFrom<T> from, RangeBoundaryTo<T> to) =>
new RangeStub<T>(from, to);

public RangeStub<T> TryCreateRange(RangeBoundaryFrom<T> from, RangeBoundaryTo<T> to) =>
Expand Down Expand Up @@ -122,7 +121,7 @@ public RangeStubCompact(RangeBoundaryFrom<T> from, RangeBoundaryTo<T> to)
public bool IsEmpty => From.IsEmpty;
public bool IsNotEmpty => From.IsNotEmpty;

public RangeStubCompact<T> CreateRange(RangeBoundaryFrom<T> @from, RangeBoundaryTo<T> to) =>
public RangeStubCompact<T> CreateRange(RangeBoundaryFrom<T> from, RangeBoundaryTo<T> to) =>
new RangeStubCompact<T>(from, to);

public RangeStubCompact<T> TryCreateRange(RangeBoundaryFrom<T> from, RangeBoundaryTo<T> to) =>
Expand Down Expand Up @@ -154,7 +153,7 @@ public RangeStub(RangeBoundaryFrom<T> from, RangeBoundaryTo<T> to, TKey key)
public bool IsEmpty => From.IsEmpty;
public bool IsNotEmpty => From.IsNotEmpty;

public RangeStub<T, TKey> CreateRange(RangeBoundaryFrom<T> @from, RangeBoundaryTo<T> to) =>
public RangeStub<T, TKey> CreateRange(RangeBoundaryFrom<T> from, RangeBoundaryTo<T> to) =>
new RangeStub<T, TKey>(from, to, Key);

public RangeStub<T, TKey> TryCreateRange(RangeBoundaryFrom<T> from, RangeBoundaryTo<T> to) =>
Expand Down
1 change: 0 additions & 1 deletion Main/tests-performance/AssemblyWideConfig.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;

using BenchmarkDotNet.Competitions;
using BenchmarkDotNet.Configs;

using JetBrains.Annotations;
Expand Down
2 changes: 0 additions & 2 deletions Main/tests-performance/Program.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using System;
using System.Diagnostics;

using BenchmarkDotNet.Helpers;

using JetBrains.Annotations;

namespace CodeJam
Expand Down
7 changes: 4 additions & 3 deletions Main/tests/Collections/ComparerBuilderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,12 @@ public void DistinctByMember3Test()
}

[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
class IdentifierAttribute : Attribute
private class IdentifierAttribute : Attribute
{
}

class TestClass2
[UsedImplicitly(ImplicitUseTargetFlags.WithMembers)]
private class TestClass2
{
[Identifier]
public int EntityType { get; set; }
Expand All @@ -165,7 +166,7 @@ class TestClass2
public string Name { get; set; }
}

IEnumerable<MemberAccessor> GetIdentifiers(TypeAccessor typeAccessor)
private static IEnumerable<MemberAccessor> GetIdentifiers(TypeAccessor typeAccessor)
{
foreach (var member in typeAccessor.Members)
if (member.MemberInfo.GetCustomAttribute<IdentifierAttribute>() != null)
Expand Down

0 comments on commit 6375e8d

Please sign in to comment.