diff --git a/BenchMarkDotnetStudy.BenchmarkStudy/CounterTest3.cs b/BenchMarkDotnetStudy.BenchmarkStudy/CounterTest3.cs index c9c8fb9..d9557e8 100644 Binary files a/BenchMarkDotnetStudy.BenchmarkStudy/CounterTest3.cs and b/BenchMarkDotnetStudy.BenchmarkStudy/CounterTest3.cs differ diff --git a/BenchMarkDotnetStudy.BenchmarkStudy/Program.cs b/BenchMarkDotnetStudy.BenchmarkStudy/Program.cs index 5c63bf6..a1c9355 100644 --- a/BenchMarkDotnetStudy.BenchmarkStudy/Program.cs +++ b/BenchMarkDotnetStudy.BenchmarkStudy/Program.cs @@ -1,3 +1,4 @@ +using BenchmarkDotNet.Configs; using BenchmarkDotNet.Running; namespace BenchMarkDotnetStudy.BenchmarkStudy @@ -7,12 +8,33 @@ namespace BenchMarkDotnetStudy.BenchmarkStudy static void Main(string[] args) { Console.WriteLine("Benchmark 测试!"); + if (args != null && args?.Length > 0) + { + Console.WriteLine($"有{args.Length}个命令行参数, 分别为[{string.Join(" | ", args)}]"); + } + else + { + Console.WriteLine("无命令行参数"); + } var summary = BenchmarkRunner.Run(); - Console.WriteLine("Benchmark 测试结束:"); + // MockArgsRun(); + } + + public static void MockArgsRun() + { + //模拟命令行参数:参数和参数值分两个参数写 + var mockArgs = new string[] { "--filter", "*CounterTest3.Thread2_Test" }; + + //显示模拟参数 + Console.WriteLine($"有{mockArgs.Length}个模拟命令行参数, 分别为[{string.Join(" | ", mockArgs)}]"); + + //执行方式一 + var summary = BenchmarkRunner.Run(null, mockArgs); - Console.WriteLine($"总耗时:{summary.AllRuntimes}"); + //执行方式二:推荐 + var summaries = BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(mockArgs, new DebugInProcessConfig()); } } -} \ No newline at end of file +} diff --git a/BenchMarkDotnetStudy.sln b/BenchMarkDotnetStudy.sln index 2c9bb37..833eacf 100644 --- a/BenchMarkDotnetStudy.sln +++ b/BenchMarkDotnetStudy.sln @@ -3,11 +3,16 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.5.33516.290 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BenchMarkDotnetStudy.Core", "BenchMarkDotnetStudy.Core\BenchMarkDotnetStudy.Core.csproj", "{8C37BE95-8908-4038-BF56-F0F1A5F4C52C}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BenchMarkDotnetStudy.Core", "BenchMarkDotnetStudy.Core\BenchMarkDotnetStudy.Core.csproj", "{8C37BE95-8908-4038-BF56-F0F1A5F4C52C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BenchMarkDotnetStudy.CApp", "BenchMarkDotnetStudy.CApp\BenchMarkDotnetStudy.CApp.csproj", "{D5D6E7DF-82AF-4F78-BB60-A0BE378B97E4}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BenchMarkDotnetStudy.CApp", "BenchMarkDotnetStudy.CApp\BenchMarkDotnetStudy.CApp.csproj", "{D5D6E7DF-82AF-4F78-BB60-A0BE378B97E4}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BenchMarkDotnetStudy.BenchmarkStudy", "BenchMarkDotnetStudy.BenchmarkStudy\BenchMarkDotnetStudy.BenchmarkStudy.csproj", "{AFA892FB-C52A-443D-B0F0-3E458DDCDC7F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BenchMarkDotnetStudy.BenchmarkStudy", "BenchMarkDotnetStudy.BenchmarkStudy\BenchMarkDotnetStudy.BenchmarkStudy.csproj", "{AFA892FB-C52A-443D-B0F0-3E458DDCDC7F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{9390267A-73EF-4CF8-A70C-2CD2A6CE6E2E}" + ProjectSection(SolutionItems) = preProject + Docs\在笔记中使用基准测试.ipynb = Docs\在笔记中使用基准测试.ipynb + EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/Docs/在笔记中使用基准测试.ipynb b/Docs/在笔记中使用基准测试.ipynb new file mode 100644 index 0000000..681155a --- /dev/null +++ b/Docs/在笔记中使用基准测试.ipynb @@ -0,0 +1,670 @@ +{ + "cells": [ + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "在多语言笔记中使用 BenchmarkDotnet 基准测试\n", + "=========================================" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 全局准备工作,就先执行此单元\n", + "+ 设置包源和引用 Nuget 包\n", + "+ 引入命名空间\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "dotnet_interactive": { + "language": "csharp" + }, + "polyglot_notebook": { + "kernelName": "csharp" + } + }, + "outputs": [ + { + "data": { + "text/html": [ + "
Restore sources
  • https://api.nuget.org/v3/index.json
Installed Packages
  • BenchmarkDotNet, 0.13.5
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "#i \"nuget:https://api.nuget.org/v3/index.json\"\n", + "#r \"nuget:BenchmarkDotNet,*-*\"\n", + "\n", + "using System;\n", + "using System.Collections.Generic;\n", + "using System.Linq;\n", + "using System.Text;\n", + "using System.Threading;\n", + "using System.Threading.Channels;\n", + "using System.Threading.Tasks;\n", + "\n", + "using BenchmarkDotNet;\n", + "using BenchmarkDotNet.Attributes;\n", + "using BenchmarkDotNet.Running;\n", + "using BenchmarkDotNet.Jobs;\n", + "using BenchmarkDotNet.Diagnosers;\n", + "using BenchmarkDotNet.Configs;" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 方法一:在笔记本内部,使用基准测试" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "dotnet_interactive": { + "language": "csharp" + }, + "polyglot_notebook": { + "kernelName": "csharp" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b]9;4;3;0\u001b\\// Validating benchmarks:\n", + "// * No exporters defined, results will not be persisted.\n", + "\n", + "// ***** BenchmarkRunner: Start *****\n", + "// ***** Found 1 benchmark(s) in total *****\n", + "// ***** Building 1 exe(s) in Parallel: Start *****\n", + "// ***** Done, took 00:00:00 (0.04 sec) *****\n", + "// Found 1 benchmarks:\n", + "// CounterBenchmark.ThreadSafe_Test: Job-XSGFKZ(Toolchain=InProcessEmitToolchain)\n", + "\n", + "Setup power plan (GUID: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c FriendlyName: 高性能)\n", + "// **************************\n", + "// Benchmark: CounterBenchmark.ThreadSafe_Test: Job-XSGFKZ(Toolchain=InProcessEmitToolchain)\n", + "// *** Execute ***\n", + "// Launch: 1 / 1\n", + "\n", + "// Benchmark Process Environment Information:\n", + "// Runtime=.NET 7.0.4 (7.0.423.11508), X64 RyuJIT AVX2\n", + "// GC=Concurrent Server\n", + "// HardwareIntrinsics=AVX2,AES,BMI1,BMI2,FMA,LZCNT,PCLMUL,POPCNT VectorSize=256\n", + "// Job: Job-XSGFKZ(Toolchain=InProcessEmitToolchain)\n", + "\n", + "OverheadJitting 1: 1 op, 241300.00 ns, 241.3000 us/op\n", + "WorkloadJitting 1: 1 op, 2996900.00 ns, 2.9969 ms/op\n", + "\n", + "OverheadJitting 2: 16 op, 391900.00 ns, 24.4937 us/op\n", + "WorkloadJitting 2: 16 op, 11011900.00 ns, 688.2437 us/op\n", + "\n", + "WorkloadPilot 1: 16 op, 5877500.00 ns, 367.3438 us/op\n", + "WorkloadPilot 2: 32 op, 18890200.00 ns, 590.3188 us/op\n", + "WorkloadPilot 3: 64 op, 39596400.00 ns, 618.6938 us/op\n", + "WorkloadPilot 4: 128 op, 52667800.00 ns, 411.4672 us/op\n", + "WorkloadPilot 5: 256 op, 99554400.00 ns, 388.8844 us/op\n", + "WorkloadPilot 6: 512 op, 201674300.00 ns, 393.8951 us/op\n", + "WorkloadPilot 7: 1024 op, 424673200.00 ns, 414.7199 us/op\n", + "WorkloadPilot 8: 2048 op, 761817900.00 ns, 371.9814 us/op\n", + "\n", + "OverheadWarmup 1: 2048 op, 8000.00 ns, 3.9062 ns/op\n", + "OverheadWarmup 2: 2048 op, 7200.00 ns, 3.5156 ns/op\n", + "OverheadWarmup 3: 2048 op, 4800.00 ns, 2.3438 ns/op\n", + "OverheadWarmup 4: 2048 op, 5100.00 ns, 2.4902 ns/op\n", + "OverheadWarmup 5: 2048 op, 6800.00 ns, 3.3203 ns/op\n", + "OverheadWarmup 6: 2048 op, 37600.00 ns, 18.3594 ns/op\n", + "OverheadWarmup 7: 2048 op, 5700.00 ns, 2.7832 ns/op\n", + "OverheadWarmup 8: 2048 op, 5500.00 ns, 2.6855 ns/op\n", + "OverheadWarmup 9: 2048 op, 5800.00 ns, 2.8320 ns/op\n", + "OverheadWarmup 10: 2048 op, 7900.00 ns, 3.8574 ns/op\n", + "\n", + "OverheadActual 1: 2048 op, 9500.00 ns, 4.6387 ns/op\n", + "OverheadActual 2: 2048 op, 5400.00 ns, 2.6367 ns/op\n", + "OverheadActual 3: 2048 op, 5200.00 ns, 2.5391 ns/op\n", + "OverheadActual 4: 2048 op, 5900.00 ns, 2.8809 ns/op\n", + "OverheadActual 5: 2048 op, 4900.00 ns, 2.3926 ns/op\n", + "OverheadActual 6: 2048 op, 5000.00 ns, 2.4414 ns/op\n", + "OverheadActual 7: 2048 op, 5700.00 ns, 2.7832 ns/op\n", + "OverheadActual 8: 2048 op, 5300.00 ns, 2.5879 ns/op\n", + "OverheadActual 9: 2048 op, 5700.00 ns, 2.7832 ns/op\n", + "OverheadActual 10: 2048 op, 5700.00 ns, 2.7832 ns/op\n", + "OverheadActual 11: 2048 op, 25900.00 ns, 12.6465 ns/op\n", + "OverheadActual 12: 2048 op, 5600.00 ns, 2.7344 ns/op\n", + "OverheadActual 13: 2048 op, 6900.00 ns, 3.3691 ns/op\n", + "OverheadActual 14: 2048 op, 4900.00 ns, 2.3926 ns/op\n", + "OverheadActual 15: 2048 op, 6400.00 ns, 3.1250 ns/op\n", + "OverheadActual 16: 2048 op, 4800.00 ns, 2.3438 ns/op\n", + "OverheadActual 17: 2048 op, 5100.00 ns, 2.4902 ns/op\n", + "OverheadActual 18: 2048 op, 6600.00 ns, 3.2227 ns/op\n", + "OverheadActual 19: 2048 op, 4300.00 ns, 2.0996 ns/op\n", + "OverheadActual 20: 2048 op, 4400.00 ns, 2.1484 ns/op\n", + "\n", + "WorkloadWarmup 1: 2048 op, 876511200.00 ns, 427.9840 us/op\n", + "WorkloadWarmup 2: 2048 op, 686290500.00 ns, 335.1028 us/op\n", + "WorkloadWarmup 3: 2048 op, 673434900.00 ns, 328.8256 us/op\n", + "WorkloadWarmup 4: 2048 op, 732537900.00 ns, 357.6845 us/op\n", + "WorkloadWarmup 5: 2048 op, 694454200.00 ns, 339.0890 us/op\n", + "WorkloadWarmup 6: 2048 op, 756563000.00 ns, 369.4155 us/op\n", + "WorkloadWarmup 7: 2048 op, 725321100.00 ns, 354.1607 us/op\n", + "\n", + "WorkloadActual 1: 2048 op, 734203300.00 ns, 358.4977 us/op\n", + "WorkloadActual 2: 2048 op, 701190400.00 ns, 342.3781 us/op\n", + "WorkloadActual 3: 2048 op, 729570400.00 ns, 356.2355 us/op\n", + "WorkloadActual 4: 2048 op, 735811000.00 ns, 359.2827 us/op\n", + "WorkloadActual 5: 2048 op, 693158900.00 ns, 338.4565 us/op\n", + "WorkloadActual 6: 2048 op, 830758600.00 ns, 405.6438 us/op\n", + "WorkloadActual 7: 2048 op, 892311300.00 ns, 435.6989 us/op\n", + "WorkloadActual 8: 2048 op, 731421300.00 ns, 357.1393 us/op\n", + "WorkloadActual 9: 2048 op, 657472600.00 ns, 321.0315 us/op\n", + "WorkloadActual 10: 2048 op, 678751300.00 ns, 331.4215 us/op\n", + "WorkloadActual 11: 2048 op, 722735000.00 ns, 352.8979 us/op\n", + "WorkloadActual 12: 2048 op, 780375000.00 ns, 381.0425 us/op\n", + "WorkloadActual 13: 2048 op, 803151900.00 ns, 392.1640 us/op\n", + "WorkloadActual 14: 2048 op, 773630800.00 ns, 377.7494 us/op\n", + "WorkloadActual 15: 2048 op, 766713800.00 ns, 374.3720 us/op\n", + "WorkloadActual 16: 2048 op, 703589600.00 ns, 343.5496 us/op\n", + "WorkloadActual 17: 2048 op, 721272500.00 ns, 352.1838 us/op\n", + "WorkloadActual 18: 2048 op, 775400500.00 ns, 378.6135 us/op\n", + "WorkloadActual 19: 2048 op, 737588700.00 ns, 360.1507 us/op\n", + "WorkloadActual 20: 2048 op, 875190000.00 ns, 427.3389 us/op\n", + "WorkloadActual 21: 2048 op, 702767800.00 ns, 343.1483 us/op\n", + "WorkloadActual 22: 2048 op, 711616300.00 ns, 347.4689 us/op\n", + "WorkloadActual 23: 2048 op, 704277700.00 ns, 343.8856 us/op\n", + "WorkloadActual 24: 2048 op, 755985200.00 ns, 369.1334 us/op\n", + "WorkloadActual 25: 2048 op, 786016200.00 ns, 383.7970 us/op\n", + "WorkloadActual 26: 2048 op, 841057000.00 ns, 410.6724 us/op\n", + "WorkloadActual 27: 2048 op, 720956300.00 ns, 352.0294 us/op\n", + "WorkloadActual 28: 2048 op, 715604000.00 ns, 349.4160 us/op\n", + "WorkloadActual 29: 2048 op, 693064900.00 ns, 338.4106 us/op\n", + "WorkloadActual 30: 2048 op, 686359600.00 ns, 335.1365 us/op\n", + "WorkloadActual 31: 2048 op, 746476400.00 ns, 364.4904 us/op\n", + "WorkloadActual 32: 2048 op, 683963900.00 ns, 333.9667 us/op\n", + "WorkloadActual 33: 2048 op, 876091700.00 ns, 427.7792 us/op\n", + "WorkloadActual 34: 2048 op, 757288200.00 ns, 369.7696 us/op\n", + "WorkloadActual 35: 2048 op, 750934400.00 ns, 366.6672 us/op\n", + "WorkloadActual 36: 2048 op, 699644400.00 ns, 341.6232 us/op\n", + "WorkloadActual 37: 2048 op, 726647200.00 ns, 354.8082 us/op\n", + "WorkloadActual 38: 2048 op, 739490000.00 ns, 361.0791 us/op\n", + "WorkloadActual 39: 2048 op, 792567200.00 ns, 386.9957 us/op\n", + "WorkloadActual 40: 2048 op, 699663300.00 ns, 341.6325 us/op\n", + "WorkloadActual 41: 2048 op, 701619200.00 ns, 342.5875 us/op\n", + "WorkloadActual 42: 2048 op, 704881600.00 ns, 344.1805 us/op\n", + "WorkloadActual 43: 2048 op, 695836200.00 ns, 339.7638 us/op\n", + "WorkloadActual 44: 2048 op, 748386100.00 ns, 365.4229 us/op\n", + "WorkloadActual 45: 2048 op, 684315200.00 ns, 334.1383 us/op\n", + "WorkloadActual 46: 2048 op, 814553500.00 ns, 397.7312 us/op\n", + "WorkloadActual 47: 2048 op, 688065800.00 ns, 335.9696 us/op\n", + "WorkloadActual 48: 2048 op, 690766700.00 ns, 337.2884 us/op\n", + "WorkloadActual 49: 2048 op, 734634200.00 ns, 358.7081 us/op\n", + "WorkloadActual 50: 2048 op, 717110700.00 ns, 350.1517 us/op\n", + "WorkloadActual 51: 2048 op, 781765400.00 ns, 381.7214 us/op\n", + "WorkloadActual 52: 2048 op, 677996300.00 ns, 331.0529 us/op\n", + "WorkloadActual 53: 2048 op, 838837500.00 ns, 409.5886 us/op\n", + "WorkloadActual 54: 2048 op, 718020200.00 ns, 350.5958 us/op\n", + "WorkloadActual 55: 2048 op, 743819600.00 ns, 363.1932 us/op\n", + "WorkloadActual 56: 2048 op, 814610300.00 ns, 397.7589 us/op\n", + "WorkloadActual 57: 2048 op, 748986400.00 ns, 365.7160 us/op\n", + "WorkloadActual 58: 2048 op, 689677100.00 ns, 336.7564 us/op\n", + "WorkloadActual 59: 2048 op, 984504000.00 ns, 480.7148 us/op\n", + "WorkloadActual 60: 2048 op, 712421700.00 ns, 347.8622 us/op\n", + "WorkloadActual 61: 2048 op, 747180200.00 ns, 364.8341 us/op\n", + "WorkloadActual 62: 2048 op, 671049100.00 ns, 327.6607 us/op\n", + "WorkloadActual 63: 2048 op, 769455800.00 ns, 375.7108 us/op\n", + "WorkloadActual 64: 2048 op, 671989700.00 ns, 328.1200 us/op\n", + "WorkloadActual 65: 2048 op, 727669300.00 ns, 355.3073 us/op\n", + "WorkloadActual 66: 2048 op, 812785000.00 ns, 396.8677 us/op\n", + "WorkloadActual 67: 2048 op, 704867700.00 ns, 344.1737 us/op\n", + "WorkloadActual 68: 2048 op, 663629800.00 ns, 324.0380 us/op\n", + "WorkloadActual 69: 2048 op, 686707100.00 ns, 335.3062 us/op\n", + "WorkloadActual 70: 2048 op, 740544900.00 ns, 361.5942 us/op\n", + "WorkloadActual 71: 2048 op, 715271700.00 ns, 349.2538 us/op\n", + "WorkloadActual 72: 2048 op, 953279300.00 ns, 465.4684 us/op\n", + "WorkloadActual 73: 2048 op, 735164700.00 ns, 358.9671 us/op\n", + "WorkloadActual 74: 2048 op, 705908800.00 ns, 344.6820 us/op\n", + "WorkloadActual 75: 2048 op, 676116700.00 ns, 330.1351 us/op\n", + "WorkloadActual 76: 2048 op, 767674600.00 ns, 374.8411 us/op\n", + "WorkloadActual 77: 2048 op, 695662100.00 ns, 339.6788 us/op\n", + "WorkloadActual 78: 2048 op, 750836400.00 ns, 366.6193 us/op\n", + "WorkloadActual 79: 2048 op, 823163300.00 ns, 401.9352 us/op\n", + "WorkloadActual 80: 2048 op, 715298400.00 ns, 349.2668 us/op\n", + "WorkloadActual 81: 2048 op, 677734000.00 ns, 330.9248 us/op\n", + "WorkloadActual 82: 2048 op, 731452100.00 ns, 357.1543 us/op\n", + "WorkloadActual 83: 2048 op, 773567500.00 ns, 377.7185 us/op\n", + "WorkloadActual 84: 2048 op, 714432500.00 ns, 348.8440 us/op\n", + "WorkloadActual 85: 2048 op, 908913700.00 ns, 443.8055 us/op\n", + "WorkloadActual 86: 2048 op, 721259600.00 ns, 352.1775 us/op\n", + "WorkloadActual 87: 2048 op, 694224900.00 ns, 338.9770 us/op\n", + "WorkloadActual 88: 2048 op, 720570700.00 ns, 351.8412 us/op\n", + "WorkloadActual 89: 2048 op, 818047300.00 ns, 399.4372 us/op\n", + "WorkloadActual 90: 2048 op, 740651900.00 ns, 361.6464 us/op\n", + "WorkloadActual 91: 2048 op, 822022500.00 ns, 401.3782 us/op\n", + "WorkloadActual 92: 2048 op, 823261200.00 ns, 401.9830 us/op\n", + "WorkloadActual 93: 2048 op, 714599600.00 ns, 348.9256 us/op\n", + "WorkloadActual 94: 2048 op, 744880200.00 ns, 363.7110 us/op\n", + "WorkloadActual 95: 2048 op, 858588600.00 ns, 419.2327 us/op\n", + "WorkloadActual 96: 2048 op, 734874100.00 ns, 358.8252 us/op\n", + "WorkloadActual 97: 2048 op, 763475000.00 ns, 372.7905 us/op\n", + "WorkloadActual 98: 2048 op, 872303900.00 ns, 425.9296 us/op\n", + "WorkloadActual 99: 2048 op, 854658000.00 ns, 417.3135 us/op\n", + "WorkloadActual 100: 2048 op, 834275400.00 ns, 407.3610 us/op\n", + "\n", + "WorkloadResult 1: 2048 op, 734197800.00 ns, 358.4950 us/op\n", + "WorkloadResult 2: 2048 op, 701184900.00 ns, 342.3754 us/op\n", + "WorkloadResult 3: 2048 op, 729564900.00 ns, 356.2329 us/op\n", + "WorkloadResult 4: 2048 op, 735805500.00 ns, 359.2800 us/op\n", + "WorkloadResult 5: 2048 op, 693153400.00 ns, 338.4538 us/op\n", + "WorkloadResult 6: 2048 op, 830753100.00 ns, 405.6412 us/op\n", + "WorkloadResult 7: 2048 op, 731415800.00 ns, 357.1366 us/op\n", + "WorkloadResult 8: 2048 op, 657467100.00 ns, 321.0289 us/op\n", + "WorkloadResult 9: 2048 op, 678745800.00 ns, 331.4188 us/op\n", + "WorkloadResult 10: 2048 op, 722729500.00 ns, 352.8953 us/op\n", + "WorkloadResult 11: 2048 op, 780369500.00 ns, 381.0398 us/op\n", + "WorkloadResult 12: 2048 op, 803146400.00 ns, 392.1613 us/op\n", + "WorkloadResult 13: 2048 op, 773625300.00 ns, 377.7467 us/op\n", + "WorkloadResult 14: 2048 op, 766708300.00 ns, 374.3693 us/op\n", + "WorkloadResult 15: 2048 op, 703584100.00 ns, 343.5469 us/op\n", + "WorkloadResult 16: 2048 op, 721267000.00 ns, 352.1812 us/op\n", + "WorkloadResult 17: 2048 op, 775395000.00 ns, 378.6108 us/op\n", + "WorkloadResult 18: 2048 op, 737583200.00 ns, 360.1480 us/op\n", + "WorkloadResult 19: 2048 op, 875184500.00 ns, 427.3362 us/op\n", + "WorkloadResult 20: 2048 op, 702762300.00 ns, 343.1457 us/op\n", + "WorkloadResult 21: 2048 op, 711610800.00 ns, 347.4662 us/op\n", + "WorkloadResult 22: 2048 op, 704272200.00 ns, 343.8829 us/op\n", + "WorkloadResult 23: 2048 op, 755979700.00 ns, 369.1307 us/op\n", + "WorkloadResult 24: 2048 op, 786010700.00 ns, 383.7943 us/op\n", + "WorkloadResult 25: 2048 op, 841051500.00 ns, 410.6697 us/op\n", + "WorkloadResult 26: 2048 op, 720950800.00 ns, 352.0268 us/op\n", + "WorkloadResult 27: 2048 op, 715598500.00 ns, 349.4133 us/op\n", + "WorkloadResult 28: 2048 op, 693059400.00 ns, 338.4079 us/op\n", + "WorkloadResult 29: 2048 op, 686354100.00 ns, 335.1338 us/op\n", + "WorkloadResult 30: 2048 op, 746470900.00 ns, 364.4877 us/op\n", + "WorkloadResult 31: 2048 op, 683958400.00 ns, 333.9641 us/op\n", + "WorkloadResult 32: 2048 op, 876086200.00 ns, 427.7765 us/op\n", + "WorkloadResult 33: 2048 op, 757282700.00 ns, 369.7669 us/op\n", + "WorkloadResult 34: 2048 op, 750928900.00 ns, 366.6645 us/op\n", + "WorkloadResult 35: 2048 op, 699638900.00 ns, 341.6206 us/op\n", + "WorkloadResult 36: 2048 op, 726641700.00 ns, 354.8055 us/op\n", + "WorkloadResult 37: 2048 op, 739484500.00 ns, 361.0764 us/op\n", + "WorkloadResult 38: 2048 op, 792561700.00 ns, 386.9930 us/op\n", + "WorkloadResult 39: 2048 op, 699657800.00 ns, 341.6298 us/op\n", + "WorkloadResult 40: 2048 op, 701613700.00 ns, 342.5848 us/op\n", + "WorkloadResult 41: 2048 op, 704876100.00 ns, 344.1778 us/op\n", + "WorkloadResult 42: 2048 op, 695830700.00 ns, 339.7611 us/op\n", + "WorkloadResult 43: 2048 op, 748380600.00 ns, 365.4202 us/op\n", + "WorkloadResult 44: 2048 op, 684309700.00 ns, 334.1356 us/op\n", + "WorkloadResult 45: 2048 op, 814548000.00 ns, 397.7285 us/op\n", + "WorkloadResult 46: 2048 op, 688060300.00 ns, 335.9669 us/op\n", + "WorkloadResult 47: 2048 op, 690761200.00 ns, 337.2857 us/op\n", + "WorkloadResult 48: 2048 op, 734628700.00 ns, 358.7054 us/op\n", + "WorkloadResult 49: 2048 op, 717105200.00 ns, 350.1490 us/op\n", + "WorkloadResult 50: 2048 op, 781759900.00 ns, 381.7187 us/op\n", + "WorkloadResult 51: 2048 op, 677990800.00 ns, 331.0502 us/op\n", + "WorkloadResult 52: 2048 op, 838832000.00 ns, 409.5859 us/op\n", + "WorkloadResult 53: 2048 op, 718014700.00 ns, 350.5931 us/op\n", + "WorkloadResult 54: 2048 op, 743814100.00 ns, 363.1905 us/op\n", + "WorkloadResult 55: 2048 op, 814604800.00 ns, 397.7563 us/op\n", + "WorkloadResult 56: 2048 op, 748980900.00 ns, 365.7133 us/op\n", + "WorkloadResult 57: 2048 op, 689671600.00 ns, 336.7537 us/op\n", + "WorkloadResult 58: 2048 op, 712416200.00 ns, 347.8595 us/op\n", + "WorkloadResult 59: 2048 op, 747174700.00 ns, 364.8314 us/op\n", + "WorkloadResult 60: 2048 op, 671043600.00 ns, 327.6580 us/op\n", + "WorkloadResult 61: 2048 op, 769450300.00 ns, 375.7082 us/op\n", + "WorkloadResult 62: 2048 op, 671984200.00 ns, 328.1173 us/op\n", + "WorkloadResult 63: 2048 op, 727663800.00 ns, 355.3046 us/op\n", + "WorkloadResult 64: 2048 op, 812779500.00 ns, 396.8650 us/op\n", + "WorkloadResult 65: 2048 op, 704862200.00 ns, 344.1710 us/op\n", + "WorkloadResult 66: 2048 op, 663624300.00 ns, 324.0353 us/op\n", + "WorkloadResult 67: 2048 op, 686701600.00 ns, 335.3035 us/op\n", + "WorkloadResult 68: 2048 op, 740539400.00 ns, 361.5915 us/op\n", + "WorkloadResult 69: 2048 op, 715266200.00 ns, 349.2511 us/op\n", + "WorkloadResult 70: 2048 op, 735159200.00 ns, 358.9645 us/op\n", + "WorkloadResult 71: 2048 op, 705903300.00 ns, 344.6793 us/op\n", + "WorkloadResult 72: 2048 op, 676111200.00 ns, 330.1324 us/op\n", + "WorkloadResult 73: 2048 op, 767669100.00 ns, 374.8384 us/op\n", + "WorkloadResult 74: 2048 op, 695656600.00 ns, 339.6761 us/op\n", + "WorkloadResult 75: 2048 op, 750830900.00 ns, 366.6167 us/op\n", + "WorkloadResult 76: 2048 op, 823157800.00 ns, 401.9325 us/op\n", + "WorkloadResult 77: 2048 op, 715292900.00 ns, 349.2641 us/op\n", + "WorkloadResult 78: 2048 op, 677728500.00 ns, 330.9221 us/op\n", + "WorkloadResult 79: 2048 op, 731446600.00 ns, 357.1517 us/op\n", + "WorkloadResult 80: 2048 op, 773562000.00 ns, 377.7158 us/op\n", + "WorkloadResult 81: 2048 op, 714427000.00 ns, 348.8413 us/op\n", + "WorkloadResult 82: 2048 op, 721254100.00 ns, 352.1749 us/op\n", + "WorkloadResult 83: 2048 op, 694219400.00 ns, 338.9743 us/op\n", + "WorkloadResult 84: 2048 op, 720565200.00 ns, 351.8385 us/op\n", + "WorkloadResult 85: 2048 op, 818041800.00 ns, 399.4345 us/op\n", + "WorkloadResult 86: 2048 op, 740646400.00 ns, 361.6438 us/op\n", + "WorkloadResult 87: 2048 op, 822017000.00 ns, 401.3755 us/op\n", + "WorkloadResult 88: 2048 op, 823255700.00 ns, 401.9803 us/op\n", + "WorkloadResult 89: 2048 op, 714594100.00 ns, 348.9229 us/op\n", + "WorkloadResult 90: 2048 op, 744874700.00 ns, 363.7083 us/op\n", + "WorkloadResult 91: 2048 op, 858583100.00 ns, 419.2300 us/op\n", + "WorkloadResult 92: 2048 op, 734868600.00 ns, 358.8226 us/op\n", + "WorkloadResult 93: 2048 op, 763469500.00 ns, 372.7878 us/op\n", + "WorkloadResult 94: 2048 op, 872298400.00 ns, 425.9270 us/op\n", + "WorkloadResult 95: 2048 op, 854652500.00 ns, 417.3108 us/op\n", + "WorkloadResult 96: 2048 op, 834269900.00 ns, 407.3583 us/op\n", + "\n", + "\n", + "Mean = 362.366 us, StdErr = 2.660 us (0.73%), N = 96, StdDev = 26.060 us\n", + "Min = 321.029 us, Q1 = 343.005 us, Median = 357.144 us, Q3 = 376.210 us, Max = 427.776 us\n", + "IQR = 33.205 us, LowerFence = 293.199 us, UpperFence = 426.017 us\n", + "ConfidenceInterval = [353.334 us; 371.398 us] (CI 99.9%), Margin = 9.032 us (2.49% of Mean)\n", + "Skewness = 0.8, Kurtosis = 2.81, MValue = 2.57\n", + "\n", + "// ** Remained 0 (0.0%) benchmark(s) to run. Estimated finish 2023-04-04 2:33 (0h 0m from now) **\n", + "\u001b]9;4;1;100\u001b\\Successfully reverted power plan (GUID: 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c FriendlyName: 高性能)\n", + "// ***** BenchmarkRunner: Finish *****\n", + "\n", + "// * Export *\n", + "\n", + "// * Detailed results *\n", + "CounterBenchmark.ThreadSafe_Test: Job-XSGFKZ(Toolchain=InProcessEmitToolchain)\n", + "Runtime = ; GC = \n", + "Mean = 362.366 us, StdErr = 2.660 us (0.73%), N = 96, StdDev = 26.060 us\n", + "Min = 321.029 us, Q1 = 343.005 us, Median = 357.144 us, Q3 = 376.210 us, Max = 427.776 us\n", + "IQR = 33.205 us, LowerFence = 293.199 us, UpperFence = 426.017 us\n", + "ConfidenceInterval = [353.334 us; 371.398 us] (CI 99.9%), Margin = 9.032 us (2.49% of Mean)\n", + "Skewness = 0.8, Kurtosis = 2.81, MValue = 2.57\n", + "-------------------- Histogram --------------------\n", + "[313.559 us ; 323.191 us) | @\n", + "[323.191 us ; 338.182 us) | @@@@@@@@@@@@@@\n", + "[338.182 us ; 353.121 us) | @@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n", + "[353.121 us ; 369.438 us) | @@@@@@@@@@@@@@@@@@@@@@@\n", + "[369.438 us ; 384.251 us) | @@@@@@@@@@@\n", + "[384.251 us ; 396.297 us) | @@\n", + "[396.297 us ; 411.237 us) | @@@@@@@@@@@\n", + "[411.237 us ; 430.014 us) | @@@@@\n", + "---------------------------------------------------\n", + "\n", + "// * Summary *\n", + "\n", + "BenchmarkDotNet=v0.13.5, OS=Windows 11 (10.0.22621.1485/22H2/2022Update/SunValley2)\n", + "Intel Core i9-9880H CPU 2.30GHz, 1 CPU, 16 logical and 8 physical cores\n", + ".NET SDK=7.0.202\n", + " [Host] : .NET 7.0.4 (7.0.423.11508), X64 RyuJIT AVX2\n", + "\n", + "Toolchain=InProcessEmitToolchain \n", + "\n", + "| Method | Mean | Error | StdDev |\n", + "|---------------- |---------:|--------:|---------:|\n", + "| ThreadSafe_Test | 362.4 us | 9.03 us | 26.06 us |\n", + "\n", + "// * Legends *\n", + " Mean : Arithmetic mean of all measurements\n", + " Error : Half of 99.9% confidence interval\n", + " StdDev : Standard deviation of all measurements\n", + " 1 us : 1 Microsecond (0.000001 sec)\n", + "\n", + "// ***** BenchmarkRunner: End *****\n", + "Run time: 00:01:38 (98.27 sec), executed benchmarks: 1\n", + "\n", + "Global total time: 00:01:38 (98.96 sec), executed benchmarks: 1\n", + "// * Artifacts cleanup *\n", + "\u001b]9;4;0;0\u001b\\" + ] + } + ], + "source": [ + "/// \n", + "/// 被测试类:计数器\n", + "/// \n", + "public class Counter\n", + "{\n", + " /// \n", + " /// 总次数\n", + " /// \n", + " public static int TotalCounter = 0;\n", + "\n", + " /// \n", + " /// 每方法执行次数\n", + " /// \n", + " public static readonly int LoopNumber = 100;\n", + "\n", + " /// \n", + " /// 累加方法\n", + " /// \n", + " public int Increment()\n", + " {\n", + " for (int i = 1; i <= LoopNumber; i++)\n", + " {\n", + " ++TotalCounter;\n", + " }\n", + "\n", + " return TotalCounter;\n", + " }\n", + "\n", + " /// \n", + " /// 累加方法\n", + " /// \n", + " public int IncrementWithInterlocked()\n", + " {\n", + " for (int i = 1; i <= LoopNumber; i++)\n", + " {\n", + " Interlocked.Increment(ref TotalCounter);\n", + " }\n", + "\n", + " return TotalCounter;\n", + " }\n", + "}\n", + "\n", + "/// \n", + "/// 基准测试类:CounterBenchmark\n", + "/// \n", + "public class CounterBenchmark\n", + "{\n", + " [Benchmark]\n", + " public void NonThreadSafe_Test()\n", + " {\n", + " Counter counter = new Counter();\n", + "\n", + " List threads = new List()\n", + " {\n", + " new Thread(() => counter.Increment() ),\n", + " new Thread(() => counter.Increment() ),\n", + " };\n", + "\n", + "\n", + " threads.ForEach(t => t.Start());\n", + " threads.ForEach(t => t.Join());\n", + "\n", + " //Console.WriteLine($\"方法结束时:TotalCounter = {Counter.TotalCounter}\");\n", + " }\n", + "\n", + " [Benchmark]\n", + " public void ThreadSafe_Test()\n", + " {\n", + " Counter counter = new Counter();\n", + "\n", + " List threads = new List()\n", + " {\n", + " new Thread(() => counter.IncrementWithInterlocked() ),\n", + " new Thread(() => counter.IncrementWithInterlocked() ),\n", + " };\n", + "\n", + " threads.ForEach(t => t.Start());\n", + " threads.ForEach(t => t.Join());\n", + " }\n", + "}\n", + "\n", + "//执行基准测试\n", + "{\n", + " //设置基准测试参数:注意参数名与参数值是两个参数而不是一个\n", + " var benchmarkRunArgs = new string[] {\"--filter\",\"*CounterBenchmark.ThreadSafe_Test\"};\n", + "\n", + " //出错方法:此种方式执行出错,暂时没有找到解决方法\n", + " //var summary = BenchmarkRunner.Run(null, benchmarkRunArgs);\n", + " \n", + " //可行方法:注意参数配置方法\n", + " BenchmarkSwitcher.FromAssembly(typeof(CounterBenchmark).Assembly).Run(benchmarkRunArgs, new DebugInProcessConfig());\n", + "}\n" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 方法二:Powershell 直接执行实有的其测试项目" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "dotnet_interactive": { + "language": "pwsh" + }, + "polyglot_notebook": { + "kernelName": "pwsh" + } + }, + "outputs": [], + "source": [ + "dotnet run -c Release --project ..\\BenchMarkDotnetStudy.BenchmarkStudy\\BenchMarkDotnetStudy.BenchmarkStudy.csproj\n", + "# dotnet run -c Release -- --help" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 查看是内核执行模式" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "dotnet_interactive": { + "language": "csharp" + }, + "polyglot_notebook": { + "kernelName": "csharp" + } + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Release模式\r\n" + ] + } + ], + "source": [ + "#if DEBUG\n", + "Console.WriteLine(\"Debug模式\");\n", + "#else\n", + "Console.WriteLine(\"Release模式\");\n", + "#endif" + ] + }, + { + "attachments": {}, + "cell_type": "markdown", + "metadata": {}, + "source": [ + "当前程序内核程序集信息" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "dotnet_interactive": { + "language": "csharp" + }, + "polyglot_notebook": { + "kernelName": "csharp" + } + }, + "outputs": [ + { + "data": { + "text/html": [ + "
ℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
CodeBasefile:///C:/Program Files/dotnet/shared/Microsoft.NETCore.App/7.0.4/System.Private.CoreLib.dll
FullNameℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
EntryPoint
<null>
DefinedTypes
indexvalue
0Microsoft.CodeAnalysis.EmbeddedAttribute
1System.Runtime.CompilerServices.RefSafetyRulesAttribute
2Submission#6
3Submission#6+Counter
4Submission#6+CounterBenchmark
5Submission#6+<<Initialize>>d__0
6Submission#6+CounterBenchmark+<>c
7Submission#6+CounterBenchmark+<>c__DisplayClass0_0
8Submission#6+CounterBenchmark+<>c__DisplayClass1_0
IsCollectible
False
ManifestModule
ℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6.dll
MDStreamVersion
131072
FullyQualifiedName<Unknown>
ModuleVersionId
1d23e53b-72be-4a3e-9efc-59c593f0cee2
MetadataToken
1
ScopeNameℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6.dll
Name<Unknown>
Assembly
ℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
CodeBasefile:///C:/Program Files/dotnet/shared/Microsoft.NETCore.App/7.0.4/System.Private.CoreLib.dll
FullNameℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
EntryPoint
<null>
DefinedTypes
indexvalue
0Microsoft.CodeAnalysis.EmbeddedAttribute
1System.Runtime.CompilerServices.RefSafetyRulesAttribute
2Submission#6
3Submission#6+Counter
4Submission#6+CounterBenchmark
5Submission#6+<<Initialize>>d__0
6Submission#6+CounterBenchmark+<>c
7Submission#6+CounterBenchmark+<>c__DisplayClass0_0
8Submission#6+CounterBenchmark+<>c__DisplayClass1_0
IsCollectible
False
ManifestModule
ℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6.dll
MDStreamVersion
131072
FullyQualifiedName<Unknown>
ModuleVersionId
1d23e53b-72be-4a3e-9efc-59c593f0cee2
MetadataToken
1
ScopeNameℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6.dll
Name<Unknown>
Assembly
ℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
CodeBasefile:///C:/Program Files/dotnet/shared/Microsoft.NETCore.App/7.0.4/System.Private.CoreLib.dll
FullNameℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
EntryPoint
<null>
DefinedTypes
indexvalue
0Microsoft.CodeAnalysis.EmbeddedAttribute
1System.Runtime.CompilerServices.RefSafetyRulesAttribute
2Submission#6
3Submission#6+Counter
4Submission#6+CounterBenchmark
5Submission#6+<>d__0
6Submission#6+CounterBenchmark+<>c
7Submission#6+CounterBenchmark+<>c__DisplayClass0_0
8Submission#6+CounterBenchmark+<>c__DisplayClass1_0
IsCollectible
False
ManifestModule
ℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6.dll
MDStreamVersion131072
FullyQualifiedName<Unknown>
ModuleVersionId1d23e53b-72be-4a3e-9efc-59c593f0cee2
MetadataToken1
ScopeNameℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6.dll
Name<Unknown>
Assemblyℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
ModuleHandleSystem.ModuleHandle
CustomAttributes[ [System.Security.UnverifiableCodeAttribute()], [System.Runtime.CompilerServices.RefSafetyRulesAttribute((Int32)11)] ]
ReflectionOnly
False
Location
ImageRuntimeVersionv4.0.30319
GlobalAssemblyCache
False
HostContext
0
IsDynamic
False
ExportedTypes
indexvalue
0Microsoft.CodeAnalysis.EmbeddedAttribute
1System.Runtime.CompilerServices.RefSafetyRulesAttribute
2Submission#6
3Submission#6+Counter
4Submission#6+CounterBenchmark
5Submission#6+<>d__0
IsFullyTrusted
True
CustomAttributes
indexvalue
0[System.Runtime.CompilerServices.CompilationRelaxationsAttribute((Int32)8)]
1[System.Runtime.CompilerServices.RuntimeCompatibilityAttribute(WrapNonExceptionThrows = True)]
2[System.Diagnostics.DebuggableAttribute((System.Diagnostics.DebuggableAttribute+DebuggingModes)263)]
EscapedCodeBasefile:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.4/System.Private.CoreLib.dll
Modules
indexvalue
0ℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6.dll
SecurityRuleSetNone
ModuleHandle
System.ModuleHandle
MDStreamVersion
131072
CustomAttributes
indexvalue
0
[System.Security.UnverifiableCodeAttribute()]
ConstructorVoid .ctor()
ConstructorArguments[ ]
NamedArguments[ ]
AttributeTypeSystem.Security.UnverifiableCodeAttribute
1
[System.Runtime.CompilerServices.RefSafetyRulesAttribute((Int32)11)]
ConstructorVoid .ctor(Int32)
ConstructorArguments[ (Int32)11 ]
NamedArguments[ ]
AttributeTypeSystem.Runtime.CompilerServices.RefSafetyRulesAttribute
ReflectionOnly
False
Location
ImageRuntimeVersionv4.0.30319
GlobalAssemblyCache
False
HostContext
0
IsDynamic
False
ExportedTypes
indexvalue
0Microsoft.CodeAnalysis.EmbeddedAttribute
1System.Runtime.CompilerServices.RefSafetyRulesAttribute
2Submission#6
3Submission#6+Counter
4Submission#6+CounterBenchmark
5Submission#6+<<Initialize>>d__0
IsFullyTrusted
True
CustomAttributes
indexvalue
0
[System.Runtime.CompilerServices.CompilationRelaxationsAttribute((Int32)8)]
Constructor
Void .ctor(Int32)
Name.ctor
MemberTypeConstructor
DeclaringTypeSystem.Runtime.CompilerServices.CompilationRelaxationsAttribute
ReflectedTypeSystem.Runtime.CompilerServices.CompilationRelaxationsAttribute
MetadataToken100685969
ModuleSystem.Private.CoreLib.dll
MethodHandleSystem.RuntimeMethodHandle
AttributesPrivateScope, Public, HideBySig, SpecialName, RTSpecialName
CallingConventionStandard, HasThis
IsSecurityCriticalTrue
IsSecuritySafeCriticalFalse
IsSecurityTransparentFalse
ContainsGenericParametersFalse
MethodImplementationFlagsIL
IsAbstractFalse
IsConstructorTrue
IsFinalFalse
IsHideBySigTrue
IsSpecialNameTrue
IsStaticFalse
IsVirtualFalse
IsAssemblyFalse
IsFamilyFalse
IsFamilyAndAssemblyFalse
IsFamilyOrAssemblyFalse
IsPrivateFalse
IsPublicTrue
IsConstructedGenericMethodFalse
IsGenericMethodFalse
IsGenericMethodDefinitionFalse
CustomAttributes
IsCollectibleTrue
ConstructorArguments
indexvalue
0(Int32)8
NamedArguments(empty)
AttributeTypeSystem.Runtime.CompilerServices.CompilationRelaxationsAttribute
1
[System.Runtime.CompilerServices.RuntimeCompatibilityAttribute(WrapNonExceptionThrows = True)]
Constructor
Void .ctor()
Name.ctor
MemberTypeConstructor
DeclaringTypeSystem.Runtime.CompilerServices.RuntimeCompatibilityAttribute
ReflectedTypeSystem.Runtime.CompilerServices.RuntimeCompatibilityAttribute
MetadataToken100686193
ModuleSystem.Private.CoreLib.dll
MethodHandleSystem.RuntimeMethodHandle
AttributesPrivateScope, Public, HideBySig, SpecialName, RTSpecialName
CallingConventionStandard, HasThis
IsSecurityCriticalTrue
IsSecuritySafeCriticalFalse
IsSecurityTransparentFalse
ContainsGenericParametersFalse
MethodImplementationFlagsIL
IsAbstractFalse
IsConstructorTrue
IsFinalFalse
IsHideBySigTrue
IsSpecialNameTrue
IsStaticFalse
IsVirtualFalse
IsAssemblyFalse
IsFamilyFalse
IsFamilyAndAssemblyFalse
IsFamilyOrAssemblyFalse
IsPrivateFalse
IsPublicTrue
IsConstructedGenericMethodFalse
IsGenericMethodFalse
IsGenericMethodDefinitionFalse
CustomAttributes
IsCollectibleTrue
ConstructorArguments(empty)
NamedArguments
indexvalue
0WrapNonExceptionThrows = True
AttributeTypeSystem.Runtime.CompilerServices.RuntimeCompatibilityAttribute
2
[System.Diagnostics.DebuggableAttribute((System.Diagnostics.DebuggableAttribute+DebuggingModes)263)]
Constructor
Void .ctor(DebuggingModes)
Name.ctor
MemberTypeConstructor
DeclaringTypeSystem.Diagnostics.DebuggableAttribute
ReflectedTypeSystem.Diagnostics.DebuggableAttribute
MetadataToken100691394
ModuleSystem.Private.CoreLib.dll
MethodHandleSystem.RuntimeMethodHandle
AttributesPrivateScope, Public, HideBySig, SpecialName, RTSpecialName
CallingConventionStandard, HasThis
IsSecurityCriticalTrue
IsSecuritySafeCriticalFalse
IsSecurityTransparentFalse
ContainsGenericParametersFalse
MethodImplementationFlagsIL
IsAbstractFalse
IsConstructorTrue
IsFinalFalse
IsHideBySigTrue
IsSpecialNameTrue
IsStaticFalse
IsVirtualFalse
IsAssemblyFalse
IsFamilyFalse
IsFamilyAndAssemblyFalse
IsFamilyOrAssemblyFalse
IsPrivateFalse
IsPublicTrue
IsConstructedGenericMethodFalse
IsGenericMethodFalse
IsGenericMethodDefinitionFalse
CustomAttributes
IsCollectibleTrue
ConstructorArguments
indexvalue
0(System.Diagnostics.DebuggableAttribute+DebuggingModes)263
NamedArguments(empty)
AttributeTypeSystem.Diagnostics.DebuggableAttribute
EscapedCodeBasefile:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.4/System.Private.CoreLib.dll
Modules
indexvalue
0
ℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6.dll
MDStreamVersion
131072
FullyQualifiedName<Unknown>
ModuleVersionId
1d23e53b-72be-4a3e-9efc-59c593f0cee2
MetadataToken
1
ScopeNameℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6.dll
Name<Unknown>
Assembly
ℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
CodeBasefile:///C:/Program Files/dotnet/shared/Microsoft.NETCore.App/7.0.4/System.Private.CoreLib.dll
FullNameℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
EntryPoint
<null>
DefinedTypes[ Microsoft.CodeAnalysis.EmbeddedAttribute, System.Runtime.CompilerServices.RefSafetyRulesAttribute, Submission#6, Submission#6+Counter, Submission#6+CounterBenchmark, Submission#6+<>d__0, Submission#6+CounterBenchmark+<>c, Submission#6+CounterBenchmark+<>c__DisplayClass0_0, Submission#6+CounterBenchmark+<>c__DisplayClass1_0 ]
IsCollectibleFalse
ManifestModuleℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6.dll
ReflectionOnlyFalse
Location
ImageRuntimeVersionv4.0.30319
GlobalAssemblyCacheFalse
HostContext0
IsDynamicFalse
ExportedTypes[ Microsoft.CodeAnalysis.EmbeddedAttribute, System.Runtime.CompilerServices.RefSafetyRulesAttribute, Submission#6, Submission#6+Counter, Submission#6+CounterBenchmark, Submission#6+<>d__0 ]
IsFullyTrustedTrue
CustomAttributes[ [System.Runtime.CompilerServices.CompilationRelaxationsAttribute((Int32)8)], [System.Runtime.CompilerServices.RuntimeCompatibilityAttribute(WrapNonExceptionThrows = True)], [System.Diagnostics.DebuggableAttribute((System.Diagnostics.DebuggableAttribute+DebuggingModes)263)] ]
EscapedCodeBasefile:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.4/System.Private.CoreLib.dll
Modules[ ℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6.dll ]
SecurityRuleSetNone
ModuleHandle
System.ModuleHandle
MDStreamVersion131072
CustomAttributes
indexvalue
0[System.Security.UnverifiableCodeAttribute()]
1[System.Runtime.CompilerServices.RefSafetyRulesAttribute((Int32)11)]
SecurityRuleSetNone
ModuleHandle
System.ModuleHandle
MDStreamVersion
131072
CustomAttributes
indexvalue
0
[System.Security.UnverifiableCodeAttribute()]
Constructor
Void .ctor()
Name.ctor
MemberTypeConstructor
DeclaringTypeSystem.Security.UnverifiableCodeAttribute
ReflectedTypeSystem.Security.UnverifiableCodeAttribute
MetadataToken
100679594
Module
System.Private.CoreLib.dll
MDStreamVersion131072
FullyQualifiedNameC:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\7.0.4\\System.Private.CoreLib.dll
ModuleVersionId06e6b5e4-1059-4922-af54-f5731fb38a29
MetadataToken1
ScopeNameSystem.Private.CoreLib.dll
NameSystem.Private.CoreLib.dll
AssemblySystem.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
ModuleHandleSystem.ModuleHandle
CustomAttributes[ [System.Runtime.CompilerServices.RefSafetyRulesAttribute((Int32)11)], [System.Runtime.CompilerServices.NullablePublicOnlyAttribute((Boolean)False)], [System.Runtime.CompilerServices.SkipLocalsInitAttribute()] ]
MethodHandle
System.RuntimeMethodHandle
Value140715636686400
AttributesPrivateScope, Public, HideBySig, SpecialName, RTSpecialName
CallingConventionStandard, HasThis
IsSecurityCritical
True
IsSecuritySafeCritical
False
IsSecurityTransparent
False
ContainsGenericParameters
False
MethodImplementationFlagsIL
IsAbstract
False
IsConstructor
True
IsFinal
False
IsHideBySig
True
IsSpecialName
True
IsStatic
False
IsVirtual
False
IsAssembly
False
IsFamily
False
IsFamilyAndAssembly
False
IsFamilyOrAssembly
False
IsPrivate
False
IsPublic
True
IsConstructedGenericMethod
False
IsGenericMethod
False
IsGenericMethodDefinition
False
CustomAttributes
IsCollectible
True
ConstructorArguments(empty)
NamedArguments(empty)
AttributeTypeSystem.Security.UnverifiableCodeAttribute
1
[System.Runtime.CompilerServices.RefSafetyRulesAttribute((Int32)11)]
Constructor
Void .ctor(Int32)
Name.ctor
MemberTypeConstructor
DeclaringTypeSystem.Runtime.CompilerServices.RefSafetyRulesAttribute
ReflectedTypeSystem.Runtime.CompilerServices.RefSafetyRulesAttribute
MetadataToken
100663298
Module
ℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6.dll
MDStreamVersion131072
FullyQualifiedName<Unknown>
ModuleVersionId1d23e53b-72be-4a3e-9efc-59c593f0cee2
MetadataToken1
ScopeNameℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6.dll
Name<Unknown>
Assemblyℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
ModuleHandleSystem.ModuleHandle
CustomAttributes[ [System.Security.UnverifiableCodeAttribute()], [System.Runtime.CompilerServices.RefSafetyRulesAttribute((Int32)11)] ]
MethodHandle
System.RuntimeMethodHandle
Value140715635233232
AttributesPrivateScope, Public, HideBySig, SpecialName, RTSpecialName
CallingConventionStandard, HasThis
IsSecurityCritical
True
IsSecuritySafeCritical
False
IsSecurityTransparent
False
ContainsGenericParameters
False
MethodImplementationFlagsIL
IsAbstract
False
IsConstructor
True
IsFinal
False
IsHideBySig
True
IsSpecialName
True
IsStatic
False
IsVirtual
False
IsAssembly
False
IsFamily
False
IsFamilyAndAssembly
False
IsFamilyOrAssembly
False
IsPrivate
False
IsPublic
True
IsConstructedGenericMethod
False
IsGenericMethod
False
IsGenericMethodDefinition
False
CustomAttributes
IsCollectible
True
ConstructorArguments
indexvalue
0
(Int32)11
ArgumentTypeSystem.Int32
Value11
NamedArguments(empty)
AttributeTypeSystem.Runtime.CompilerServices.RefSafetyRulesAttribute
ReflectionOnly
False
Location
ImageRuntimeVersionv4.0.30319
GlobalAssemblyCache
False
HostContext
0
IsDynamic
False
ExportedTypes
indexvalue
0Microsoft.CodeAnalysis.EmbeddedAttribute
1System.Runtime.CompilerServices.RefSafetyRulesAttribute
2Submission#6
3Submission#6+Counter
4Submission#6+CounterBenchmark
5Submission#6+<<Initialize>>d__0
IsFullyTrusted
True
CustomAttributes
indexvalue
0
[System.Runtime.CompilerServices.CompilationRelaxationsAttribute((Int32)8)]
Constructor
Void .ctor(Int32)
Name.ctor
MemberTypeConstructor
DeclaringTypeSystem.Runtime.CompilerServices.CompilationRelaxationsAttribute
ReflectedTypeSystem.Runtime.CompilerServices.CompilationRelaxationsAttribute
MetadataToken
100685969
Module
System.Private.CoreLib.dll
MDStreamVersion
131072
FullyQualifiedNameC:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\7.0.4\\System.Private.CoreLib.dll
ModuleVersionId
06e6b5e4-1059-4922-af54-f5731fb38a29
MetadataToken
1
ScopeNameSystem.Private.CoreLib.dll
NameSystem.Private.CoreLib.dll
Assembly
System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
CodeBasefile:///C:/Program Files/dotnet/shared/Microsoft.NETCore.App/7.0.4/System.Private.CoreLib.dll
FullNameSystem.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
EntryPoint
<null>
DefinedTypes[ Microsoft.CodeAnalysis.EmbeddedAttribute, System.Runtime.CompilerServices.IsUnmanagedAttribute, System.Runtime.CompilerServices.NullableAttribute, System.Runtime.CompilerServices.NullableContextAttribute, System.Runtime.CompilerServices.NullablePublicOnlyAttribute, System.Runtime.CompilerServices.ScopedRefAttribute, System.Runtime.CompilerServices.RefSafetyRulesAttribute, Interop, Interop+OleAut32, Interop+Globalization, Interop+Globalization+ResultCode, Interop+BOOL, Interop+Kernel32, Interop+Kernel32+NlsVersionInfoEx, Interop+Kernel32+OVERLAPPED_ENTRY, Interop+Kernel32+CONDITION_VARIABLE, Interop+Kernel32+BY_HANDLE_FILE_INFORMATION, Interop+Kernel32+CRITICAL_SECTION, Interop+Kernel32+FILE_BASIC_INFO, Interop+Kernel32+FILE_ALLOCATION_INFO ... (2412 more) ]
IsCollectibleFalse
ManifestModuleSystem.Private.CoreLib.dll
ReflectionOnlyFalse
LocationC:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\7.0.4\\System.Private.CoreLib.dll
ImageRuntimeVersionv4.0.30319
GlobalAssemblyCacheFalse
HostContext0
IsDynamicFalse
ExportedTypes[ Microsoft.Win32.SafeHandles.CriticalHandleMinusOneIsInvalid, Microsoft.Win32.SafeHandles.CriticalHandleZeroOrMinusOneIsInvalid, Microsoft.Win32.SafeHandles.SafeHandleMinusOneIsInvalid, Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid, Microsoft.Win32.SafeHandles.SafeFileHandle, Microsoft.Win32.SafeHandles.SafeWaitHandle, System.ArgIterator, System.Array, System.Attribute, System.BadImageFormatException, System.Buffer, System.Decimal, System.Delegate, System.Enum, System.Environment, System.Environment+SpecialFolder, System.Environment+SpecialFolderOption, System.Exception, System.GCCollectionMode, System.GCNotificationStatus ... (1223 more) ]
IsFullyTrustedTrue
CustomAttributes[ [System.Runtime.CompilerServices.ExtensionAttribute()], [System.Runtime.CompilerServices.CompilationRelaxationsAttribute((Int32)8)], [System.Runtime.CompilerServices.RuntimeCompatibilityAttribute(WrapNonExceptionThrows = True)], [System.Diagnostics.DebuggableAttribute((System.Diagnostics.DebuggableAttribute+DebuggingModes)2)], [System.Reflection.Metadata.MetadataUpdateHandlerAttribute(typeof(System.Reflection.Metadata.RuntimeTypeMetadataUpdateHandler))], [System.CLSCompliantAttribute((Boolean)True)], [System.Runtime.InteropServices.ComVisibleAttribute((Boolean)False)], [System.Runtime.InteropServices.DefaultDllImportSearchPathsAttribute((System.Runtime.InteropServices.DllImportSearchPath)2050)], [System.Reflection.AssemblyMetadataAttribute(\"Serviceable\", \"True\")], [System.Reflection.AssemblyMetadataAttribute(\".NETFrameworkAssembly\", \"\")], [System.Reflection.AssemblyMetadataAttribute(\"IsTrimmable\", \"True\")], [System.Resources.NeutralResourcesLanguageAttribute(\"en-US\")], [System.Runtime.CompilerServices.DisableRuntimeMarshallingAttribute()], [System.Runtime.Versioning.TargetFrameworkAttribute(\".NETCoreApp,Version=v7.0\", FrameworkDisplayName = \".NET 7.0\")], [System.Reflection.AssemblyCompanyAttribute(\"Microsoft Corporation\")], [System.Reflection.AssemblyConfigurationAttribute(\"Release\")], [System.Reflection.AssemblyCopyrightAttribute(\"© Microsoft Corporation. All rights reserved.\")], [System.Reflection.AssemblyDescriptionAttribute(\"System.Private.CoreLib\")], [System.Reflection.AssemblyFileVersionAttribute(\"7.0.423.11508\")], [System.Reflection.AssemblyInformationalVersionAttribute(\"7.0.4+0a396acafe9a7d46bce11f4338dbb3dd0d99b1b4\")] ... (3 more) ]
EscapedCodeBasefile:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.4/System.Private.CoreLib.dll
Modules[ System.Private.CoreLib.dll ]
SecurityRuleSetNone
ModuleHandle
System.ModuleHandle
MDStreamVersion131072
CustomAttributes
indexvalue
0[System.Runtime.CompilerServices.RefSafetyRulesAttribute((Int32)11)]
1[System.Runtime.CompilerServices.NullablePublicOnlyAttribute((Boolean)False)]
2[System.Runtime.CompilerServices.SkipLocalsInitAttribute()]
MethodHandle
System.RuntimeMethodHandle
Value
140715532534800
AttributesPrivateScope, Public, HideBySig, SpecialName, RTSpecialName
CallingConventionStandard, HasThis
IsSecurityCritical
True
IsSecuritySafeCritical
False
IsSecurityTransparent
False
ContainsGenericParameters
False
MethodImplementationFlagsIL
IsAbstract
False
IsConstructor
True
IsFinal
False
IsHideBySig
True
IsSpecialName
True
IsStatic
False
IsVirtual
False
IsAssembly
False
IsFamily
False
IsFamilyAndAssembly
False
IsFamilyOrAssembly
False
IsPrivate
False
IsPublic
True
IsConstructedGenericMethod
False
IsGenericMethod
False
IsGenericMethodDefinition
False
CustomAttributes
IsCollectible
True
ConstructorArguments
indexvalue
0
(Int32)8
ArgumentTypeSystem.Int32
Value
8
NamedArguments(empty)
AttributeTypeSystem.Runtime.CompilerServices.CompilationRelaxationsAttribute
1
[System.Runtime.CompilerServices.RuntimeCompatibilityAttribute(WrapNonExceptionThrows = True)]
Constructor
Void .ctor()
Name.ctor
MemberTypeConstructor
DeclaringTypeSystem.Runtime.CompilerServices.RuntimeCompatibilityAttribute
ReflectedTypeSystem.Runtime.CompilerServices.RuntimeCompatibilityAttribute
MetadataToken
100686193
Module
System.Private.CoreLib.dll
MDStreamVersion
131072
FullyQualifiedNameC:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\7.0.4\\System.Private.CoreLib.dll
ModuleVersionId
06e6b5e4-1059-4922-af54-f5731fb38a29
MetadataToken
1
ScopeNameSystem.Private.CoreLib.dll
NameSystem.Private.CoreLib.dll
Assembly
System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
CodeBasefile:///C:/Program Files/dotnet/shared/Microsoft.NETCore.App/7.0.4/System.Private.CoreLib.dll
FullNameSystem.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
EntryPoint
<null>
DefinedTypes[ Microsoft.CodeAnalysis.EmbeddedAttribute, System.Runtime.CompilerServices.IsUnmanagedAttribute, System.Runtime.CompilerServices.NullableAttribute, System.Runtime.CompilerServices.NullableContextAttribute, System.Runtime.CompilerServices.NullablePublicOnlyAttribute, System.Runtime.CompilerServices.ScopedRefAttribute, System.Runtime.CompilerServices.RefSafetyRulesAttribute, Interop, Interop+OleAut32, Interop+Globalization, Interop+Globalization+ResultCode, Interop+BOOL, Interop+Kernel32, Interop+Kernel32+NlsVersionInfoEx, Interop+Kernel32+OVERLAPPED_ENTRY, Interop+Kernel32+CONDITION_VARIABLE, Interop+Kernel32+BY_HANDLE_FILE_INFORMATION, Interop+Kernel32+CRITICAL_SECTION, Interop+Kernel32+FILE_BASIC_INFO, Interop+Kernel32+FILE_ALLOCATION_INFO ... (2412 more) ]
IsCollectibleFalse
ManifestModuleSystem.Private.CoreLib.dll
ReflectionOnlyFalse
LocationC:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\7.0.4\\System.Private.CoreLib.dll
ImageRuntimeVersionv4.0.30319
GlobalAssemblyCacheFalse
HostContext0
IsDynamicFalse
ExportedTypes[ Microsoft.Win32.SafeHandles.CriticalHandleMinusOneIsInvalid, Microsoft.Win32.SafeHandles.CriticalHandleZeroOrMinusOneIsInvalid, Microsoft.Win32.SafeHandles.SafeHandleMinusOneIsInvalid, Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid, Microsoft.Win32.SafeHandles.SafeFileHandle, Microsoft.Win32.SafeHandles.SafeWaitHandle, System.ArgIterator, System.Array, System.Attribute, System.BadImageFormatException, System.Buffer, System.Decimal, System.Delegate, System.Enum, System.Environment, System.Environment+SpecialFolder, System.Environment+SpecialFolderOption, System.Exception, System.GCCollectionMode, System.GCNotificationStatus ... (1223 more) ]
IsFullyTrustedTrue
CustomAttributes[ [System.Runtime.CompilerServices.ExtensionAttribute()], [System.Runtime.CompilerServices.CompilationRelaxationsAttribute((Int32)8)], [System.Runtime.CompilerServices.RuntimeCompatibilityAttribute(WrapNonExceptionThrows = True)], [System.Diagnostics.DebuggableAttribute((System.Diagnostics.DebuggableAttribute+DebuggingModes)2)], [System.Reflection.Metadata.MetadataUpdateHandlerAttribute(typeof(System.Reflection.Metadata.RuntimeTypeMetadataUpdateHandler))], [System.CLSCompliantAttribute((Boolean)True)], [System.Runtime.InteropServices.ComVisibleAttribute((Boolean)False)], [System.Runtime.InteropServices.DefaultDllImportSearchPathsAttribute((System.Runtime.InteropServices.DllImportSearchPath)2050)], [System.Reflection.AssemblyMetadataAttribute(\"Serviceable\", \"True\")], [System.Reflection.AssemblyMetadataAttribute(\".NETFrameworkAssembly\", \"\")], [System.Reflection.AssemblyMetadataAttribute(\"IsTrimmable\", \"True\")], [System.Resources.NeutralResourcesLanguageAttribute(\"en-US\")], [System.Runtime.CompilerServices.DisableRuntimeMarshallingAttribute()], [System.Runtime.Versioning.TargetFrameworkAttribute(\".NETCoreApp,Version=v7.0\", FrameworkDisplayName = \".NET 7.0\")], [System.Reflection.AssemblyCompanyAttribute(\"Microsoft Corporation\")], [System.Reflection.AssemblyConfigurationAttribute(\"Release\")], [System.Reflection.AssemblyCopyrightAttribute(\"© Microsoft Corporation. All rights reserved.\")], [System.Reflection.AssemblyDescriptionAttribute(\"System.Private.CoreLib\")], [System.Reflection.AssemblyFileVersionAttribute(\"7.0.423.11508\")], [System.Reflection.AssemblyInformationalVersionAttribute(\"7.0.4+0a396acafe9a7d46bce11f4338dbb3dd0d99b1b4\")] ... (3 more) ]
EscapedCodeBasefile:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.4/System.Private.CoreLib.dll
Modules[ System.Private.CoreLib.dll ]
SecurityRuleSetNone
ModuleHandle
System.ModuleHandle
MDStreamVersion131072
CustomAttributes
indexvalue
0[System.Runtime.CompilerServices.RefSafetyRulesAttribute((Int32)11)]
1[System.Runtime.CompilerServices.NullablePublicOnlyAttribute((Boolean)False)]
2[System.Runtime.CompilerServices.SkipLocalsInitAttribute()]
MethodHandle
System.RuntimeMethodHandle
Value
140715532535008
AttributesPrivateScope, Public, HideBySig, SpecialName, RTSpecialName
CallingConventionStandard, HasThis
IsSecurityCritical
True
IsSecuritySafeCritical
False
IsSecurityTransparent
False
ContainsGenericParameters
False
MethodImplementationFlagsIL
IsAbstract
False
IsConstructor
True
IsFinal
False
IsHideBySig
True
IsSpecialName
True
IsStatic
False
IsVirtual
False
IsAssembly
False
IsFamily
False
IsFamilyAndAssembly
False
IsFamilyOrAssembly
False
IsPrivate
False
IsPublic
True
IsConstructedGenericMethod
False
IsGenericMethod
False
IsGenericMethodDefinition
False
CustomAttributes
IsCollectible
True
ConstructorArguments(empty)
NamedArguments
indexvalue
0
WrapNonExceptionThrows = True
MemberInfo
Boolean WrapNonExceptionThrows
MemberTypeProperty
NameWrapNonExceptionThrows
DeclaringTypeSystem.Runtime.CompilerServices.RuntimeCompatibilityAttribute
ReflectedTypeSystem.Runtime.CompilerServices.RuntimeCompatibilityAttribute
MetadataToken385879187
ModuleSystem.Private.CoreLib.dll
IsCollectibleFalse
PropertyTypeSystem.Boolean
AttributesNone
CanReadTrue
CanWriteTrue
IsSpecialNameFalse
GetMethodBoolean get_WrapNonExceptionThrows()
SetMethodVoid set_WrapNonExceptionThrows(Boolean)
CustomAttributes
TypedValue
(Boolean)True
ArgumentTypeSystem.Boolean
ValueTrue
MemberNameWrapNonExceptionThrows
IsField
False
AttributeTypeSystem.Runtime.CompilerServices.RuntimeCompatibilityAttribute
2
[System.Diagnostics.DebuggableAttribute((System.Diagnostics.DebuggableAttribute+DebuggingModes)263)]
Constructor
Void .ctor(DebuggingModes)
Name.ctor
MemberTypeConstructor
DeclaringTypeSystem.Diagnostics.DebuggableAttribute
ReflectedTypeSystem.Diagnostics.DebuggableAttribute
MetadataToken
100691394
Module
System.Private.CoreLib.dll
MDStreamVersion
131072
FullyQualifiedNameC:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\7.0.4\\System.Private.CoreLib.dll
ModuleVersionId
06e6b5e4-1059-4922-af54-f5731fb38a29
MetadataToken
1
ScopeNameSystem.Private.CoreLib.dll
NameSystem.Private.CoreLib.dll
Assembly
System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
CodeBasefile:///C:/Program Files/dotnet/shared/Microsoft.NETCore.App/7.0.4/System.Private.CoreLib.dll
FullNameSystem.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e
EntryPoint
<null>
DefinedTypes[ Microsoft.CodeAnalysis.EmbeddedAttribute, System.Runtime.CompilerServices.IsUnmanagedAttribute, System.Runtime.CompilerServices.NullableAttribute, System.Runtime.CompilerServices.NullableContextAttribute, System.Runtime.CompilerServices.NullablePublicOnlyAttribute, System.Runtime.CompilerServices.ScopedRefAttribute, System.Runtime.CompilerServices.RefSafetyRulesAttribute, Interop, Interop+OleAut32, Interop+Globalization, Interop+Globalization+ResultCode, Interop+BOOL, Interop+Kernel32, Interop+Kernel32+NlsVersionInfoEx, Interop+Kernel32+OVERLAPPED_ENTRY, Interop+Kernel32+CONDITION_VARIABLE, Interop+Kernel32+BY_HANDLE_FILE_INFORMATION, Interop+Kernel32+CRITICAL_SECTION, Interop+Kernel32+FILE_BASIC_INFO, Interop+Kernel32+FILE_ALLOCATION_INFO ... (2412 more) ]
IsCollectibleFalse
ManifestModuleSystem.Private.CoreLib.dll
ReflectionOnlyFalse
LocationC:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\7.0.4\\System.Private.CoreLib.dll
ImageRuntimeVersionv4.0.30319
GlobalAssemblyCacheFalse
HostContext0
IsDynamicFalse
ExportedTypes[ Microsoft.Win32.SafeHandles.CriticalHandleMinusOneIsInvalid, Microsoft.Win32.SafeHandles.CriticalHandleZeroOrMinusOneIsInvalid, Microsoft.Win32.SafeHandles.SafeHandleMinusOneIsInvalid, Microsoft.Win32.SafeHandles.SafeHandleZeroOrMinusOneIsInvalid, Microsoft.Win32.SafeHandles.SafeFileHandle, Microsoft.Win32.SafeHandles.SafeWaitHandle, System.ArgIterator, System.Array, System.Attribute, System.BadImageFormatException, System.Buffer, System.Decimal, System.Delegate, System.Enum, System.Environment, System.Environment+SpecialFolder, System.Environment+SpecialFolderOption, System.Exception, System.GCCollectionMode, System.GCNotificationStatus ... (1223 more) ]
IsFullyTrustedTrue
CustomAttributes[ [System.Runtime.CompilerServices.ExtensionAttribute()], [System.Runtime.CompilerServices.CompilationRelaxationsAttribute((Int32)8)], [System.Runtime.CompilerServices.RuntimeCompatibilityAttribute(WrapNonExceptionThrows = True)], [System.Diagnostics.DebuggableAttribute((System.Diagnostics.DebuggableAttribute+DebuggingModes)2)], [System.Reflection.Metadata.MetadataUpdateHandlerAttribute(typeof(System.Reflection.Metadata.RuntimeTypeMetadataUpdateHandler))], [System.CLSCompliantAttribute((Boolean)True)], [System.Runtime.InteropServices.ComVisibleAttribute((Boolean)False)], [System.Runtime.InteropServices.DefaultDllImportSearchPathsAttribute((System.Runtime.InteropServices.DllImportSearchPath)2050)], [System.Reflection.AssemblyMetadataAttribute(\"Serviceable\", \"True\")], [System.Reflection.AssemblyMetadataAttribute(\".NETFrameworkAssembly\", \"\")], [System.Reflection.AssemblyMetadataAttribute(\"IsTrimmable\", \"True\")], [System.Resources.NeutralResourcesLanguageAttribute(\"en-US\")], [System.Runtime.CompilerServices.DisableRuntimeMarshallingAttribute()], [System.Runtime.Versioning.TargetFrameworkAttribute(\".NETCoreApp,Version=v7.0\", FrameworkDisplayName = \".NET 7.0\")], [System.Reflection.AssemblyCompanyAttribute(\"Microsoft Corporation\")], [System.Reflection.AssemblyConfigurationAttribute(\"Release\")], [System.Reflection.AssemblyCopyrightAttribute(\"© Microsoft Corporation. All rights reserved.\")], [System.Reflection.AssemblyDescriptionAttribute(\"System.Private.CoreLib\")], [System.Reflection.AssemblyFileVersionAttribute(\"7.0.423.11508\")], [System.Reflection.AssemblyInformationalVersionAttribute(\"7.0.4+0a396acafe9a7d46bce11f4338dbb3dd0d99b1b4\")] ... (3 more) ]
EscapedCodeBasefile:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.4/System.Private.CoreLib.dll
Modules[ System.Private.CoreLib.dll ]
SecurityRuleSetNone
ModuleHandle
System.ModuleHandle
MDStreamVersion131072
CustomAttributes
indexvalue
0[System.Runtime.CompilerServices.RefSafetyRulesAttribute((Int32)11)]
1[System.Runtime.CompilerServices.NullablePublicOnlyAttribute((Boolean)False)]
2[System.Runtime.CompilerServices.SkipLocalsInitAttribute()]
MethodHandle
System.RuntimeMethodHandle
Value
140715532535232
AttributesPrivateScope, Public, HideBySig, SpecialName, RTSpecialName
CallingConventionStandard, HasThis
IsSecurityCritical
True
IsSecuritySafeCritical
False
IsSecurityTransparent
False
ContainsGenericParameters
False
MethodImplementationFlagsIL
IsAbstract
False
IsConstructor
True
IsFinal
False
IsHideBySig
True
IsSpecialName
True
IsStatic
False
IsVirtual
False
IsAssembly
False
IsFamily
False
IsFamilyAndAssembly
False
IsFamilyOrAssembly
False
IsPrivate
False
IsPublic
True
IsConstructedGenericMethod
False
IsGenericMethod
False
IsGenericMethodDefinition
False
CustomAttributes
IsCollectible
True
ConstructorArguments
indexvalue
0
(System.Diagnostics.DebuggableAttribute+DebuggingModes)263
NamedArguments(empty)
AttributeTypeSystem.Diagnostics.DebuggableAttribute
EscapedCodeBasefile:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.4/System.Private.CoreLib.dll
Modules
indexvalue
0
ℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6.dll
MDStreamVersion
131072
FullyQualifiedName<Unknown>
ModuleVersionId
1d23e53b-72be-4a3e-9efc-59c593f0cee2
MetadataToken
1
ScopeNameℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6.dll
Name<Unknown>
Assembly
ℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
CodeBasefile:///C:/Program Files/dotnet/shared/Microsoft.NETCore.App/7.0.4/System.Private.CoreLib.dll
FullNameℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
EntryPoint
<null>
DefinedTypes
indexvalue
0Microsoft.CodeAnalysis.EmbeddedAttribute
1System.Runtime.CompilerServices.RefSafetyRulesAttribute
2Submission#6
3Submission#6+Counter
4Submission#6+CounterBenchmark
5Submission#6+<<Initialize>>d__0
6Submission#6+CounterBenchmark+<>c
7Submission#6+CounterBenchmark+<>c__DisplayClass0_0
8Submission#6+CounterBenchmark+<>c__DisplayClass1_0
IsCollectible
False
ManifestModule
ℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6.dll
MDStreamVersion
131072
FullyQualifiedName<Unknown>
ModuleVersionId
1d23e53b-72be-4a3e-9efc-59c593f0cee2
MetadataToken
1
ScopeNameℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6.dll
Name<Unknown>
Assembly
ℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
CodeBasefile:///C:/Program Files/dotnet/shared/Microsoft.NETCore.App/7.0.4/System.Private.CoreLib.dll
FullNameℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
EntryPoint
<null>
DefinedTypes[ Microsoft.CodeAnalysis.EmbeddedAttribute, System.Runtime.CompilerServices.RefSafetyRulesAttribute, Submission#6, Submission#6+Counter, Submission#6+CounterBenchmark, Submission#6+<>d__0, Submission#6+CounterBenchmark+<>c, Submission#6+CounterBenchmark+<>c__DisplayClass0_0, Submission#6+CounterBenchmark+<>c__DisplayClass1_0 ]
IsCollectibleFalse
ManifestModuleℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6.dll
ReflectionOnlyFalse
Location
ImageRuntimeVersionv4.0.30319
GlobalAssemblyCacheFalse
HostContext0
IsDynamicFalse
ExportedTypes[ Microsoft.CodeAnalysis.EmbeddedAttribute, System.Runtime.CompilerServices.RefSafetyRulesAttribute, Submission#6, Submission#6+Counter, Submission#6+CounterBenchmark, Submission#6+<>d__0 ]
IsFullyTrustedTrue
CustomAttributes[ [System.Runtime.CompilerServices.CompilationRelaxationsAttribute((Int32)8)], [System.Runtime.CompilerServices.RuntimeCompatibilityAttribute(WrapNonExceptionThrows = True)], [System.Diagnostics.DebuggableAttribute((System.Diagnostics.DebuggableAttribute+DebuggingModes)263)] ]
EscapedCodeBasefile:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.4/System.Private.CoreLib.dll
Modules[ ℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6.dll ]
SecurityRuleSetNone
ModuleHandle
System.ModuleHandle
MDStreamVersion131072
CustomAttributes
indexvalue
0[System.Security.UnverifiableCodeAttribute()]
1[System.Runtime.CompilerServices.RefSafetyRulesAttribute((Int32)11)]
ReflectionOnly
False
Location
ImageRuntimeVersionv4.0.30319
GlobalAssemblyCache
False
HostContext
0
IsDynamic
False
ExportedTypes
indexvalue
0Microsoft.CodeAnalysis.EmbeddedAttribute
1System.Runtime.CompilerServices.RefSafetyRulesAttribute
2Submission#6
3Submission#6+Counter
4Submission#6+CounterBenchmark
5Submission#6+<<Initialize>>d__0
IsFullyTrusted
True
CustomAttributes
indexvalue
0
[System.Runtime.CompilerServices.CompilationRelaxationsAttribute((Int32)8)]
ConstructorVoid .ctor(Int32)
ConstructorArguments[ (Int32)8 ]
NamedArguments[ ]
AttributeTypeSystem.Runtime.CompilerServices.CompilationRelaxationsAttribute
1
[System.Runtime.CompilerServices.RuntimeCompatibilityAttribute(WrapNonExceptionThrows = True)]
ConstructorVoid .ctor()
ConstructorArguments[ ]
NamedArguments[ WrapNonExceptionThrows = True ]
AttributeTypeSystem.Runtime.CompilerServices.RuntimeCompatibilityAttribute
2
[System.Diagnostics.DebuggableAttribute((System.Diagnostics.DebuggableAttribute+DebuggingModes)263)]
ConstructorVoid .ctor(DebuggingModes)
ConstructorArguments[ (System.Diagnostics.DebuggableAttribute+DebuggingModes)263 ]
NamedArguments[ ]
AttributeTypeSystem.Diagnostics.DebuggableAttribute
EscapedCodeBasefile:///C:/Program%20Files/dotnet/shared/Microsoft.NETCore.App/7.0.4/System.Private.CoreLib.dll
Modules
indexvalue
0
ℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6.dll
MDStreamVersion131072
FullyQualifiedName<Unknown>
ModuleVersionId1d23e53b-72be-4a3e-9efc-59c593f0cee2
MetadataToken1
ScopeNameℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6.dll
Name<Unknown>
Assemblyℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null
ModuleHandleSystem.ModuleHandle
CustomAttributes[ [System.Security.UnverifiableCodeAttribute()], [System.Runtime.CompilerServices.RefSafetyRulesAttribute((Int32)11)] ]
SecurityRuleSetNone
ModuleHandle
System.ModuleHandle
MDStreamVersion
131072
CustomAttributes
indexvalue
0
[System.Security.UnverifiableCodeAttribute()]
Constructor
Void .ctor()
Name.ctor
MemberTypeConstructor
DeclaringTypeSystem.Security.UnverifiableCodeAttribute
ReflectedTypeSystem.Security.UnverifiableCodeAttribute
MetadataToken100679594
ModuleSystem.Private.CoreLib.dll
MethodHandleSystem.RuntimeMethodHandle
AttributesPrivateScope, Public, HideBySig, SpecialName, RTSpecialName
CallingConventionStandard, HasThis
IsSecurityCriticalTrue
IsSecuritySafeCriticalFalse
IsSecurityTransparentFalse
ContainsGenericParametersFalse
MethodImplementationFlagsIL
IsAbstractFalse
IsConstructorTrue
IsFinalFalse
IsHideBySigTrue
IsSpecialNameTrue
IsStaticFalse
IsVirtualFalse
IsAssemblyFalse
IsFamilyFalse
IsFamilyAndAssemblyFalse
IsFamilyOrAssemblyFalse
IsPrivateFalse
IsPublicTrue
IsConstructedGenericMethodFalse
IsGenericMethodFalse
IsGenericMethodDefinitionFalse
CustomAttributes
IsCollectibleTrue
ConstructorArguments(empty)
NamedArguments(empty)
AttributeTypeSystem.Security.UnverifiableCodeAttribute
1
[System.Runtime.CompilerServices.RefSafetyRulesAttribute((Int32)11)]
Constructor
Void .ctor(Int32)
Name.ctor
MemberTypeConstructor
DeclaringTypeSystem.Runtime.CompilerServices.RefSafetyRulesAttribute
ReflectedTypeSystem.Runtime.CompilerServices.RefSafetyRulesAttribute
MetadataToken100663298
Moduleℛ*b2a8524a-9fc8-4a1e-ab8c-cc53afd88e64#1-6.dll
MethodHandleSystem.RuntimeMethodHandle
AttributesPrivateScope, Public, HideBySig, SpecialName, RTSpecialName
CallingConventionStandard, HasThis
IsSecurityCriticalTrue
IsSecuritySafeCriticalFalse
IsSecurityTransparentFalse
ContainsGenericParametersFalse
MethodImplementationFlagsIL
IsAbstractFalse
IsConstructorTrue
IsFinalFalse
IsHideBySigTrue
IsSpecialNameTrue
IsStaticFalse
IsVirtualFalse
IsAssemblyFalse
IsFamilyFalse
IsFamilyAndAssemblyFalse
IsFamilyOrAssemblyFalse
IsPrivateFalse
IsPublicTrue
IsConstructedGenericMethodFalse
IsGenericMethodFalse
IsGenericMethodDefinitionFalse
CustomAttributes
IsCollectibleTrue
ConstructorArguments
indexvalue
0(Int32)11
NamedArguments(empty)
AttributeTypeSystem.Runtime.CompilerServices.RefSafetyRulesAttribute
SecurityRuleSetNone
" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "typeof(Counter).Assembly" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": ".NET (C#)", + "language": "C#", + "name": ".net-csharp" + }, + "language_info": { + "name": "polyglot-notebook" + }, + "orig_nbformat": 4, + "polyglot_notebook": { + "kernelInfo": { + "defaultKernelName": "csharp", + "items": [ + { + "aliases": [], + "name": "csharp" + } + ] + } + } + }, + "nbformat": 4, + "nbformat_minor": 2 +}