Skip to content

Commit

Permalink
Use array indexers instead of LINQ extension methods
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveDesmond-ca committed Nov 29, 2024
1 parent cfa0cca commit d37add0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions BenchmarkMockNet/Report.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ private async Task OutputResults()
_output.AppendLine();

var description = benchmark.CustomAttributes.First(a => a.AttributeType == typeof(DescriptionAttribute));
_output.AppendLine(description.ConstructorArguments.First().Value?.ToString());
_output.AppendLine(description.ConstructorArguments[0].Value?.ToString());

var file = Path.Combine("BenchmarkDotNet.Artifacts", "results", $"{benchmark.FullName}-report-github.md");
var content = await _fs.File.ReadAllTextAsync(file);
var table = content.Split("```").Last().Replace(content, "")
var sections = content.Split("```");
var table = sections[^1].Replace(content, "")
.Replace(" ns", "\u202Fns")
.Replace(" B", "\u202FB");

Expand Down

0 comments on commit d37add0

Please sign in to comment.