minor cleanup: rename LLVM => Llvm, remove [Obsolete] things
This commit is contained in:
Родитель
356a395a0d
Коммит
0121a6fde6
|
@ -1,3 +1,2 @@
|
|||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=GC/@EntryIndexedValue">GC</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=LLVM/@EntryIndexedValue">LLVM</s:String></wpf:ResourceDictionary>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=GC/@EntryIndexedValue">GC</s:String></wpf:ResourceDictionary>
|
|
@ -2,8 +2,6 @@
|
|||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using BenchmarkDotNet.Extensions;
|
||||
using BenchmarkDotNet.Helpers;
|
||||
using BenchmarkDotNet.Portability;
|
||||
using BenchmarkDotNet.Reports;
|
||||
|
||||
namespace BenchmarkDotNet.Analysers
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
namespace BenchmarkDotNet.Attributes.Jobs
|
||||
{
|
||||
public class MonoLLVMJobAttribute : JobConfigBaseAttribute
|
||||
public class MonoLlvmJobAttribute : JobConfigBaseAttribute
|
||||
{
|
||||
public MonoLLVMJobAttribute() : base(Job.MonoLLVM)
|
||||
public MonoLlvmJobAttribute() : base(Job.MonoLlvm)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,8 +11,6 @@ namespace BenchmarkDotNet.Columns
|
|||
public static readonly IColumn Mode = new PropertyColumn("Mode", benchmark => benchmark.Job.Mode.ToString());
|
||||
public static readonly IColumn Platform = new PropertyColumn("Platform", benchmark => benchmark.Job.Platform.ToString());
|
||||
public static readonly IColumn Jit = new PropertyColumn("Jit", benchmark => benchmark.Job.Jit.ToString());
|
||||
[Obsolete("Framework setting is not supported anymore, see https://github.com/PerfDotNet/BenchmarkDotNet/issues/194 for more details", true)]
|
||||
public static readonly IColumn Framework = new PropertyColumn("Framework", benchmark => null);
|
||||
public static readonly IColumn Toolchain = new PropertyColumn("Toolchain", benchmark => benchmark.Job.Toolchain?.Name ?? benchmark.Job.Runtime.ToString());
|
||||
public static readonly IColumn Runtime = new PropertyColumn("Runtime", benchmark => benchmark.Job.Runtime.ToString());
|
||||
public static readonly IColumn GarbageCollection = new PropertyColumn("GarbageCollection", benchmark => benchmark.Job.GarbageCollection?.ToString());
|
||||
|
|
|
@ -70,7 +70,7 @@ namespace BenchmarkDotNet.Configs
|
|||
{ "alljits", Job.AllJits },
|
||||
{ "clr", new[] { Job.Clr } },
|
||||
{ "mono", new[] { Job.Mono } },
|
||||
{ "monollvm", new[] { Job.MonoLLVM } },
|
||||
{ "monollvm", new[] { Job.MonoLlvm } },
|
||||
{ "longrun", new[] { Job.LongRun } }
|
||||
};
|
||||
private static Lazy<IJob[]> allJobs = new Lazy<IJob[]>(() => availableJobs.SelectMany(e => e.Value).ToArray());
|
||||
|
|
|
@ -103,11 +103,6 @@ namespace BenchmarkDotNet.Configs
|
|||
{
|
||||
return new[]
|
||||
{
|
||||
// GCDiagnoser is marked as obsolete because it has been renamed to MemoryDiagnoser,
|
||||
// Eventually we'll removed it completely, for the time being let it load, but when
|
||||
// it turns it'll throw an error, telling the dev to use the MemoryDiagnoser instead
|
||||
GetDiagnoser(loadedAssembly, "BenchmarkDotNet.Diagnostics.Windows.GCDiagnoser"),
|
||||
|
||||
GetDiagnoser(loadedAssembly, "BenchmarkDotNet.Diagnostics.Windows.MemoryDiagnoser"),
|
||||
GetDiagnoser(loadedAssembly, "BenchmarkDotNet.Diagnostics.Windows.InliningDiagnoser"),
|
||||
};
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace BenchmarkDotNet.Horology
|
||||
{
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace BenchmarkDotNet.Horology
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
using System;
|
||||
|
||||
namespace BenchmarkDotNet.Jobs
|
||||
{
|
||||
[Obsolete("Framework setting is not supported anymore, see https://github.com/PerfDotNet/BenchmarkDotNet/issues/194 for more details", true)]
|
||||
public enum Framework
|
||||
{
|
||||
}
|
||||
}
|
|
@ -8,6 +8,6 @@
|
|||
/// <summary>
|
||||
/// supported only for Mono
|
||||
/// </summary>
|
||||
LLVM
|
||||
Llvm
|
||||
}
|
||||
}
|
|
@ -13,7 +13,7 @@ namespace BenchmarkDotNet.Jobs
|
|||
public static readonly IJob[] AllJits = { LegacyJitX86, LegacyJitX64, RyuJitX64 };
|
||||
public static readonly IJob Clr = new Job { Runtime = Runtime.Clr };
|
||||
public static readonly IJob Mono = new Job { Runtime = Runtime.Mono };
|
||||
public static readonly IJob MonoLLVM = new Job { Runtime = Runtime.Mono, Jit = Jit.LLVM};
|
||||
public static readonly IJob MonoLlvm = new Job { Runtime = Runtime.Mono, Jit = Jit.Llvm};
|
||||
public static readonly IJob Core = new Job { Runtime = Runtime.Core };
|
||||
public static readonly IJob MediumRun = new Job { LaunchCount = 3, WarmupCount = 15, TargetCount = 100 };
|
||||
public static readonly IJob LongRun = new Job { LaunchCount = 3, WarmupCount = 30, TargetCount = 1000 };
|
||||
|
|
|
@ -112,8 +112,8 @@ namespace BenchmarkDotNet.Jobs
|
|||
shortInfo = "Dry";
|
||||
if (job.Equals(Job.Mono))
|
||||
shortInfo = "Mono";
|
||||
if (job.Equals(Job.MonoLLVM))
|
||||
shortInfo = "MonoLLVM";
|
||||
if (job.Equals(Job.MonoLlvm))
|
||||
shortInfo = "MonoLlvm";
|
||||
if (job.Equals(Job.Clr))
|
||||
shortInfo = "Clr";
|
||||
if (job.Equals(Job.Core))
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
using System;
|
||||
|
||||
namespace BenchmarkDotNet.Jobs
|
||||
namespace BenchmarkDotNet.Jobs
|
||||
{
|
||||
public enum Runtime
|
||||
{
|
||||
|
@ -11,12 +9,7 @@ namespace BenchmarkDotNet.Jobs
|
|||
Clr,
|
||||
Mono,
|
||||
/// <summary>
|
||||
/// Desktop CLR hosted on Windows with Dot Net eXecution (DNX)
|
||||
/// </summary>
|
||||
[Obsolete("Not supported anymore since 0.9.8", true)]
|
||||
Dnx,
|
||||
/// <summary>
|
||||
/// Cross-platform CoreCLR runtime
|
||||
/// Cross-platform Core CLR runtime
|
||||
/// </summary>
|
||||
Core
|
||||
}
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
using BenchmarkDotNet.Extensions;
|
||||
|
||||
namespace BenchmarkDotNet.Loggers
|
||||
namespace BenchmarkDotNet.Loggers
|
||||
{
|
||||
/// <summary>
|
||||
/// Adds prefix for each line
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
using System.Collections.Generic;
|
||||
using BenchmarkDotNet.Extensions;
|
||||
using BenchmarkDotNet.Horology;
|
||||
using BenchmarkDotNet.Reports;
|
||||
|
||||
namespace BenchmarkDotNet.Mathematics
|
||||
{
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using System.Diagnostics;
|
||||
using BenchmarkDotNet.Extensions;
|
||||
using BenchmarkDotNet.Helpers;
|
||||
using BenchmarkDotNet.Loggers;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using BenchmarkDotNet.Order;
|
||||
|
||||
namespace BenchmarkDotNet.Running
|
||||
|
|
|
@ -6,7 +6,6 @@ using System.Reflection;
|
|||
using BenchmarkDotNet.Attributes;
|
||||
using BenchmarkDotNet.Extensions;
|
||||
using BenchmarkDotNet.Loggers;
|
||||
using BenchmarkDotNet.Portability;
|
||||
|
||||
namespace BenchmarkDotNet.Running
|
||||
{
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using BenchmarkDotNet.Jobs;
|
||||
using BenchmarkDotNet.Loggers;
|
||||
using BenchmarkDotNet.Running;
|
||||
using BenchmarkDotNet.Toolchains.Results;
|
||||
|
|
|
@ -115,7 +115,7 @@ namespace BenchmarkDotNet.Toolchains
|
|||
{
|
||||
// from mono --help: "Usage is: mono [options] program [program-options]"
|
||||
return new StringBuilder(30)
|
||||
.Append(job.Jit == Jit.LLVM ? "--llvm" : "--nollvm")
|
||||
.Append(job.Jit == Jit.Llvm ? "--llvm" : "--nollvm")
|
||||
.Append(' ')
|
||||
.Append(exeName)
|
||||
.Append(' ')
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using BenchmarkDotNet.Diagnosers;
|
||||
using BenchmarkDotNet.Jobs;
|
||||
using BenchmarkDotNet.Loggers;
|
||||
using BenchmarkDotNet.Running;
|
||||
using BenchmarkDotNet.Toolchains.Results;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using System;
|
||||
using BenchmarkDotNet.Jobs;
|
||||
using BenchmarkDotNet.Jobs;
|
||||
using BenchmarkDotNet.Loggers;
|
||||
using BenchmarkDotNet.Portability;
|
||||
using BenchmarkDotNet.Running;
|
||||
|
@ -27,9 +26,9 @@ namespace BenchmarkDotNet.Toolchains
|
|||
public virtual bool IsSupported(Benchmark benchmark, ILogger logger)
|
||||
{
|
||||
var runtime = benchmark.Job.Runtime == Runtime.Host ? RuntimeInformation.GetCurrent() : benchmark.Job.Runtime;
|
||||
if (runtime != Runtime.Mono && benchmark.Job.Jit == Jit.LLVM)
|
||||
if (runtime != Runtime.Mono && benchmark.Job.Jit == Jit.Llvm)
|
||||
{
|
||||
logger.WriteLineError($"LLVM is supported only for Mono, benchmark {benchmark.ShortInfo} will not be executed");
|
||||
logger.WriteLineError($"Llvm is supported only for Mono, benchmark {benchmark.ShortInfo} will not be executed");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -37,7 +36,5 @@ namespace BenchmarkDotNet.Toolchains
|
|||
}
|
||||
|
||||
public override string ToString() => Name;
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using BenchmarkDotNet.Diagnosers;
|
||||
using BenchmarkDotNet.Columns;
|
||||
using BenchmarkDotNet.Loggers;
|
||||
using BenchmarkDotNet.Reports;
|
||||
using BenchmarkDotNet.Running;
|
||||
|
||||
namespace BenchmarkDotNet.Diagnostics.Windows
|
||||
{
|
||||
[Obsolete(message)]
|
||||
public class GCDiagnoser : IDiagnoser, IColumnProvider
|
||||
{
|
||||
const string message = "The \"GCDiagnoser\" has been renamed, please us the \"MemoryDiagnoser\" instead (it has the same functionality)";
|
||||
|
||||
public IEnumerable<IColumn> GetColumns
|
||||
{
|
||||
get { throw new InvalidOperationException(message); }
|
||||
}
|
||||
|
||||
public void AfterBenchmarkHasRun(Benchmark benchmark, Process process)
|
||||
{
|
||||
throw new InvalidOperationException(message);
|
||||
}
|
||||
|
||||
public void DisplayResults(ILogger logger)
|
||||
{
|
||||
throw new InvalidOperationException(message);
|
||||
}
|
||||
|
||||
public void ProcessStarted(Process process)
|
||||
{
|
||||
throw new InvalidOperationException(message);
|
||||
}
|
||||
|
||||
public void ProcessStopped(Process process)
|
||||
{
|
||||
throw new InvalidOperationException(message);
|
||||
}
|
||||
|
||||
public void Start(Benchmark benchmark)
|
||||
{
|
||||
throw new InvalidOperationException(message);
|
||||
}
|
||||
|
||||
public void Stop(Benchmark benchmark, BenchmarkReport report)
|
||||
{
|
||||
throw new InvalidOperationException(message);
|
||||
}
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче