Skip to content
  •  
  •  
  •  
13 changes: 12 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ end_of_line = lf
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = unset
insert_final_newline = true

# JSON files
[*.json]
Expand All @@ -29,8 +29,19 @@ end_of_line = crlf
[*.md]
trim_trailing_whitespace = false

# Verify settings
[*.{received,verified}.txt]
charset = utf-8-bom
indent_size = unset
indent_style = unset
insert_final_newline = false
tab_width = unset
trim_trailing_whitespace = false

# C# files
[*.cs]
csharp_space_after_cast = true

# IDE0160: Use block-scoped namespace
csharp_style_namespace_declarations=file_scoped:suggestion

Expand Down
2 changes: 1 addition & 1 deletion build/BenchmarkDotNet.Build/BuildContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,4 @@ public void RunOnlyInPushMode(Action action)
else
this.Information(" Skip because PushMode is disabled");
}
}
}
2 changes: 1 addition & 1 deletion build/BenchmarkDotNet.Build/CommandLineParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -334,4 +334,4 @@ private void WriteLine(string message = "", ConsoleColor? color = null)
Write(message, color);
Console.WriteLine();
}
}
}
2 changes: 1 addition & 1 deletion build/BenchmarkDotNet.Build/EnvVar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ public void AssertHasValue()
}

public void SetEmpty() => Environment.SetEnvironmentVariable(Name, "");
}
}
2 changes: 1 addition & 1 deletion build/BenchmarkDotNet.Build/Example.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ public Example WithArgument(StringOption option, string value)


public record Argument(string Name, string? Value, bool IsMsBuild);
}
}
2 changes: 1 addition & 1 deletion build/BenchmarkDotNet.Build/HelpInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ public class HelpInfo
public IOption[] Options { get; init; } = Array.Empty<IOption>();
public EnvVar[] EnvironmentVariables { get; init; } = Array.Empty<EnvVar>();
public Example[] Examples { get; init; } = Array.Empty<Example>();
}
}
2 changes: 1 addition & 1 deletion build/BenchmarkDotNet.Build/Helpers/OctokitExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ public static string ToByStr(this GitHubCommit commit)
return commit.Author.ToStr("by");
return commit.Commit.Author != null ? commit.Commit.Author.ToStr("by") : "";
}
}
}
2 changes: 1 addition & 1 deletion build/BenchmarkDotNet.Build/Helpers/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ public static string[] GetTargetFrameworks(BuildContext context)
: ["net10.0"];
}
}
}
}
2 changes: 1 addition & 1 deletion build/BenchmarkDotNet.Build/IHelpProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ namespace BenchmarkDotNet.Build;
public interface IHelpProvider
{
HelpInfo GetHelp();
}
}
2 changes: 1 addition & 1 deletion build/BenchmarkDotNet.Build/Meta/Repo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ public static async Task<int> GetDependentProjectsNumber()
return number;
}

}
}
2 changes: 1 addition & 1 deletion build/BenchmarkDotNet.Build/Meta/VersionHistory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ public VersionHistory(BuildContext context, FilePath versionFilePath)
CurrentVersion = lines.Last();
StableVersions = lines.Skip(1).SkipLast(1).ToArray();
}
}
}
2 changes: 1 addition & 1 deletion build/BenchmarkDotNet.Build/Options/BoolOption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ public void AssertTrue(BuildContext context)
if (!value)
throw new Exception($"{CommandLineName} is not specified");
}
}
}
2 changes: 1 addition & 1 deletion build/BenchmarkDotNet.Build/Options/IOption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ public interface IOption
string CommandLineName { get; }
string Description { get; }
string[] Aliases { get; }
}
}
2 changes: 1 addition & 1 deletion build/BenchmarkDotNet.Build/Options/KnownOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ public static class KnownOptions
{
Description = "When specified, the task actually perform push to GitHub and nuget.org"
};
}
}
2 changes: 1 addition & 1 deletion build/BenchmarkDotNet.Build/Options/Option.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ protected Option(string commandLineName)
.Where(context.HasArgument)
.Select(name => context.Arguments.GetArgument(name))
.FirstOrDefault();
}
}
2 changes: 1 addition & 1 deletion build/BenchmarkDotNet.Build/Options/StringOption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ public string AssertHasValue(BuildContext context)
throw new Exception($"{CommandLineName} is not specified");
return value;
}
}
}
2 changes: 1 addition & 1 deletion build/BenchmarkDotNet.Build/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -361,4 +361,4 @@ public class ReleaseTask : FrostingTask<BuildContext>, IHelpProvider
.WithArgument(KnownOptions.Push)
]
};
}
}
2 changes: 1 addition & 1 deletion build/BenchmarkDotNet.Build/Runners/BuildRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,4 @@ public void Pack()
};
context.DotNetPack(context.TemplatesTestsProjectFile.FullPath, settingsTemplate);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -269,4 +269,4 @@ private void EnsureSrcDirectoryExist(bool forceClone = false)
Log($"Fetch completed: '{Repo.ChangelogBranch}' -> '{SrcDirectory}'.");
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,4 @@ public static void Run(BuildContext context, DirectoryPath path,
context.Error(e.ToString());
}
}
}
}
2 changes: 1 addition & 1 deletion build/BenchmarkDotNet.Build/Runners/DocumentationRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,4 @@ private void GenerateRedirects()
context.GenerateFile(fullFilePath, content);
}
}
}
}
2 changes: 1 addition & 1 deletion build/BenchmarkDotNet.Build/Runners/GitRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,4 @@ private void RunCommand(Action? call, string commandLineArgs)
}
}
}
}
}
2 changes: 1 addition & 1 deletion build/BenchmarkDotNet.Build/Runners/ReleaseRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,4 @@ private static string PreprocessMarkdown(string content)

return newContent.ToString();
}
}
}
2 changes: 1 addition & 1 deletion build/BenchmarkDotNet.Build/Runners/UnitTestRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@ public void RunAnalyzerTests()
}

public void RunInTests(string tfm) => RunTests(IntegrationTestsProjectFile, "integration", tfm);
}
}
2 changes: 1 addition & 1 deletion samples/BenchmarkDotNet.Samples/IntroArguments.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ public void Benchmark(int a, int b)
Thread.Sleep(a + b);
}
}
}
}
2 changes: 1 addition & 1 deletion samples/BenchmarkDotNet.Samples/IntroArgumentsPriority.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ public IEnumerable<object[]> Numbers()
yield return new object[] { 1, 2 };
}
}
}
}
2 changes: 1 addition & 1 deletion samples/BenchmarkDotNet.Samples/IntroArgumentsSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ public static IEnumerable<TimeSpan> TimeSpans() // For single argument it's an I
yield return TimeSpan.FromMilliseconds(100);
}
}
}
}
2 changes: 1 addition & 1 deletion samples/BenchmarkDotNet.Samples/IntroArrayParam.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ public IEnumerable<object[]> Data()
yield return new object[] { Enumerable.Range(0, 100).ToArray(), 101 };
}
}
}
}
2 changes: 1 addition & 1 deletion samples/BenchmarkDotNet.Samples/IntroBenchmarkBaseline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ public class IntroBenchmarkBaseline
[Benchmark]
public void Time150() => Thread.Sleep(150);
}
}
}
2 changes: 1 addition & 1 deletion samples/BenchmarkDotNet.Samples/IntroCategories.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ public class IntroCategories
[BenchmarkCategory("B", "2")]
public void B2() => Thread.Sleep(10);
}
}
}
2 changes: 1 addition & 1 deletion samples/BenchmarkDotNet.Samples/IntroCategoryBaseline.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ public class IntroCategoryBaseline
[BenchmarkCategory("Slow"), Benchmark]
public void Time600() => Thread.Sleep(600);
}
}
}
2 changes: 1 addition & 1 deletion samples/BenchmarkDotNet.Samples/IntroCategoryDiscoverer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ public void Foo() { }
[Benchmark]
public void Bar() { }
}
}
}
2 changes: 1 addition & 1 deletion samples/BenchmarkDotNet.Samples/IntroColdStart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ public void Foo()
Thread.Sleep(10);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ public int CompareTo(object? obj)
}
}
}
}
}
2 changes: 1 addition & 1 deletion samples/BenchmarkDotNet.Samples/IntroConfigSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ public void Foo()
Thread.Sleep(10);
}
}
}
}
2 changes: 1 addition & 1 deletion samples/BenchmarkDotNet.Samples/IntroConfigUnion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ public void Foo()
Thread.Sleep(10);
}
}
}
}
4 changes: 2 additions & 2 deletions samples/BenchmarkDotNet.Samples/IntroCultureInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ private class Config : ManualConfig
{
public Config()
{
CultureInfo = (CultureInfo)CultureInfo.InvariantCulture.Clone();
CultureInfo = (CultureInfo) CultureInfo.InvariantCulture.Clone();
CultureInfo.NumberFormat.NumberDecimalSeparator = "@";
}
}

[Benchmark]
public void Foo() => Thread.Sleep(100);
}
}
}
2 changes: 1 addition & 1 deletion samples/BenchmarkDotNet.Samples/IntroCustomMono.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@ public void Foo()
// Benchmark body
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ public void Sample()

private void ShouldGetInlined() { }
}
}
}
2 changes: 1 addition & 1 deletion samples/BenchmarkDotNet.Samples/IntroDeferredExecution.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ public class IntroDeferredExecution
[Benchmark]
public void Ok() => (from number in numbers orderby number descending select number).Consume(consumer);
}
}
}
2 changes: 1 addition & 1 deletion samples/BenchmarkDotNet.Samples/IntroDisassembly.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ public int SumField()
return sum;
}
}
}
}
2 changes: 1 addition & 1 deletion samples/BenchmarkDotNet.Samples/IntroDisassemblyAllJits.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ public abstract class Operation // abstract unary integer operation
public override int Operate(int input) => input + Amount;
}
}
}
}
2 changes: 1 addition & 1 deletion samples/BenchmarkDotNet.Samples/IntroDisassemblyDry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ public void Foo()

}
}
}
}
2 changes: 1 addition & 1 deletion samples/BenchmarkDotNet.Samples/IntroDisassemblyRyuJit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ public int SumField()
return sum;
}
}
}
}
2 changes: 1 addition & 1 deletion samples/BenchmarkDotNet.Samples/IntroDotMemoryDiagnoser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ public int IterateEnumerable()
return count;
}
}
}
}
2 changes: 1 addition & 1 deletion samples/BenchmarkDotNet.Samples/IntroDotTraceDiagnoser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ private static int Fibonacci(int n)
return n <= 1 ? n : Fibonacci(n - 1) + Fibonacci(n - 2);
}
}
}
}
2 changes: 1 addition & 1 deletion samples/BenchmarkDotNet.Samples/IntroEventPipeProfiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ public class IntroEventPipeProfiler
[Benchmark]
public void Sleep() => Thread.Sleep(2000);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ public void RentAndReturn_Shared()
pool.Return(array);
}
}
}
}
2 changes: 1 addition & 1 deletion samples/BenchmarkDotNet.Samples/IntroExport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ public class IntroExport
[Benchmark]
public void Sleep50Noisy() => Thread.Sleep(random.Next(100));
}
}
}
2 changes: 1 addition & 1 deletion samples/BenchmarkDotNet.Samples/IntroExportJson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ public Config()
[Benchmark] public void Sleep10() => Thread.Sleep(10);
[Benchmark] public void Sleep20() => Thread.Sleep(20);
}
}
}
2 changes: 1 addition & 1 deletion samples/BenchmarkDotNet.Samples/IntroFilters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ public Config()
[Benchmark] public void C3() => Thread.Sleep(10);
[Benchmark] public void Aaa() => Thread.Sleep(10);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ public static void Run()
.AddValidator(ExecutionValidator.FailOnError));
}
}
}
}
Loading
Loading