Skip to content

Commit

Permalink
make FullNameProvider public so it can be reused by the dotnet/perfor…
Browse files Browse the repository at this point in the history
…mance repository

/cc @billwert
  • Loading branch information
adamsitnik committed May 23, 2019
1 parent 6e65594 commit 6d71308
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/BenchmarkDotNet/Exporters/FullNameProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
using BenchmarkDotNet.Extensions;
using BenchmarkDotNet.Parameters;
using BenchmarkDotNet.Running;
using JetBrains.Annotations;

namespace BenchmarkDotNet.Exporters
{
internal static class FullNameProvider
public static class FullNameProvider
{
private static readonly IReadOnlyDictionary<Type, string> Aliases = new Dictionary<Type, string>
{
Expand Down Expand Up @@ -45,10 +46,10 @@ internal static class FullNameProvider
{ typeof(char?), "char?" }
};

internal static string GetBenchmarkName(BenchmarkCase benchmarkCase)
[PublicAPI("used by the dotnet/performance repository")]
public static string GetBenchmarkName(BenchmarkCase benchmarkCase)
{
var type = benchmarkCase.Descriptor.Type;
var method = benchmarkCase.Descriptor.WorkloadMethod;

// we can't just use type.FullName because we need sth different for generics (it reports SimpleGeneric`1[[System.Int32, mscorlib, Version=4.0.0.0)
var name = new StringBuilder();
Expand Down

0 comments on commit 6d71308

Please sign in to comment.