Run the project via dotnet run -c Relase
.
Observe the following error (despite following the advice on https://aka.ms/systemdrawingnonwindows and adding a runtimeconfig.template.json):
// Validating benchmarks:
// ***** BenchmarkRunner: Start *****
// ***** Found 1 benchmark(s) in total *****
// ***** Building 1 exe(s) in Parallel: Start *****
// start dotnet restore /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1 /p:Deterministic=true /p:Optimize=true in /home/handerss/repos/BenchGdip/bin/Release/net6.0/0fcda0f7-f5d0-426c-8b23-6fa037fb89f3
// command took 1.41s and exited with 0
// start dotnet build -c Release --no-restore /p:UseSharedCompilation=false /p:BuildInParallel=false /m:1 /p:Deterministic=true /p:Optimize=true in /home/handerss/repos/BenchGdip/bin/Release/net6.0/0fcda0f7-f5d0-426c-8b23-6fa037fb89f3
// command took 3.21s and exited with 0
// ***** Done, took 00:00:04 (4.71 sec) *****
// Found 1 benchmarks:
// GdipBench.CreateFont: DefaultJob
// **************************
// Benchmark: GdipBench.CreateFont: DefaultJob
// *** Execute ***
// Launch: 1 / 1
// Execute: dotnet 0fcda0f7-f5d0-426c-8b23-6fa037fb89f3.dll --benchmarkName GdipBenches.GdipBench.CreateFont --job Default --benchmarkId 0 in /home/handerss/repos/BenchGdip/bin/Release/net6.0/0fcda0f7-f5d0-426c-8b23-6fa037fb89f3/bin/Release/net6.0
Failed to set up high priority. Make sure you have the right permissions. Message: Permission denied
// BeforeAnythingElse
// Benchmark Process Environment Information:
// Runtime=.NET 6.0.4 (6.0.422.16404), X64 RyuJIT AVX2
// GC=Concurrent Workstation
// HardwareIntrinsics=AVX2,AES,BMI1,BMI2,FMA,LZCNT,PCLMUL,POPCNT VectorSize=256
// Job: DefaultJob
OverheadJitting 1: 1 op, 336800.00 ns, 336.8000 us/op
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.TypeInitializationException: The type initializer for 'Gdip' threw an exception.
---> System.PlatformNotSupportedException: System.Drawing.Common is not supported on non-Windows platforms. See https://aka.ms/systemdrawingnonwindows for more information.
at System.Drawing.LibraryResolver.EnsureRegistered()
at System.Drawing.SafeNativeMethods.Gdip.PlatformInitialize()
at System.Drawing.SafeNativeMethods.Gdip..cctor()
--- End of inner exception stack trace ---
at System.Drawing.SafeNativeMethods.Gdip.GdipGetGenericFontFamilySansSerif(IntPtr& fontfamily)
at System.Drawing.FontFamily.GetGdipGenericSansSerif()
at System.Drawing.FontFamily.get_GenericSansSerif()
at System.Drawing.Font.CreateFont(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte charSet, Boolean isVertical)
at System.Drawing.Font..ctor(String familyName, Single emSize, FontStyle style, GraphicsUnit unit, Byte gdiCharSet, Boolean gdiVerticalFont)
at System.Drawing.Font..ctor(String familyName, Single emSize)
at GdipBenches.GdipBench.CreateFont() in /home/handerss/repos/BenchGdip/GdipBench.cs:line 11
at BenchmarkDotNet.Autogenerated.Runnable_0.WorkloadActionNoUnroll(Int64 invokeCount) in /home/handerss/repos/BenchGdip/bin/Release/net6.0/0fcda0f7-f5d0-426c-8b23-6fa037fb89f3/0fcda0f7-f5d0-426c-8b23-6fa037fb89f3.notcs:line 318
at BenchmarkDotNet.Engines.Engine.RunIteration(IterationData data)
at BenchmarkDotNet.Engines.EngineFactory.Jit(Engine engine, Int32 jitIndex, Int32 invokeCount, Int32 unrollFactor)
at BenchmarkDotNet.Engines.EngineFactory.CreateReadyToRun(EngineParameters engineParameters)
at BenchmarkDotNet.Autogenerated.Runnable_0.Run(IHost host, String benchmarkName) in /home/handerss/repos/BenchGdip/bin/Release/net6.0/0fcda0f7-f5d0-426c-8b23-6fa037fb89f3/0fcda0f7-f5d0-426c-8b23-6fa037fb89f3.notcs:line 175
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at BenchmarkDotNet.Autogenerated.UniqueProgramName.AfterAssemblyLoadingAttached(String[] args) in /home/handerss/repos/BenchGdip/bin/Release/net6.0/0fcda0f7-f5d0-426c-8b23-6fa037fb89f3/0fcda0f7-f5d0-426c-8b23-6fa037fb89f3.notcs:line 58
// AfterAll
No Workload Results were obtained from the run.
// Benchmark Process 4810 has exited with code 255.
// ** Remained 0 (0.0%) benchmark(s) to run. Estimated finish 2022-10-04 13:01 (0h 0m from now) **
// ***** BenchmarkRunner: Finish *****
// * Export *
BenchmarkDotNet.Artifacts/results/GdipBenches.GdipBench-report.csv
BenchmarkDotNet.Artifacts/results/GdipBenches.GdipBench-report-github.md
BenchmarkDotNet.Artifacts/results/GdipBenches.GdipBench-report.html
// * Detailed results *
GdipBench.CreateFont: DefaultJob
Runtime = .NET 6.0.4 (6.0.422.16404), X64 RyuJIT AVX2; GC = Concurrent Workstation
There are not any results runs
// * Summary *
BenchmarkDotNet=v0.13.2, OS=debian 11
Intel Core i7-9750H CPU 2.60GHz, 1 CPU, 12 logical and 6 physical cores
.NET SDK=6.0.104
[Host] : .NET 6.0.4 (6.0.422.16404), X64 RyuJIT AVX2
DefaultJob : .NET 6.0.4 (6.0.422.16404), X64 RyuJIT AVX2
| Method | Mean | Error |
|----------- |-----:|------:|
| CreateFont | NA | NA |
Benchmarks with issues:
GdipBench.CreateFont: DefaultJob
// * Legends *
Mean : Arithmetic mean of all measurements
Error : Half of 99.9% confidence interval
1 ns : 1 Nanosecond (0.000000001 sec)
// ***** BenchmarkRunner: End *****
Run time: 00:00:00 (0.31 sec), executed benchmarks: 1
Global total time: 00:00:05 (5.21 sec), executed benchmarks: 1
// * Artifacts cleanup *