├── .github
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── FUNDING.yml
└── workflows
│ ├── generate-changelog.yaml
│ ├── generate-gh-pages.yaml
│ ├── publish-nightly.yaml
│ ├── report-test-results.yaml
│ └── run-tests.yaml
├── .gitignore
├── BenchmarkDotNet.Xamarin.sln
├── BenchmarkDotNet.sln
├── BenchmarkDotNet.sln.DotSettings
├── LICENSE.md
├── NuGet.Config
├── README.md
├── build.cmd
├── build
├── BenchmarkDotNet.Build
│ ├── BenchmarkDotNet.Build.csproj
│ ├── BuildContext.cs
│ ├── CommandLineParser.cs
│ ├── EnvVar.cs
│ ├── Example.cs
│ ├── Folder.DotSettings
│ ├── HelpInfo.cs
│ ├── Helpers
│ │ ├── OctokitExtensions.cs
│ │ └── Utils.cs
│ ├── IHelpProvider.cs
│ ├── Meta
│ │ ├── Repo.cs
│ │ └── VersionHistory.cs
│ ├── Options
│ │ ├── BoolOption.cs
│ │ ├── IOption.cs
│ │ ├── KnownOptions.cs
│ │ ├── Option.cs
│ │ └── StringOption.cs
│ ├── Program.cs
│ └── Runners
│ │ ├── BuildRunner.cs
│ │ ├── Changelog
│ │ ├── ChangelogBuilder.cs
│ │ └── ChangelogDetailsBuilder.cs
│ │ ├── DocumentationRunner.cs
│ │ ├── GitRunner.cs
│ │ ├── ReleaseRunner.cs
│ │ └── UnitTestRunner.cs
├── CodingStyle.ruleset
├── build.bat
├── build.ps1
├── build.sh
├── cSpell.json
├── common.props
├── package-icon.png
├── sdk
│ └── global.json
├── strongNameKey.snk
└── versions.txt
├── docs
├── .gitignore
├── _changelog
│ ├── footer
│ │ ├── v0.10.0.md
│ │ ├── v0.10.1.md
│ │ ├── v0.10.10.md
│ │ ├── v0.10.11.md
│ │ ├── v0.10.12.md
│ │ ├── v0.10.13.md
│ │ ├── v0.10.14.md
│ │ ├── v0.10.2.md
│ │ ├── v0.10.3.md
│ │ ├── v0.10.4.md
│ │ ├── v0.10.5.md
│ │ ├── v0.10.6.md
│ │ ├── v0.10.7.md
│ │ ├── v0.10.8.md
│ │ ├── v0.10.9.md
│ │ ├── v0.11.0.md
│ │ ├── v0.11.1.md
│ │ ├── v0.11.2.md
│ │ ├── v0.11.3.md
│ │ ├── v0.11.4.md
│ │ ├── v0.11.5.md
│ │ ├── v0.12.0.md
│ │ ├── v0.12.1.md
│ │ ├── v0.13.0.md
│ │ ├── v0.13.1.md
│ │ ├── v0.13.10.md
│ │ ├── v0.13.11.md
│ │ ├── v0.13.12.md
│ │ ├── v0.13.2.md
│ │ ├── v0.13.3.md
│ │ ├── v0.13.4.md
│ │ ├── v0.13.5.md
│ │ ├── v0.13.6.md
│ │ ├── v0.13.7.md
│ │ ├── v0.13.8.md
│ │ ├── v0.13.9.md
│ │ ├── v0.14.0.md
│ │ ├── v0.15.0.md
│ │ ├── v0.8.2.md
│ │ ├── v0.9.0.md
│ │ ├── v0.9.1.md
│ │ ├── v0.9.2.md
│ │ ├── v0.9.3.md
│ │ ├── v0.9.4.md
│ │ ├── v0.9.5.md
│ │ ├── v0.9.6.md
│ │ ├── v0.9.7.md
│ │ ├── v0.9.8.md
│ │ └── v0.9.9.md
│ └── header
│ │ ├── v0.10.0.md
│ │ ├── v0.10.1.md
│ │ ├── v0.10.10.md
│ │ ├── v0.10.11.md
│ │ ├── v0.10.12.md
│ │ ├── v0.10.13.md
│ │ ├── v0.10.14.md
│ │ ├── v0.10.2.md
│ │ ├── v0.10.3.md
│ │ ├── v0.10.4.md
│ │ ├── v0.10.5.md
│ │ ├── v0.10.6.md
│ │ ├── v0.10.7.md
│ │ ├── v0.10.8.md
│ │ ├── v0.10.9.md
│ │ ├── v0.11.0.md
│ │ ├── v0.11.1.md
│ │ ├── v0.11.2.md
│ │ ├── v0.11.3.md
│ │ ├── v0.11.4.md
│ │ ├── v0.11.5.md
│ │ ├── v0.12.0.md
│ │ ├── v0.12.1.md
│ │ ├── v0.13.0.md
│ │ ├── v0.13.1.md
│ │ ├── v0.13.10.md
│ │ ├── v0.13.11.md
│ │ ├── v0.13.12.md
│ │ ├── v0.13.2.md
│ │ ├── v0.13.3.md
│ │ ├── v0.13.4.md
│ │ ├── v0.13.5.md
│ │ ├── v0.13.6.md
│ │ ├── v0.13.7.md
│ │ ├── v0.13.8.md
│ │ ├── v0.13.9.md
│ │ ├── v0.14.0.md
│ │ ├── v0.15.0.md
│ │ ├── v0.8.2.md
│ │ ├── v0.9.0.md
│ │ ├── v0.9.2.md
│ │ ├── v0.9.3.md
│ │ ├── v0.9.4.md
│ │ ├── v0.9.5.md
│ │ ├── v0.9.6.md
│ │ ├── v0.9.7.md
│ │ ├── v0.9.8.md
│ │ └── v0.9.9.md
├── _redirects
│ └── _redirects
├── api
│ └── index.md
├── articles
│ ├── configs
│ │ ├── analysers.md
│ │ ├── columns.md
│ │ ├── configoptions.md
│ │ ├── configs.md
│ │ ├── diagnosers.md
│ │ ├── exporters.md
│ │ ├── filters.md
│ │ ├── jobs.md
│ │ ├── loggers.md
│ │ ├── orderers.md
│ │ ├── powerplans.md
│ │ ├── toc.yml
│ │ ├── toolchains.md
│ │ └── validators.md
│ ├── contributing
│ │ ├── building.md
│ │ ├── debugging.md
│ │ ├── disassembler.md
│ │ ├── documentation.md
│ │ ├── miscellaneous.md
│ │ ├── running-tests.md
│ │ └── toc.yml
│ ├── faq.md
│ ├── features
│ │ ├── baselines.md
│ │ ├── disassembler.md
│ │ ├── etwprofiler.md
│ │ ├── event-pipe-profiler.md
│ │ ├── parameterization.md
│ │ ├── setup-and-cleanup.md
│ │ ├── statistics.md
│ │ ├── toc.yml
│ │ ├── vsprofiler.md
│ │ └── vstest.md
│ ├── guides
│ │ ├── choosing-run-strategy.md
│ │ ├── console-args.md
│ │ ├── customizing-runtime.md
│ │ ├── dotnet-new-templates.md
│ │ ├── getting-started.md
│ │ ├── good-practices.md
│ │ ├── how-it-works.md
│ │ ├── how-to-run.md
│ │ ├── nuget.md
│ │ ├── toc.yml
│ │ └── troubleshooting.md
│ ├── license.md
│ ├── overview.md
│ ├── samples
│ │ ├── IntroArguments.md
│ │ ├── IntroArgumentsPriority.md
│ │ ├── IntroArgumentsSource.md
│ │ ├── IntroArrayParam.md
│ │ ├── IntroBasic.md
│ │ ├── IntroBenchmarkBaseline.md
│ │ ├── IntroCategories.md
│ │ ├── IntroCategoryBaseline.md
│ │ ├── IntroCategoryDiscoverer.md
│ │ ├── IntroColdStart.md
│ │ ├── IntroComparableComplexParam.md
│ │ ├── IntroConfigSource.md
│ │ ├── IntroConfigUnion.md
│ │ ├── IntroCustomMono.md
│ │ ├── IntroCustomMonoArguments.md
│ │ ├── IntroDeferredExecution.md
│ │ ├── IntroDisassembly.md
│ │ ├── IntroDisassemblyAllJits.md
│ │ ├── IntroDisassemblyDry.md
│ │ ├── IntroDisassemblyRyuJit.md
│ │ ├── IntroDotMemoryDiagnoser.md
│ │ ├── IntroDotTraceDiagnoser.md
│ │ ├── IntroEnvVars.md
│ │ ├── IntroEventPipeProfiler.md
│ │ ├── IntroEventPipeProfilerAdvanced.md
│ │ ├── IntroExceptionDiagnoser.md
│ │ ├── IntroExport.md
│ │ ├── IntroExportJson.md
│ │ ├── IntroExportXml.md
│ │ ├── IntroFilters.md
│ │ ├── IntroFluentConfigBuilder.md
│ │ ├── IntroGcMode.md
│ │ ├── IntroGenericTypeArguments.md
│ │ ├── IntroHardwareCounters.md
│ │ ├── IntroInProcess.md
│ │ ├── IntroInProcessWrongEnv.md
│ │ ├── IntroInliningDiagnoser.md
│ │ ├── IntroJitStatsDiagnoser.md
│ │ ├── IntroJobBaseline.md
│ │ ├── IntroJoin.md
│ │ ├── IntroLargeAddressAware.md
│ │ ├── IntroMonitoring.md
│ │ ├── IntroMultimodal.md
│ │ ├── IntroNativeMemory.md
│ │ ├── IntroNuGet.md
│ │ ├── IntroOrderAttr.md
│ │ ├── IntroOrderManual.md
│ │ ├── IntroOutliers.md
│ │ ├── IntroParams.md
│ │ ├── IntroParamsAllValues.md
│ │ ├── IntroParamsPriority.md
│ │ ├── IntroParamsSource.md
│ │ ├── IntroPercentiles.md
│ │ ├── IntroPowerPlan.md
│ │ ├── IntroRankColumn.md
│ │ ├── IntroRatioSD.md
│ │ ├── IntroRatioStyle.md
│ │ ├── IntroSetupCleanupGlobal.md
│ │ ├── IntroSetupCleanupIteration.md
│ │ ├── IntroSetupCleanupTarget.md
│ │ ├── IntroStaThread.md
│ │ ├── IntroStatisticalTesting.md
│ │ ├── IntroStatisticsColumns.md
│ │ ├── IntroStopOnFirstError.md
│ │ ├── IntroSummaryStyle.md
│ │ ├── IntroTagColumn.md
│ │ ├── IntroTailcall.md
│ │ ├── IntroTemplate.txt
│ │ ├── IntroThreadingDiagnoser.md
│ │ ├── IntroUnicode.md
│ │ ├── IntroVisualStudioProfiler.md
│ │ ├── IntroWakeLock.md
│ │ ├── IntroWasm.md
│ │ ├── IntroXamarin.md
│ │ └── toc.yml
│ ├── team.md
│ └── toc.yml
├── docfx.json
├── filter.yml
├── guide
│ ├── README.md
│ └── logo.png
├── images
│ ├── cygwin-binutils.png
│ ├── disasm-demo.png
│ ├── v0.12.0
│ │ └── rplot.png
│ ├── vs-profiler-demo.png
│ ├── vs-testexplorer-demo.png
│ └── xamarin-screenshot.png
├── logo.png
├── logo
│ ├── icon-128.png
│ ├── icon-32.png
│ ├── icon-64.png
│ ├── icon.svg
│ ├── logo-cmyk.eps
│ ├── logo-rgb.eps
│ ├── logo-wide.png
│ ├── logo-wide.svg
│ ├── logo.png
│ └── logo.svg
├── template
│ └── public
│ │ ├── main.css
│ │ └── main.js
└── toc.yml
├── samples
├── BenchmarkDotNet.Samples.Android
│ ├── BenchmarkDotNet.Samples.Android.csproj
│ ├── MainActivity.cs
│ ├── Properties
│ │ ├── AndroidManifest.xml
│ │ └── AssemblyInfo.cs
│ └── Resources
│ │ ├── layout
│ │ ├── Tabbar.xml
│ │ └── Toolbar.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── icon.xml
│ │ └── icon_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── icon.png
│ │ └── launcher_foreground.png
│ │ ├── mipmap-mdpi
│ │ ├── icon.png
│ │ └── launcher_foreground.png
│ │ ├── mipmap-xhdpi
│ │ ├── icon.png
│ │ └── launcher_foreground.png
│ │ ├── mipmap-xxhdpi
│ │ ├── icon.png
│ │ └── launcher_foreground.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── icon.png
│ │ └── launcher_foreground.png
│ │ └── values
│ │ ├── colors.xml
│ │ └── styles.xml
├── BenchmarkDotNet.Samples.FSharp
│ ├── BenchmarkDotNet.Samples.FSharp.fsproj
│ └── Program.fs
├── BenchmarkDotNet.Samples.Forms
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── AssemblyInfo.cs
│ ├── BenchmarkDotNet.Samples.Forms.csproj
│ ├── MainPage.xaml
│ └── MainPage.xaml.cs
├── BenchmarkDotNet.Samples.iOS
│ ├── AppDelegate.cs
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon1024.png
│ │ │ ├── Icon120.png
│ │ │ ├── Icon152.png
│ │ │ ├── Icon167.png
│ │ │ ├── Icon180.png
│ │ │ ├── Icon20.png
│ │ │ ├── Icon29.png
│ │ │ ├── Icon40.png
│ │ │ ├── Icon58.png
│ │ │ ├── Icon60.png
│ │ │ ├── Icon76.png
│ │ │ ├── Icon80.png
│ │ │ └── Icon87.png
│ ├── BenchmarkDotNet.Samples.iOS.csproj
│ ├── Entitlements.plist
│ ├── Info.plist
│ ├── Main.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── Resources
│ │ ├── Default-568h@2x.png
│ │ ├── Default-Portrait.png
│ │ ├── Default-Portrait@2x.png
│ │ ├── Default.png
│ │ ├── Default@2x.png
│ │ └── LaunchScreen.storyboard
└── BenchmarkDotNet.Samples
│ ├── BenchmarkDotNet.Samples.csproj
│ ├── BenchmarkDotNet.Samples.csproj.DotSettings
│ ├── IntroArguments.cs
│ ├── IntroArgumentsPriority.cs
│ ├── IntroArgumentsSource.cs
│ ├── IntroArrayParam.cs
│ ├── IntroBasic.cs
│ ├── IntroBenchmarkBaseline.cs
│ ├── IntroCategories.cs
│ ├── IntroCategoryBaseline.cs
│ ├── IntroCategoryDiscoverer.cs
│ ├── IntroColdStart.cs
│ ├── IntroComparableComplexParam.cs
│ ├── IntroConfigSource.cs
│ ├── IntroConfigUnion.cs
│ ├── IntroCultureInfo.cs
│ ├── IntroCustomMono.cs
│ ├── IntroCustomMonoArguments.cs
│ ├── IntroDeferredExecution.cs
│ ├── IntroDisassembly.cs
│ ├── IntroDisassemblyAllJits.cs
│ ├── IntroDisassemblyDry.cs
│ ├── IntroDisassemblyRyuJit.cs
│ ├── IntroDotMemoryDiagnoser.cs
│ ├── IntroDotTraceDiagnoser.cs
│ ├── IntroEnvVars.cs
│ ├── IntroEventPipeProfiler.cs
│ ├── IntroEventPipeProfilerAdvanced.cs
│ ├── IntroExceptionDiagnoser.cs
│ ├── IntroExport.cs
│ ├── IntroExportJson.cs
│ ├── IntroExportXml.cs
│ ├── IntroFilters.cs
│ ├── IntroFluentConfigBuilder.cs
│ ├── IntroGcMode.cs
│ ├── IntroGenericTypeArguments.cs
│ ├── IntroHardwareCounters.cs
│ ├── IntroHidingColumns.cs
│ ├── IntroInProcess.cs
│ ├── IntroInProcessWrongEnv.cs
│ ├── IntroInliningDiagnoser.cs
│ ├── IntroJitStatsDiagnoser.cs
│ ├── IntroJobBaseline.cs
│ ├── IntroJoin.cs
│ ├── IntroLargeAddressAware.cs
│ ├── IntroMemoryRandomization.cs
│ ├── IntroMonitoring.cs
│ ├── IntroMultimodal.cs
│ ├── IntroNativeMemory.cs
│ ├── IntroNuGet.cs
│ ├── IntroOrderAttr.cs
│ ├── IntroOrderManual.cs
│ ├── IntroOutliers.cs
│ ├── IntroParams.cs
│ ├── IntroParamsAllValues.cs
│ ├── IntroParamsPriority.cs
│ ├── IntroParamsSource.cs
│ ├── IntroPercentiles.cs
│ ├── IntroPerfCollectProfiler.cs
│ ├── IntroPowerPlan.cs
│ ├── IntroRankColumn.cs
│ ├── IntroRatioSD.cs
│ ├── IntroRatioStyle.cs
│ ├── IntroSetupCleanupGlobal.cs
│ ├── IntroSetupCleanupIteration.cs
│ ├── IntroSetupCleanupTarget.cs
│ ├── IntroSmokeEmptyBasic.cs
│ ├── IntroSmokeIncrements.cs
│ ├── IntroSmokeValueTypes.cs
│ ├── IntroStaThread.cs
│ ├── IntroStatisticalTesting.cs
│ ├── IntroStatisticsColumns.cs
│ ├── IntroStopOnFirstError.cs
│ ├── IntroSummaryStyle.cs
│ ├── IntroTagColumn.cs
│ ├── IntroTailcall.cs
│ ├── IntroThreadingDiagnoser.cs
│ ├── IntroUnicode.cs
│ ├── IntroVisualStudioDiagnoser.cs
│ ├── IntroWakeLock.cs
│ ├── IntroWasm.cs
│ ├── Program.cs
│ └── Properties
│ └── AssemblyInfo.cs
├── src
├── BenchmarkDotNet.Annotations
│ ├── Attributes
│ │ ├── ArgumentsAttribute.cs
│ │ ├── ArgumentsSourceAttribute.cs
│ │ ├── BenchmarkAttribute.cs
│ │ ├── BenchmarkCategoryAttribute.cs
│ │ ├── DynamicallyAccessedMemberTypes.cs
│ │ ├── DynamicallyAccessedMembersAttribute.cs
│ │ ├── GenericTypeArgumentsAttribute.cs
│ │ ├── GlobalCleanupAttribute.cs
│ │ ├── GlobalSetupAttribute.cs
│ │ ├── IterationCleanupAttribute.cs
│ │ ├── IterationSetupAttribute.cs
│ │ ├── ParamsAllValuesAttribute.cs
│ │ ├── ParamsAttribute.cs
│ │ ├── ParamsSourceAttribute.cs
│ │ ├── PriorityAttribute.cs
│ │ └── TargetedAttribute.cs
│ ├── BenchmarkDotNet.Annotations.csproj
│ └── Jobs
│ │ └── RuntimeMoniker.cs
├── BenchmarkDotNet.Diagnostics.Windows
│ ├── BenchmarkDotNet.Diagnostics.Windows.csproj
│ ├── ConcurrencyVisualizerProfiler.cs
│ ├── Configs
│ │ ├── ConcurrencyVisualizerProfilerAttribute.cs
│ │ ├── EtwProfilerAttribute.cs
│ │ ├── InliningDiagnoserAttribute.cs
│ │ ├── JitStatsDiagnoserAttribute.cs
│ │ ├── NativeMemoryProfilerAttribute.cs
│ │ └── TailCallDiagnoserAttribute.cs
│ ├── EtwDiagnoser.cs
│ ├── EtwProfiler.cs
│ ├── EtwProfilerConfig.cs
│ ├── HardwareCounters.cs
│ ├── InliningDiagnoser.cs
│ ├── JitDiagnoser.cs
│ ├── JitStatsDiagnoser.cs
│ ├── NativeMemoryProfiler.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Sessions.cs
│ ├── TailCallDiagnoser.cs
│ └── Tracing
│ │ ├── BenchmarkEvent.cs
│ │ ├── EngineEventLogParser.cs
│ │ ├── IterationEvent.cs
│ │ ├── NativeMemoryLogParser.cs
│ │ └── TraceLogParser.cs
├── BenchmarkDotNet.Diagnostics.dotMemory
│ ├── BenchmarkDotNet.Diagnostics.dotMemory.csproj
│ ├── DotMemoryDiagnoser.cs
│ ├── DotMemoryDiagnoserAttribute.cs
│ └── Properties
│ │ └── AssemblyInfo.cs
├── BenchmarkDotNet.Diagnostics.dotTrace
│ ├── BenchmarkDotNet.Diagnostics.dotTrace.csproj
│ ├── DotTraceDiagnoser.cs
│ ├── DotTraceDiagnoserAttribute.cs
│ └── Properties
│ │ └── AssemblyInfo.cs
├── BenchmarkDotNet.Disassembler.x64
│ ├── BenchmarkDotNet.Disassembler.x64.csproj
│ ├── ClrMdV1Disassembler.cs
│ ├── DataContracts.cs
│ ├── Program.cs
│ └── SourceCodeProvider.cs
├── BenchmarkDotNet.Disassembler.x86
│ └── BenchmarkDotNet.Disassembler.x86.csproj
├── BenchmarkDotNet.Exporters.Plotting
│ ├── BenchmarkDotNet.Exporters.Plotting.csproj
│ └── ScottPlotExporter.cs
├── BenchmarkDotNet.TestAdapter
│ ├── BenchmarkCaseExtensions.cs
│ ├── BenchmarkDotNet.TestAdapter.csproj
│ ├── BenchmarkEnumerator.cs
│ ├── BenchmarkExecutor.cs
│ ├── Remoting
│ │ ├── BenchmarkEnumeratorWrapper.cs
│ │ ├── BenchmarkExecutorWrapper.cs
│ │ ├── MessageLoggerWrapper.cs
│ │ ├── SerializationHelpers.cs
│ │ └── TestExecutionRecorderWrapper.cs
│ ├── VSTestAdapter.cs
│ ├── VSTestEventProcessor.cs
│ ├── VSTestLogger.cs
│ ├── VSTestProperties.cs
│ ├── build
│ │ └── BenchmarkDotNet.TestAdapter.props
│ └── entrypoints
│ │ ├── EntryPoint.cs
│ │ ├── EntryPoint.fs
│ │ └── EntryPoint.vb
└── BenchmarkDotNet
│ ├── Analysers
│ ├── AnalyserBase.cs
│ ├── BaselineCustomAnalyzer.cs
│ ├── CompositeAnalyser.cs
│ ├── Conclusion.cs
│ ├── ConclusionHelper.cs
│ ├── ConclusionKind.cs
│ ├── EnvironmentAnalyser.cs
│ ├── HideColumnsAnalyser.cs
│ ├── IAnalyser.cs
│ ├── MinIterationTimeAnalyser.cs
│ ├── MultimodalDistributionAnalyzer.cs
│ ├── OutliersAnalyser.cs
│ ├── RuntimeErrorAnalyser.cs
│ ├── ZeroMeasurementAnalyser.cs
│ └── ZeroMeasurementHelper.cs
│ ├── Attributes
│ ├── ArtifactsPathAttribute.cs
│ ├── CategoryDiscovererAttribute.cs
│ ├── Columns
│ │ ├── AllStatisticsColumnAttribute.cs
│ │ ├── BaselineColumnAttribute.cs
│ │ ├── CategoriesColumnAttribute.cs
│ │ ├── ColumnConfigBaseAttribute.cs
│ │ ├── ConfidenceIntervalErrorColumnAttribute.cs
│ │ ├── IterationsColumnAttribute.cs
│ │ ├── KurtosisColumnAttribute.cs
│ │ ├── LogicalGroupColumnAttribute.cs
│ │ ├── MValueColumnAttribute.cs
│ │ ├── MaxColumnAttribute.cs
│ │ ├── MeanColumnAttribute.cs
│ │ ├── MedianColumnAttribute.cs
│ │ ├── MinColumnAttribute.cs
│ │ ├── NamespaceColumnAttribute.cs
│ │ ├── OperationsPerSecondAttribute.cs
│ │ ├── Q1ColumnAttribute.cs
│ │ ├── Q3ColumnAttribute.cs
│ │ ├── RankColumnAttribute.cs
│ │ ├── SkewnessColumnAttribute.cs
│ │ ├── StdDevColumnAttribute.cs
│ │ ├── StdErrorColumnAttribute.cs
│ │ └── WelchTTestPValueColumnAttribute.cs
│ ├── ConfigAttribute.cs
│ ├── DisassemblyDiagnoserAttribute.cs
│ ├── EncodingAttribute.cs
│ ├── EventPipeProfilerAttribute.cs
│ ├── ExceptionDiagnoserAttribute.cs
│ ├── ExceptionDiagnoserConfig.cs
│ ├── Exporters
│ │ ├── AsciiDocExporterAttribute.cs
│ │ ├── CsvExporterAttribute.cs
│ │ ├── CsvMeasurementsExporterAttribute.cs
│ │ ├── ExporterConfigBaseAttribute.cs
│ │ ├── HtmlExporterAttribute.cs
│ │ ├── JsonExporterAttribute.cs
│ │ ├── MarkdownExporterAttribute.cs
│ │ ├── PerfonarExporterAttribute.cs
│ │ ├── PlainExporterAttribute.cs
│ │ ├── RPlotExporterAttribute.cs
│ │ └── XmlExporterAttribute.cs
│ ├── Filters
│ │ ├── AllCategoriesFilterAttribute.cs
│ │ ├── AnyCategoriesFilterAttribute.cs
│ │ ├── AotFilterAttribute.cs
│ │ ├── FilterConfigBaseAttribute.cs
│ │ ├── OperatingSystemsArchitectureFilterAttribute.cs
│ │ └── OperatingSystemsFilterAttribute.cs
│ ├── GroupBenchmarksByAttribute.cs
│ ├── HardwareCountersAttribute.cs
│ ├── HideColumnsAttribute.cs
│ ├── Jobs
│ │ ├── DryJobAttribute.cs
│ │ ├── InProcessAttribute.cs
│ │ ├── JobConfigbaseAttribute.cs
│ │ ├── LegacyJitX64JobAttribute.cs
│ │ ├── LegacyJitX86JobAttribute.cs
│ │ ├── LongRunJobAttribute.cs
│ │ ├── MediumRunJobAttribute.cs
│ │ ├── MonoJobAttribute.cs
│ │ ├── RyuJitX64JobAttribute.cs
│ │ ├── RyuJitX86JobAttribute.cs
│ │ ├── ShortRunJobAttribute.cs
│ │ ├── SimpleJobAttribute.cs
│ │ └── VeryLongRunJobAttribute.cs
│ ├── KeepBenchmarkFilesAttribute.cs
│ ├── MemoryDiagnoserAttribute.cs
│ ├── Mutators
│ │ ├── EvaluateOverheadAttribute.cs
│ │ ├── GcConcurrentAttribute.cs
│ │ ├── GcForceAttribute.cs
│ │ ├── GcServerAttribute.cs
│ │ ├── InnerIterationCountAttribute.cs
│ │ ├── InvocationCountAttribute.cs
│ │ ├── IterationCountAttribute.cs
│ │ ├── IterationTimeAttribute.cs
│ │ ├── JobMutatorConfigBaseAttribute.cs
│ │ ├── MaxAbsoluteErrorAttribute.cs
│ │ ├── MaxIterationCountAttribute.cs
│ │ ├── MaxRelativeErrorAttribute.cs
│ │ ├── MaxWarmupCountAttribute.cs
│ │ ├── MemoryRandomizationAttribute.cs
│ │ ├── MinInvokeCountAttribute.cs
│ │ ├── MinIterationCountAttribute.cs
│ │ ├── MinIterationTimeAttribute.cs
│ │ ├── MinWarmupCountAttribute.cs
│ │ ├── OutliersAttribute.cs
│ │ ├── ProcessCountAttribute.cs
│ │ ├── RunOncePerIterationAttribute.cs
│ │ └── WarmupCountAttribute.cs
│ ├── Obsolete
│ │ ├── ClrJobAttribute.cs
│ │ ├── CoreJobAttribute.cs
│ │ ├── DryClrJobAttribute.cs
│ │ ├── DryCoreJobAttribute.cs
│ │ └── DryMonoJobAttribute.cs
│ ├── OrdererAttribute.cs
│ ├── PerfCollectProfilerAttribute.cs
│ ├── StopOnFirstErrorAttribute.cs
│ ├── ThreadingDiagnoserAttribute.cs
│ ├── UnicodeConsoleLoggerAttribute.cs
│ ├── Validators
│ │ ├── ExecutionValidatorAttribute.cs
│ │ ├── ReturnValueValidatorAttribute.cs
│ │ └── ValidatorConfigBaseAttribute.cs
│ └── WakeLockAttribute.cs
│ ├── BenchmarkDotNet.csproj
│ ├── BenchmarkDotNet.csproj.DotSettings
│ ├── Characteristics
│ ├── Characteristic.cs
│ ├── CharacteristicHelper.cs
│ ├── CharacteristicObject.cs
│ ├── CharacteristicObject`1.cs
│ ├── CharacteristicPresenter.cs
│ ├── CharacteristicSet.cs
│ ├── CharacteristicSetPresenter.cs
│ ├── Characteristic`1.cs
│ ├── CompositeResolver.cs
│ ├── IResolver.cs
│ └── Resolver.cs
│ ├── Code
│ ├── ArrayParam.cs
│ ├── CodeGenerator.cs
│ ├── DeclarationsProvider.cs
│ ├── EnumParam.cs
│ └── IParam.cs
│ ├── Columns
│ ├── BaselineAllocationRatioColumn.cs
│ ├── BaselineColumn.cs
│ ├── BaselineCustomColumn.cs
│ ├── BaselineRatioColumn.cs
│ ├── BaselineScaledColumn.cs
│ ├── CategoriesColumn.cs
│ ├── Column.cs
│ ├── ColumnCategory.cs
│ ├── ColumnExtensions.cs
│ ├── ColumnHidingByIdRule.cs
│ ├── ColumnHidingByNameRule.cs
│ ├── CompositeColumnProvider.cs
│ ├── DefaultColumnProvider.cs
│ ├── EmptyColumnProvider.cs
│ ├── IColumn.cs
│ ├── IColumnHidingRule.cs
│ ├── IColumnProvider.cs
│ ├── JobCharacteristicColumn.cs
│ ├── LogicalGroupColumn.cs
│ ├── MetricColumn.cs
│ ├── ParamColumn.cs
│ ├── RankColumn.cs
│ ├── RatioColumnStyle.cs
│ ├── SimpleColumnProvider.cs
│ ├── StatisticColumn.cs
│ ├── StatisticalTestColumn.cs
│ ├── TagColumn.cs
│ ├── TargetMethodColumn.cs
│ └── UnitType.cs
│ ├── Configs
│ ├── BenchmarkLogicalGroupRule.cs
│ ├── ConfigExtensions.cs
│ ├── ConfigOptions.cs
│ ├── ConfigUnionRule.cs
│ ├── DebugConfig.cs
│ ├── DefaultConfig.cs
│ ├── IConfig.cs
│ ├── IConfigSource.cs
│ ├── ImmutableConfig.cs
│ ├── ImmutableConfigBuilder.cs
│ ├── ManualConfig.cs
│ └── WakeLockType.cs
│ ├── ConsoleArguments
│ ├── CommandLineOptions.cs
│ ├── ConfigParser.cs
│ ├── CorrectionsSuggester.cs
│ ├── LevenshteinDistanceCalculator.cs
│ ├── ListBenchmarks
│ │ ├── BenchmarkCasesPrinter.cs
│ │ ├── FlatBenchmarkCasesPrinter.cs
│ │ ├── IBenchmarkCasesPrinter.cs
│ │ ├── ListBechnmarkCaseMode.cs
│ │ ├── Node.cs
│ │ └── TreeBenchmarkCasesPrinter.cs
│ └── LoggerWrapper.cs
│ ├── Detectors
│ ├── Cpu
│ │ ├── HardwareIntrinsics.cs
│ │ ├── ICpuDetector.cs
│ │ ├── Linux
│ │ │ ├── LinuxCpuDetector.cs
│ │ │ └── LinuxCpuInfoParser.cs
│ │ ├── Windows
│ │ │ ├── MosCpuDetector.cs
│ │ │ ├── WindowsCpuDetector.cs
│ │ │ ├── WmicCpuDetector.cs
│ │ │ ├── WmicCpuInfoKeyNames.cs
│ │ │ └── WmicCpuInfoParser.cs
│ │ └── macOS
│ │ │ ├── MacOsCpuDetector.cs
│ │ │ └── SysctlCpuInfoParser.cs
│ ├── CpuDetector.cs
│ └── OsDetector.cs
│ ├── Diagnosers
│ ├── AllocatedMemoryMetricDescriptor.cs
│ ├── AllocatedNativeMemoryDescriptor.cs
│ ├── CompositeDiagnoser.cs
│ ├── DiagnoserActionParameters.cs
│ ├── DiagnoserResults.cs
│ ├── DiagnosersLoader.cs
│ ├── EventPipeProfile.cs
│ ├── EventPipeProfileMapper.cs
│ ├── EventPipeProfiler.cs
│ ├── ExceptionDiagnoser.cs
│ ├── HardwareCounter.cs
│ ├── IDiagnoser.cs
│ ├── IHardwareCounterDiagnoser.cs
│ ├── IProfiler.cs
│ ├── MemoryDiagnoser.cs
│ ├── MemoryDiagnoserConfig.cs
│ ├── PerfCollectProfiler.cs
│ ├── PerfCollectProfilerConfig.cs
│ ├── PmcMetricDescriptor.cs
│ ├── PmcStats.cs
│ ├── PreciseMachineCounter.cs
│ ├── RunMode.cs
│ ├── SnapshotProfilerBase.cs
│ ├── SpeedScopeExporter.cs
│ ├── ThreadingDiagnoser.cs
│ ├── ThreadingDiagnoserConfig.cs
│ └── UnresolvedDiagnoser.cs
│ ├── Disassemblers
│ ├── Arm64Disassembler.cs
│ ├── Arm64InstructionFormatter.cs
│ ├── ClrMdV3Disassembler.cs
│ ├── DisassemblyAnalyzer.cs
│ ├── DisassemblyDiagnoser.cs
│ ├── DisassemblyDiagnoserConfig.cs
│ ├── DisassemblySyntax.cs
│ ├── Exporters
│ │ ├── CombinedDisassemblyExporter.cs
│ │ ├── DisassemblyPrettifier.cs
│ │ ├── GithubMarkdownDiffDisassemblyExporter.cs
│ │ ├── GithubMarkdownDisassemblyExporter.cs
│ │ ├── HtmlDisassemblyExporter.cs
│ │ └── SymbolResolver.cs
│ ├── InstructionFormatter.cs
│ ├── IntelDisassembler.cs
│ ├── IntelInstructionFormatter.cs
│ ├── MonoDisassembler.cs
│ ├── SameArchitectureDisassembler.cs
│ ├── SourceCodeProvider.cs
│ └── WindowsDisassembler.cs
│ ├── Engines
│ ├── AnonymousPipesHost.cs
│ ├── Consumer.cs
│ ├── ConsumerExtensions.cs
│ ├── DeadCodeEliminationHelper.cs
│ ├── Engine.cs
│ ├── EngineActualStage.cs
│ ├── EngineEventSource.cs
│ ├── EngineFactory.cs
│ ├── EngineParameters.cs
│ ├── EnginePilotStage.cs
│ ├── EngineResolver.cs
│ ├── EngineStage.cs
│ ├── EngineWarmupStage.cs
│ ├── ExceptionsStats.cs
│ ├── GcStats.cs
│ ├── HostExtensions.cs
│ ├── HostSignal.cs
│ ├── IEngine.cs
│ ├── IEngineFactory.cs
│ ├── IHost.cs
│ ├── IterationData.cs
│ ├── IterationMode.cs
│ ├── IterationStage.cs
│ ├── NoAcknowledgementConsoleHost.cs
│ ├── RunResults.cs
│ ├── RunStrategy.cs
│ ├── RunStrategyExtensions.cs
│ └── ThreadingStats.cs
│ ├── Environments
│ ├── BenchmarkEnvironmentInfo.cs
│ ├── EnvironmentResolver.cs
│ ├── GcResolver.cs
│ ├── HostEnvironmentInfo.cs
│ ├── InfrastructureResolver.cs
│ ├── Jit.cs
│ ├── Platform.cs
│ ├── PowerPlan.cs
│ └── Runtimes
│ │ ├── ClrRuntime.cs
│ │ ├── CoreRtRuntime.cs
│ │ ├── CoreRuntime.cs
│ │ ├── CustomRuntime.cs
│ │ ├── MonoAotLLVMRuntime.cs
│ │ ├── MonoRuntime.cs
│ │ ├── NativeAotRuntime.cs
│ │ ├── Runtime.cs
│ │ └── WasmRuntime.cs
│ ├── EventProcessors
│ ├── CompositeEventProcessor.cs
│ └── EventProcessor.cs
│ ├── Exporters
│ ├── AsciiDocExporter.cs
│ ├── BenchmarkReportExporter.cs
│ ├── CompositeExporter.cs
│ ├── Csv
│ │ ├── CsvExporter.cs
│ │ ├── CsvHelper.cs
│ │ ├── CsvMeasurementsExporter.cs
│ │ ├── CsvSeparator.cs
│ │ └── CsvSeparatorExtensions.cs
│ ├── DefaultExporters.cs
│ ├── ExporterBase.cs
│ ├── FullNameProvider.cs
│ ├── HtmlExporter.cs
│ ├── IExporter.cs
│ ├── IExporterDependencies.cs
│ ├── InstructionPointerExporter.cs
│ ├── Json
│ │ ├── JsonExporter.cs
│ │ ├── JsonExporterBase.cs
│ │ └── SimpleJsonSerializer.cs
│ ├── MarkdownExporter.cs
│ ├── PerfonarJsonExporter.cs
│ ├── PerfonarMdExporter.cs
│ ├── PlainExporter.cs
│ ├── RPlotExporter.cs
│ └── Xml
│ │ ├── IXmlSerializer.cs
│ │ ├── SimpleXmlWriter.cs
│ │ ├── SummaryDto.cs
│ │ ├── XmlExporter.cs
│ │ ├── XmlExporterBase.cs
│ │ └── XmlSerializer.cs
│ ├── Extensions
│ ├── AssemblyExtensions.cs
│ ├── CommonExtensions.cs
│ ├── ConfigurationExtensions.cs
│ ├── CultureInfoExtensions.cs
│ ├── DoubleExtensions.cs
│ ├── EncodingExtensions.cs
│ ├── Hashing.cs
│ ├── MathExtensions.cs
│ ├── PathFeatures.cs
│ ├── ProcessExtensions.cs
│ ├── ReflectionExtensions.cs
│ ├── ReportExtensions.cs
│ ├── RuntimeMonikerExtensions.cs
│ ├── StatisticsExtensions.cs
│ ├── StringAndTextExtensions.cs
│ └── ThreadExtensions.cs
│ ├── Filters
│ ├── AllCategoriesFilter.cs
│ ├── AnyCategoriesFilter.cs
│ ├── AttributesFilter.cs
│ ├── DisjunctionFilter.cs
│ ├── GlobFilter.cs
│ ├── IFilter.cs
│ ├── NameFilter.cs
│ ├── SimpleFilter.cs
│ └── UnionFilter.cs
│ ├── Helpers
│ ├── ArtifactFileNameHelper.cs
│ ├── AsciiHelper.cs
│ ├── Assertion.cs
│ ├── AwaitHelper.cs
│ ├── CodeAnnotations.cs
│ ├── ConsoleExitHandler.cs
│ ├── DefaultCultureInfo.cs
│ ├── DirtyAssemblyResolveHelper.cs
│ ├── DisposeAtProcessTermination.cs
│ ├── ExternalToolsHelper.cs
│ ├── FolderNameHelper.cs
│ ├── FrameworkVersionHelper.cs
│ ├── GenericBenchmarksBuilder.cs
│ ├── HashCode.cs
│ ├── LinuxOsReleaseHelper.cs
│ ├── PowerManagementHelper.cs
│ ├── ProcessHelper.cs
│ ├── Reflection.Emit
│ │ ├── EmitParameterInfo.cs
│ │ ├── IlGeneratorCallExtensions.cs
│ │ ├── IlGeneratorDefaultValueExtensions.cs
│ │ ├── IlGeneratorEmitOpExtensions.cs
│ │ ├── IlGeneratorStatementExtensions.cs
│ │ ├── MethodBuilderExtensions.cs
│ │ ├── ModuleBuilderExtensions.cs
│ │ └── TypeBuilderExtensions.cs
│ ├── ResourceHelper.cs
│ ├── SectionsHelper.cs
│ ├── SourceCodeHelper.cs
│ ├── TaskbarProgress.cs
│ ├── UnitHelper.cs
│ ├── UserInteractionHelper.cs
│ └── XUnitHelper.cs
│ ├── Jobs
│ ├── AccuracyMode.cs
│ ├── Argument.cs
│ ├── EnvironmentMode.cs
│ ├── EnvironmentVariable.cs
│ ├── GcMode.cs
│ ├── GcModeExtensions.cs
│ ├── InfrastructureMode.cs
│ ├── Job.cs
│ ├── JobComparer.cs
│ ├── JobExtensions.cs
│ ├── JobIdGenerator.cs
│ ├── JobMode`1.cs
│ ├── MetaMode.cs
│ ├── NugetReference.cs
│ ├── NugetReferenceList.cs
│ └── RunMode.cs
│ ├── Loggers
│ ├── AccumulationLogger.cs
│ ├── AsyncProcessOutputReader.cs
│ ├── Broker.cs
│ ├── CompositeLogger.cs
│ ├── ConsoleLogger.cs
│ ├── ILogger.cs
│ ├── LinqPadLogger.cs
│ ├── LogCapture.cs
│ ├── LogKind.cs
│ ├── LoggerExtensions.cs
│ ├── LoggerWithPrefix.cs
│ ├── NullLogger.cs
│ ├── StreamLogger.cs
│ └── TextLogger.cs
│ ├── Mathematics
│ ├── LegacyConfidenceInterval.cs
│ ├── MathHelper.cs
│ ├── MeasurementsStatistics.cs
│ ├── NumeralSystem.cs
│ ├── NumeralSystemExtensions.cs
│ ├── PercentileValues.cs
│ ├── RankHelper.cs
│ └── Statistics.cs
│ ├── Models
│ ├── BdnBenchmark.cs
│ ├── BdnEnvironment.cs
│ ├── BdnExecution.cs
│ ├── BdnHostInfo.cs
│ ├── BdnLifecycle.cs
│ └── BdnSchema.cs
│ ├── Order
│ ├── CategoryComparer.cs
│ ├── DefaultOrderer.cs
│ ├── IOrderer.cs
│ ├── MethodOrderPolicy.cs
│ └── SummaryOrderPolicy.cs
│ ├── Parameters
│ ├── ParameterComparer.cs
│ ├── ParameterDefinition.cs
│ ├── ParameterDefinitions.cs
│ ├── ParameterInstance.cs
│ ├── ParameterInstances.cs
│ └── SmartParamBuilder.cs
│ ├── Portability
│ ├── Antivirus.cs
│ ├── CodeGen.cs
│ ├── HyperV.cs
│ ├── Libc.cs
│ ├── RuntimeInformation.cs
│ ├── StringExtensions.cs
│ ├── VMware.cs
│ ├── VirtualBox.cs
│ └── VirtualMachineHypervisor.cs
│ ├── Properties
│ ├── AssemblyInfo.cs
│ └── BenchmarkDotNetInfo.cs
│ ├── Reports
│ ├── BaseliningStrategy.cs
│ ├── BenchmarkReport.cs
│ ├── BenchmarkReportExtensions.cs
│ ├── DisplayPrecisionManager.cs
│ ├── Measurement.cs
│ ├── MeasurementExtensions.cs
│ ├── Metric.cs
│ ├── Summary.cs
│ ├── SummaryExtensions.cs
│ ├── SummaryStyle.cs
│ ├── SummaryTable.cs
│ └── SummaryTableExtensions.cs
│ ├── Running
│ ├── BenchmarkBuildInfo.cs
│ ├── BenchmarkCase.cs
│ ├── BenchmarkConverter.cs
│ ├── BenchmarkId.cs
│ ├── BenchmarkPartitioner.cs
│ ├── BenchmarkRunInfo.cs
│ ├── BenchmarkRunnerClean.cs
│ ├── BenchmarkRunnerDirty.cs
│ ├── BenchmarkSwitcher.cs
│ ├── BuildPartition.cs
│ ├── ClassicBenchmarkConverter.cs
│ ├── ConsoleTitler.cs
│ ├── DefaultCategoryDiscoverer.cs
│ ├── Descriptor.cs
│ ├── DescriptorComparer.cs
│ ├── ICategoryDiscoverer.cs
│ ├── IUserInteraction.cs
│ ├── InvalidBenchmarkDeclarationException.cs
│ ├── PowerManagementApplier.cs
│ ├── TypeFilter.cs
│ ├── UserInteraction.cs
│ ├── WakeLock.PInvoke.cs
│ ├── WakeLock.SafePowerHandle.cs
│ └── WakeLock.cs
│ ├── Templates
│ ├── BenchmarkProgram.txt
│ ├── BenchmarkType.txt
│ ├── BuildPlots.R
│ ├── CsProj.txt
│ ├── MonoAOTLLVMCsProj.txt
│ ├── WasmCsProj.txt
│ ├── WasmLinkerDescription.xml
│ ├── highlightingLabelsScript.js
│ └── perfcollect
│ ├── Toolchains
│ ├── AppConfigGenerator.cs
│ ├── ArtifactsPaths.cs
│ ├── CoreRt
│ │ ├── CoreRtToolchain.cs
│ │ └── CoreRtToolchainBuilder.cs
│ ├── CoreRun
│ │ ├── CoreRunGenerator.cs
│ │ ├── CoreRunPublisher.cs
│ │ └── CoreRunToolchain.cs
│ ├── CsProj
│ │ ├── CsProjClassicNetToolchain.cs
│ │ ├── CsProjCoreToolchain.cs
│ │ └── CsProjGenerator.cs
│ ├── DotNetCli
│ │ ├── CustomDotNetCliToolchainBuilder.cs
│ │ ├── DotNetCliBuilder.cs
│ │ ├── DotNetCliCommand.cs
│ │ ├── DotNetCliCommandExecutor.cs
│ │ ├── DotNetCliCommandResult.cs
│ │ ├── DotNetCliExecutor.cs
│ │ ├── DotNetCliGenerator.cs
│ │ ├── DotNetCliPublisher.cs
│ │ ├── MsBuildErrorMapper.cs
│ │ └── NetCoreAppSettings.cs
│ ├── Executor.cs
│ ├── GeneratorBase.cs
│ ├── IBuilder.cs
│ ├── IExecutor.cs
│ ├── IGenerator.cs
│ ├── IToolchain.cs
│ ├── InProcess
│ │ ├── Emit
│ │ │ ├── Implementation
│ │ │ │ ├── ConsumableTypeInfo.cs
│ │ │ │ ├── Emitters
│ │ │ │ │ ├── ByRefConsumeEmitter.cs
│ │ │ │ │ ├── ConsumableConsumeEmitter.cs
│ │ │ │ │ ├── ConsumeEmitter.cs
│ │ │ │ │ ├── EmitExtensions.cs
│ │ │ │ │ ├── NonConsumableConsumeEmitter.cs
│ │ │ │ │ ├── RunnableEmitter.cs
│ │ │ │ │ └── VoidConsumeEmitter.cs
│ │ │ │ ├── Runnable
│ │ │ │ │ ├── RunnableConstants.cs
│ │ │ │ │ ├── RunnableProgram.cs
│ │ │ │ │ ├── RunnableReflectionHelpers.cs
│ │ │ │ │ └── RunnableReuse.cs
│ │ │ │ └── RunnableActionKind.cs
│ │ │ ├── InProcessEmitArtifactsPath.cs
│ │ │ ├── InProcessEmitBuilder.cs
│ │ │ ├── InProcessEmitExecutor.cs
│ │ │ ├── InProcessEmitGenerator.cs
│ │ │ └── InProcessEmitToolchain.cs
│ │ ├── InProcessHost.cs
│ │ ├── InProcessValidator.cs
│ │ └── NoEmit
│ │ │ ├── BenchmarkAction.cs
│ │ │ ├── BenchmarkActionFactory.cs
│ │ │ ├── BenchmarkActionFactory_Base.cs
│ │ │ ├── BenchmarkActionFactory_Dummy.cs
│ │ │ ├── BenchmarkActionFactory_Implementations.cs
│ │ │ ├── InProcessNoEmitBuilder.cs
│ │ │ ├── InProcessNoEmitExecutor.cs
│ │ │ ├── InProcessNoEmitGenerator.cs
│ │ │ ├── InProcessNoEmitRunner.cs
│ │ │ └── InProcessNoEmitToolchain.cs
│ ├── LargeAddressAware.cs
│ ├── Mono
│ │ ├── MonoAotBuilder.cs
│ │ ├── MonoAotToolchain.cs
│ │ ├── MonoGenerator.cs
│ │ ├── MonoPublisher.cs
│ │ └── MonoToolchain.cs
│ ├── MonoAotLLVM
│ │ ├── MonoAotCompilerMode.cs
│ │ ├── MonoAotLLVMGenerator.cs
│ │ └── MonoAotLLVMToolChain.cs
│ ├── MonoWasm
│ │ ├── WasmExecutor.cs
│ │ ├── WasmGenerator.cs
│ │ └── WasmToolchain.cs
│ ├── NativeAot
│ │ ├── Generator.cs
│ │ ├── NativeAotToolchain.cs
│ │ └── NativeAotToolchainBuilder.cs
│ ├── Parameters
│ │ └── ExecuteParameters.cs
│ ├── Results
│ │ ├── BuildResult.cs
│ │ ├── ExecuteResult.cs
│ │ └── GenerateResult.cs
│ ├── Roslyn
│ │ ├── Builder.cs
│ │ ├── Generator.cs
│ │ ├── RoslynToolchain.cs
│ │ └── RoslynWorkarounds.cs
│ ├── Toolchain.cs
│ └── ToolchainExtensions.cs
│ └── Validators
│ ├── BaselineValidator.cs
│ ├── CompilationValidator.cs
│ ├── CompositeValidator.cs
│ ├── ConfigValidator.cs
│ ├── DeferredExecutionValidator.cs
│ ├── DiagnosersValidator.cs
│ ├── DotNetSdkValidator.cs
│ ├── ExecutionValidator.cs
│ ├── ExecutionValidatorBase.cs
│ ├── GenericBenchmarksValidator.cs
│ ├── IValidator.cs
│ ├── JitOptimizationsValidator.cs
│ ├── ParamsAllValuesValidator.cs
│ ├── ParamsValidator.cs
│ ├── ReturnValueValidator.cs
│ ├── RunModeValidator.cs
│ ├── SetupCleanupValidator.cs
│ ├── ShadowCopyValidator.cs
│ ├── ValidationError.cs
│ ├── ValidationErrorReporter.cs
│ └── ValidationParameters.cs
├── templates
├── BenchmarkDotNet.Templates.csproj
├── install-from-source.bat
├── install-from-source.sh
└── templates
│ ├── BenchmarkDotNet.BenchmarkProjectTemplate.CSharp
│ ├── .template.config
│ │ ├── dotnetcli.host.json
│ │ └── template.json
│ ├── BenchmarkConfig.cs
│ ├── Program.cs
│ ├── _BenchmarkName_.cs
│ └── _BenchmarkProjectName_.csproj
│ ├── BenchmarkDotNet.BenchmarkProjectTemplate.FSharp
│ ├── .template.config
│ │ ├── dotnetcli.host.json
│ │ └── template.json
│ ├── BenchmarkConfig.fs
│ ├── Program.fs
│ ├── _BenchmarkName_.fs
│ └── _BenchmarkProjectName_.fsproj
│ └── BenchmarkDotNet.BenchmarkProjectTemplate.VB
│ ├── .template.config
│ ├── dotnetcli.host.json
│ └── template.json
│ ├── BenchmarkConfig.vb
│ ├── Program.vb
│ ├── _BenchmarkName_.vb
│ └── _BenchmarkProjectName_.vbproj
└── tests
├── BenchmarkDotNet.Exporters.Plotting.Tests
├── BenchmarkDotNet.Exporters.Plotting.Tests.csproj
└── ScottPlotExporterTests.cs
├── BenchmarkDotNet.IntegrationTests.ConfigPerAssembly
├── AssemblyConfigAttribute.cs
├── AssemblyConfigBenchmarks.cs
├── BenchmarkDotNet.IntegrationTests.ConfigPerAssembly.csproj
└── Properties
│ └── AssemblyInfo.cs
├── BenchmarkDotNet.IntegrationTests.CustomPaths
├── BenchmarkDotNet.IntegrationTests.CustomPaths.csproj
├── BenchmarksThatReturnTypeFromCustomPathDll.cs
├── BenchmarksThatUseTypeFromCustomPathDll.cs
├── BenchmarksThatUsesFileFromOutput.cs
├── Properties
│ └── AssemblyInfo.cs
├── ShouldGetCopied.xml
└── customPath
│ └── VerySimple.dll
├── BenchmarkDotNet.IntegrationTests.DisabledOptimizations
├── BenchmarkDotNet.IntegrationTests.DisabledOptimizations.csproj
├── OptimizationsDisabledInCsproj.cs
└── Properties
│ └── AssemblyInfo.cs
├── BenchmarkDotNet.IntegrationTests.EnabledOptimizations
├── BenchmarkDotNet.IntegrationTests.EnabledOptimizations.csproj
├── OptimizationsEnabledInCsproj.cs
└── Properties
│ └── AssemblyInfo.cs
├── BenchmarkDotNet.IntegrationTests.FSharp
├── BenchmarkDotNet.IntegrationTests.FSharp.fsproj
└── Program.fs
├── BenchmarkDotNet.IntegrationTests.ManualRunning.MultipleFrameworks
├── BenchmarkDotNet.IntegrationTests.ManualRunning.MultipleFrameworks.csproj
└── MultipleFrameworksTest.cs
├── BenchmarkDotNet.IntegrationTests.ManualRunning
├── BenchmarkDotNet.IntegrationTests.ManualRunning.csproj
├── ExpectedBenchmarkResultsTests.cs
├── LocalNativeAotToolchainTests.cs
├── MsBuildArgumentTests.cs
└── xunit.runner.json
├── BenchmarkDotNet.IntegrationTests.Static
├── BenchmarkClassWithStaticMethod.cs
└── BenchmarkDotNet.IntegrationTests.Static.csproj
├── BenchmarkDotNet.IntegrationTests.VisualBasic
├── BenchmarkDotNet.IntegrationTests.VisualBasic.vbproj
└── Sample.vb
├── BenchmarkDotNet.IntegrationTests
├── AllSetupAndCleanupTest.cs
├── App.config
├── AppBundle
│ └── test-main.js
├── AppConfigTests.cs
├── ArgumentsTests.cs
├── AssemblyConfigTests.cs
├── AsyncBenchmarksTests.cs
├── AttributesTests.cs
├── BaselineRatioColumnTest.cs
├── BenchmarkDotNet.IntegrationTests.csproj
├── BenchmarkSwitcherTest.cs
├── BenchmarkTestExecutor.cs
├── BuildTimeoutTests.cs
├── ContinuousIntegration.cs
├── CopyToOutputTests.cs
├── CustomBuildConfigurationTests.cs
├── CustomEngineTests.cs
├── Diagnosers
│ └── ProcessMetricsTests.cs
├── DisassemblyDiagnoserTests.cs
├── DotMemoryTests.cs
├── DotTraceTests.cs
├── DryRunTests.cs
├── EngineTests.cs
├── EnvironmentVariablesTests.cs
├── EventProcessorTests.cs
├── ExceptionDiagnoserTests.cs
├── ExceptionHandlingTests.cs
├── ExporterIOTests.cs
├── ExtraAttributesForEntryMethodTests.cs
├── FSharpTests.cs
├── FailingProcessSpawnTests.cs
├── GcModeTests.cs
├── GlobalSetupAttributeInvalidMethodTest.cs
├── InProcess.EmitTests.T4
│ ├── RunnableClassCaseBenchmark.cs
│ ├── RunnableClassCaseBenchmark.tt
│ ├── RunnableManyArgsCaseBenchmark.cs
│ ├── RunnableManyArgsCaseBenchmark.tt
│ ├── RunnableRefStructCaseBenchmark.cs
│ ├── RunnableRefStructCaseBenchmark.tt
│ ├── RunnableStructCaseBenchmark.cs
│ ├── RunnableStructCaseBenchmark.tt
│ ├── RunnableTaskCaseBenchmark.cs
│ ├── RunnableTaskCaseBenchmark.tt
│ ├── RunnableVoidCaseBenchmark.cs
│ └── RunnableVoidCaseBenchmark.tt
├── InProcess.EmitTests
│ ├── NaiveRunnableEmitDiff.cs
│ ├── RunnableTestCasesHelperTypes.cs
│ ├── Runnable_0.cs
│ └── SampleBenchmark.cs
├── InProcessEmitTest.cs
├── InProcessTest.cs
├── IntegrationTestSetupTests.cs
├── JitOptimizationsTests.cs
├── JitRuntimeValidationTest.cs
├── LanguageVersionTests.cs
├── LargeAddressAwareTest.cs
├── MemoryDiagnoserTests.cs
├── MonoTests.cs
├── MultipleRuntimesTest.cs
├── NativeAotTests.cs
├── NugetReferenceTests.cs
├── ParamSourceTests.cs
├── ParamsTests.cs
├── PathTooLongTests.cs
├── PowerManagementApplierTests.cs
├── PowerRequest.cs
├── PowerRequestsParser.cs
├── PriorityTests.cs
├── ProcessPropertiesTests.cs
├── ProcessorArchitectureTest.cs
├── Properties
│ └── AssemblyInfo.cs
├── ReferencesTests.cs
├── RoslynToolchainTest.cs
├── RunStrategyTests.cs
├── SetupAndCleanupTests.cs
├── StandardErrorTests.cs
├── StatResultExtenderTests.cs
├── TailCallDiagnoserTests.cs
├── TestConfigs.cs
├── TestCultureInfo.cs
├── ThreadingDiagnoserTests.cs
├── ToolchainTest.cs
├── ValidatorsTest.cs
├── ValuesReturnedByBenchmarkTest.cs
├── WakeLockTests.cs
├── WasmTests.cs
├── Xunit
│ ├── Constants.cs
│ ├── Extensions.cs
│ └── MisconfiguredEnvironmentException.cs
├── runtimeconfig.template.json
└── xunit.runner.json
├── BenchmarkDotNet.Tests
├── Analysers
│ ├── OutliersAnalyserTests.cs
│ └── ZeroMeasurementHelperTests.cs
├── AppConfigGeneratorTests.cs
├── ArtifactFileNameHelperTests.cs
├── Attributes
│ ├── MutatorAttributesTests.cs
│ ├── ParamsAllValuesVerifyTests.cs
│ └── VerifiedFiles
│ │ ├── ParamsAllValuesVerifyTests.BenchmarkShouldProduceSummary_WithAllValuesOfBool.verified.txt
│ │ ├── ParamsAllValuesVerifyTests.BenchmarkShouldProduceSummary_WithAllValuesOfEnum.verified.txt
│ │ ├── ParamsAllValuesVerifyTests.BenchmarkShouldProduceSummary_WithAllValuesOfNullableBool.verified.txt
│ │ ├── ParamsAllValuesVerifyTests.BenchmarkShouldProduceSummary_WithAllValuesOfNullableEnum.verified.txt
│ │ ├── ParamsAllValuesVerifyTests.BenchmarkShouldProduceSummary_WithNotAllowedFlagsEnumError.verified.txt
│ │ ├── ParamsAllValuesVerifyTests.BenchmarkShouldProduceSummary_WithNotAllowedNullableTypeError.verified.txt
│ │ └── ParamsAllValuesVerifyTests.BenchmarkShouldProduceSummary_WithNotAllowedTypeError.verified.txt
├── BenchmarkDotNet.Tests.csproj
├── BenchmarkDotNetInfoTests.cs
├── BuildResultTests.cs
├── Builders
│ └── HostEnvironmentInfoBuilder.cs
├── CharacteristicPresenterTests.cs
├── CodeGeneratorTests.cs
├── Columns
│ ├── MetricColumnTests.cs
│ ├── RatioColumnTest.cs
│ ├── StatisticalTestColumnTests.cs
│ └── TagColumnTests.cs
├── Common
│ └── AbsoluteEqualityComparer.cs
├── ConfigParserTests.cs
├── Configs
│ ├── CategoriesTests.cs
│ ├── ConfigOptionsTests.cs
│ ├── ConfigPerMethodTests.cs
│ ├── EnvironmentVariableTests.cs
│ ├── ImmutableConfigTests.cs
│ └── JobTests.cs
├── CorrectionsSuggesterTests.cs
├── CsProjGeneratorTests.cs
├── CsvHelperTests.cs
├── Detectors
│ └── Cpu
│ │ ├── CpuInfoFormatterTests.cs
│ │ ├── LinuxCpuInfoParserTests.cs
│ │ ├── SysctlCpuInfoParserTests.cs
│ │ ├── TestFiles
│ │ ├── ProcCpuInfoProcessorWithDifferentCoresCount.txt
│ │ ├── ProcCpuInfoRealOneProcessorFourCores.txt
│ │ ├── ProcCpuInfoRealOneProcessorTwoCores.txt
│ │ ├── SysctlRealOneProcessorFourCores.txt
│ │ └── ryzen9-cpuinfo.txt
│ │ ├── TestHelper.cs
│ │ ├── VerifiedFiles
│ │ └── CpuInfoFormatterTests.FormatTest.verified.txt
│ │ └── WmicCpuInfoParserTests.cs
├── Engine
│ ├── EngineActualStageTests.cs
│ ├── EngineFactoryTests.cs
│ ├── EnginePilotStageTests.cs
│ ├── EngineResultStageTests.cs
│ └── EngineWarmupStageTests.cs
├── Environments
│ └── HostEnvironmentInfoTests.cs
├── EventPipeProfilerTests.cs
├── Exporters
│ ├── CommonExporterVerifyTests.cs
│ ├── MarkdownExporterVerifyTests.cs
│ ├── VerifiedFiles
│ │ ├── CommonExporterVerifyTests.Exporters_Invariant.verified.txt
│ │ ├── CommonExporterVerifyTests.Exporters_en-US.verified.txt
│ │ ├── CommonExporterVerifyTests.Exporters_ru-RU.verified.txt
│ │ ├── MarkdownExporterVerifyTests.GroupExporterTest_Escape_ParamsAndArguments.verified.txt
│ │ ├── MarkdownExporterVerifyTests.GroupExporterTest_HideColumns_TableMarkDown.verified.txt
│ │ ├── MarkdownExporterVerifyTests.GroupExporterTest_Invalid_TwoJobBaselines.verified.txt
│ │ ├── MarkdownExporterVerifyTests.GroupExporterTest_Invalid_TwoMethodBaselines.verified.txt
│ │ ├── MarkdownExporterVerifyTests.GroupExporterTest_JobBaseline_MethodsJobs.verified.txt
│ │ ├── MarkdownExporterVerifyTests.GroupExporterTest_JobBaseline_MethodsParamsJobs.verified.txt
│ │ ├── MarkdownExporterVerifyTests.GroupExporterTest_MethodBaseline_Methods.verified.txt
│ │ ├── MarkdownExporterVerifyTests.GroupExporterTest_MethodBaseline_MethodsJobs.verified.txt
│ │ ├── MarkdownExporterVerifyTests.GroupExporterTest_MethodBaseline_MethodsParams.verified.txt
│ │ ├── MarkdownExporterVerifyTests.GroupExporterTest_MethodBaseline_MethodsParamsJobs.verified.txt
│ │ ├── MarkdownExporterVerifyTests.GroupExporterTest_MethodJobBaseline_MethodsJobs.verified.txt
│ │ ├── MarkdownExporterVerifyTests.GroupExporterTest_MethodJobBaseline_MethodsJobsParams.verified.txt
│ │ ├── MarkdownExporterVerifyTests.GroupExporterTest_NoBaseline_MethodsParamsJobs.verified.txt
│ │ ├── MarkdownExporterVerifyTests.GroupExporterTest_NoBaseline_MethodsParamsJobs_GroupByAll.verified.txt
│ │ ├── MarkdownExporterVerifyTests.GroupExporterTest_NoBaseline_MethodsParamsJobs_GroupByCategory.verified.txt
│ │ ├── MarkdownExporterVerifyTests.GroupExporterTest_NoBaseline_MethodsParamsJobs_GroupByJob.verified.txt
│ │ ├── MarkdownExporterVerifyTests.GroupExporterTest_NoBaseline_MethodsParamsJobs_GroupByMethod.verified.txt
│ │ └── MarkdownExporterVerifyTests.GroupExporterTest_NoBaseline_MethodsParamsJobs_GroupByParams.verified.txt
│ └── XmlSerializerTests.cs
├── FolderNameTests.cs
├── FrameworkVersionHelperTests.cs
├── FullNameProviderTests.cs
├── GenericBuilderTests.cs
├── GlobFilterTests.cs
├── Helpers
│ └── LinuxOsReleaseHelperTests.cs
├── Infra
│ └── VerifyHelper.cs
├── KnownIssue.cs
├── LevenshteinDistanceCalculatorTests.cs
├── LightJsonSerializerTests.cs
├── Loggers
│ ├── LoggerWithPrefixTests.cs
│ └── OutputLogger.cs
├── Mathematics
│ ├── NumeralSystemTests.cs
│ ├── RankTests.cs
│ └── StatisticsTests.cs
├── Mocks
│ ├── MockClock.cs
│ ├── MockEngine.cs
│ ├── MockFactory.cs
│ ├── MockRunner.cs
│ └── Toolchain
│ │ └── MockToolchain.cs
├── MonoDisassemblyOutputParserTests.cs
├── Order
│ └── DefaultOrdererTests.cs
├── ParameterComparerTests.cs
├── ParameterInstanceTests.cs
├── ParamsSourceTests.cs
├── Perfonar
│ ├── Infra
│ │ ├── PerfonarMock.cs
│ │ └── PerfonarTestExtensions.cs
│ ├── PerfonarTests.cs
│ └── VerifiedFiles
│ │ ├── Perfonar.PerfonarIndexTest_key=default01.verified.txt
│ │ ├── Perfonar.PerfonarIndexTest_key=default02.verified.txt
│ │ ├── Perfonar.PerfonarIndexTest_key=default03.verified.txt
│ │ ├── Perfonar.PerfonarIndexTest_key=default04.verified.txt
│ │ ├── Perfonar.PerfonarIndexTest_key=default05.verified.txt
│ │ ├── Perfonar.PerfonarIndexTest_key=params01.verified.txt
│ │ ├── Perfonar.PerfonarIndexTest_key=sort01.verified.txt
│ │ ├── Perfonar.PerfonarTableTest_key=default01.verified.txt
│ │ ├── Perfonar.PerfonarTableTest_key=default02.verified.txt
│ │ ├── Perfonar.PerfonarTableTest_key=default03.verified.txt
│ │ ├── Perfonar.PerfonarTableTest_key=default04.verified.txt
│ │ ├── Perfonar.PerfonarTableTest_key=default05.verified.txt
│ │ ├── Perfonar.PerfonarTableTest_key=params01.verified.txt
│ │ └── Perfonar.PerfonarTableTest_key=sort01.verified.txt
├── Portability
│ ├── HyperVTests.cs
│ ├── VMWareTests.cs
│ └── VirtualBoxTests.cs
├── Properties
│ ├── AssemblyInfo.cs
│ └── BenchmarkDotNetInfoTests.cs
├── ReflectionTests.cs
├── Reports
│ ├── ColumnTests.cs
│ ├── DefaultColumnProvidersTests.cs
│ ├── DisplayPrecisionManagerTests.cs
│ ├── FakeMetricDescriptor.cs
│ ├── RatioPrecisionTests.cs
│ ├── RatioStyleTests.cs
│ ├── SummaryTableTests.cs
│ └── SummaryTests.cs
├── Running
│ ├── BenchmarkConverterTests.BAC_Partial_DifferentFiles.cs
│ ├── BenchmarkConverterTests.cs
│ ├── JobRuntimePropertiesComparerTests.cs
│ └── RunningEmptyBenchmarkTests.cs
├── RuntimeVersionDetectionTests.cs
├── SimpleJsonTests.cs
├── SourceCodeHelperTests.cs
├── StringExtensionsTests.cs
├── SummaryStyleTests.cs
├── TargetFrameworkVersionParsingTestscs.cs
├── TestCultureInfo.cs
├── TheoryDataHelper.cs
├── TypeFilterTests.cs
├── Validators
│ ├── CompilationValidatorTests.cs
│ ├── DeferredExecutionValidatorTests.cs
│ ├── ExecutionValidatorTests.cs
│ ├── ParamsValidatorTests.cs
│ ├── ReturnValueValidatorTests.cs
│ └── SetupCleanupValidatorTests.cs
├── XUnit
│ ├── EnvRequirement.cs
│ ├── EnvRequirementChecker.cs
│ ├── EnvRequirementCheckerTests.cs
│ ├── FactEnvSpecific.cs
│ ├── SmartAssert.cs
│ └── TheoryEnvSpecific.cs
├── dotMemory
│ └── DotMemoryTests.cs
├── dotTrace
│ └── DotTraceTests.cs
└── xunit.runner.json
├── runClassicTests.cmd
├── runCoreTests.cmd
└── runCoreTests.sh
/.github/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Code of Conduct
2 |
3 | This project has adopted the code of conduct defined by the [Contributor Covenant](http://contributor-covenant.org/)
4 | to clarify expected behavior in our community.
5 | For more information see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct).
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | github: AndreyAkinshin
2 |
--------------------------------------------------------------------------------
/build.cmd:
--------------------------------------------------------------------------------
1 | :<<"::CMDLITERAL"
2 | @CALL build\build.bat %*
3 | @GOTO :EOF
4 | ::CMDLITERAL
5 | "$(cd "$(dirname "$0")"; pwd)/build/build.sh" "$@"
--------------------------------------------------------------------------------
/build/BenchmarkDotNet.Build/BenchmarkDotNet.Build.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | Exe
4 | net8.0
5 | $(MSBuildProjectDirectory)
6 | enable
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/build/BenchmarkDotNet.Build/HelpInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using BenchmarkDotNet.Build.Options;
3 |
4 | namespace BenchmarkDotNet.Build;
5 |
6 | public class HelpInfo
7 | {
8 | public string Description { get; init; } = "";
9 | public IOption[] Options { get; init; } = Array.Empty();
10 | public EnvVar[] EnvironmentVariables { get; init; } = Array.Empty();
11 | public Example[] Examples { get; init; } = Array.Empty();
12 | }
--------------------------------------------------------------------------------
/build/BenchmarkDotNet.Build/IHelpProvider.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Build;
2 |
3 | public interface IHelpProvider
4 | {
5 | HelpInfo GetHelp();
6 | }
--------------------------------------------------------------------------------
/build/BenchmarkDotNet.Build/Options/IOption.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Build.Options;
2 |
3 | public interface IOption
4 | {
5 | string CommandLineName { get; }
6 | string Description { get; }
7 | string[] Aliases { get; }
8 | }
--------------------------------------------------------------------------------
/build/build.bat:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | PowerShell -NoProfile -NoLogo -ExecutionPolicy unrestricted -Command "[System.Threading.Thread]::CurrentThread.CurrentCulture = ''; [System.Threading.Thread]::CurrentThread.CurrentUICulture = '';& '%~dp0build.ps1' %*; exit $LASTEXITCODE"
--------------------------------------------------------------------------------
/build/package-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/build/package-icon.png
--------------------------------------------------------------------------------
/build/sdk/global.json:
--------------------------------------------------------------------------------
1 | {
2 | "sdk": {
3 | "version": "8.0.401",
4 | "rollForward": "disable"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/build/strongNameKey.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/build/strongNameKey.snk
--------------------------------------------------------------------------------
/docs/.gitignore:
--------------------------------------------------------------------------------
1 | ###############
2 | # folder #
3 | ###############
4 | /**/DROP/
5 | /**/TEMP/
6 | /**/packages/
7 | /**/bin/
8 | /**/obj/
9 | _site
10 | _exported_templates
11 | docfx-bin
12 | api/*
13 | !api/index.md
14 | /index.md
15 | _changelog
16 | changelog
17 |
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.10.0.md:
--------------------------------------------------------------------------------
1 | _Date: November 10, 2016_
2 |
3 | _Milestone: [v0.10.0](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.10.0)_
4 |
5 | _NuGet Packages:_
6 | * https://www.nuget.org/packages/BenchmarkDotNet/0.10.0
7 | * https://www.nuget.org/packages/BenchmarkDotNet.Core/0.10.0
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Toolchains.Roslyn/0.10.0
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.10.0
10 |
11 | _Online Documentation:_ https://dotnet.github.io/BenchmarkDotNet/
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.10.1.md:
--------------------------------------------------------------------------------
1 | _Date: December 04, 2016_
2 |
3 | _Milestone: [v0.10.1](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.10.1)_
4 |
5 | _NuGet Packages:_
6 | * https://www.nuget.org/packages/BenchmarkDotNet/0.10.1
7 | * https://www.nuget.org/packages/BenchmarkDotNet.Core/0.10.1
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Toolchains.Roslyn/0.10.1
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.10.1
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.10.10.md:
--------------------------------------------------------------------------------
1 | _Date: November 03, 2017_
2 |
3 | _Milestone: [v0.10.10](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.10.10)_
4 | ([List of commits](https://github.com/dotnet/BenchmarkDotNet/compare/v0.10.9...v0.10.10))
5 |
6 | _NuGet Packages:_
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.10.10
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Core/0.10.10
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Toolchains.Roslyn/0.10.10
10 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.10.10
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.10.11.md:
--------------------------------------------------------------------------------
1 | _Date: December 01, 2017_
2 |
3 | _Milestone: [v0.10.11](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.10.11)_
4 | ([List of commits](https://github.com/dotnet/BenchmarkDotNet/compare/v0.10.10...v0.10.11))
5 |
6 | _NuGet Packages:_
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.10.11
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Core/0.10.11
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Toolchains.Roslyn/0.10.11
10 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.10.11
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.10.12.md:
--------------------------------------------------------------------------------
1 | _Date: January 15, 2018_
2 |
3 | _Milestone: [v0.10.12](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.10.12)_
4 | ([List of commits](https://github.com/dotnet/BenchmarkDotNet/compare/v0.10.11...v0.10.12))
5 |
6 | _NuGet Packages:_
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.10.12
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Core/0.10.12
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Toolchains.Roslyn/0.10.12
10 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.10.12
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.10.13.md:
--------------------------------------------------------------------------------
1 | _Date: March 02, 2018_
2 |
3 | _Milestone: [v0.10.13](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.10.13)_
4 | ([List of commits](https://github.com/dotnet/BenchmarkDotNet/compare/v0.10.12...v0.10.13))
5 |
6 | _NuGet Packages:_
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.10.13
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Core/0.10.13
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Toolchains.Roslyn/0.10.13
10 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.10.13
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.10.14.md:
--------------------------------------------------------------------------------
1 | _Date: April 09, 2018_
2 |
3 | _Milestone: [v0.10.14](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.10.14)_
4 | ([List of commits](https://github.com/dotnet/BenchmarkDotNet/compare/v0.10.13...v0.10.14))
5 |
6 | _NuGet Packages:_
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.10.14
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Core/0.10.14
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Toolchains.Roslyn/0.10.14
10 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.10.14
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.10.2.md:
--------------------------------------------------------------------------------
1 | _Date: January 21, 2017_
2 |
3 | _Milestone: [v0.10.2](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.10.2)_
4 |
5 | _NuGet Packages:_
6 | * https://www.nuget.org/packages/BenchmarkDotNet/0.10.2
7 | * https://www.nuget.org/packages/BenchmarkDotNet.Core/0.10.2
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Toolchains.Roslyn/0.10.2
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.10.2
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.10.3.md:
--------------------------------------------------------------------------------
1 | _Date: March 01, 2017_
2 |
3 | _Milestone: [v0.10.3](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.10.3)_
4 |
5 | _NuGet Packages:_
6 | * https://www.nuget.org/packages/BenchmarkDotNet/0.10.3
7 | * https://www.nuget.org/packages/BenchmarkDotNet.Core/0.10.3
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Toolchains.Roslyn/0.10.3
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.10.3
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.10.4.md:
--------------------------------------------------------------------------------
1 | _Date: April 21, 2017_
2 |
3 | _Milestone: [v0.10.4](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.10.4)_
4 |
5 | _NuGet Packages:_
6 | * https://www.nuget.org/packages/BenchmarkDotNet/0.10.4
7 | * https://www.nuget.org/packages/BenchmarkDotNet.Core/0.10.4
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Toolchains.Roslyn/0.10.4
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.10.4
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.10.5.md:
--------------------------------------------------------------------------------
1 | _Date: April 26, 2017_
2 |
3 | _Milestone: [v0.10.5](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.10.5)_
4 |
5 | _NuGet Packages:_
6 | * https://www.nuget.org/packages/BenchmarkDotNet/0.10.5
7 | * https://www.nuget.org/packages/BenchmarkDotNet.Core/0.10.5
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Toolchains.Roslyn/0.10.5
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.10.5
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.10.6.md:
--------------------------------------------------------------------------------
1 | _Date: May 12, 2017_
2 |
3 | _Milestone: [v0.10.6](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.10.6)_
4 |
5 | _NuGet Packages:_
6 | * https://www.nuget.org/packages/BenchmarkDotNet/0.10.6
7 | * https://www.nuget.org/packages/BenchmarkDotNet.Core/0.10.6
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Toolchains.Roslyn/0.10.6
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.10.6
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.10.7.md:
--------------------------------------------------------------------------------
1 | _Date: June 05, 2017_
2 |
3 | _Milestone: [v0.10.7](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.10.7)_
4 |
5 | _Overview post: https://aakinshin.net/posts/bdn-v0_10_7/_
6 |
7 | _NuGet Packages:_
8 | * https://www.nuget.org/packages/BenchmarkDotNet/0.10.7
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Core/0.10.7
10 | * https://www.nuget.org/packages/BenchmarkDotNet.Toolchains.Roslyn/0.10.7
11 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.10.7
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.10.8.md:
--------------------------------------------------------------------------------
1 | _Date: June 09, 2017_
2 |
3 | _Milestone: [v0.10.8](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.10.8)_
4 |
5 | _NuGet Packages:_
6 | * https://www.nuget.org/packages/BenchmarkDotNet/0.10.8
7 | * https://www.nuget.org/packages/BenchmarkDotNet.Core/0.10.8
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Toolchains.Roslyn/0.10.8
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.10.8
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.10.9.md:
--------------------------------------------------------------------------------
1 | _Date: July 28, 2017_
2 |
3 | _Milestone: [v0.10.9](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.10.9)_
4 |
5 | _NuGet Packages:_
6 | * https://www.nuget.org/packages/BenchmarkDotNet/0.10.9
7 | * https://www.nuget.org/packages/BenchmarkDotNet.Core/0.10.9
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Toolchains.Roslyn/0.10.9
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.10.9
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.11.0.md:
--------------------------------------------------------------------------------
1 | _Date: July 23, 2018_
2 |
3 | _Milestone: [v0.11.0](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.11.0)_
4 | ([List of commits](https://github.com/dotnet/BenchmarkDotNet/compare/v0.10.14...v0.11.0))
5 |
6 | _NuGet Packages:_
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.11.0
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.11.0
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.11.1.md:
--------------------------------------------------------------------------------
1 | _Date: August 22, 2018_
2 |
3 | _Milestone: [v0.11.1](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.11.1)_
4 | ([List of commits](https://github.com/dotnet/BenchmarkDotNet/compare/v0.11.0...v0.11.1))
5 |
6 | _NuGet Packages:_
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.11.1
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.11.1
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.11.2.md:
--------------------------------------------------------------------------------
1 | _Date: November 1, 2018_
2 |
3 | _Milestone: [v0.11.2](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.11.2)_
4 | ([List of commits](https://github.com/dotnet/BenchmarkDotNet/compare/v0.11.1...v0.11.2))
5 |
6 | _NuGet Packages:_
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.11.2
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.11.2
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.11.3.md:
--------------------------------------------------------------------------------
1 | _Date: November 20, 2018_
2 |
3 | _Milestone: [v0.11.3](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.11.3)_
4 | ([List of commits](https://github.com/dotnet/BenchmarkDotNet/compare/v0.11.2...v0.11.3))
5 |
6 | _NuGet Packages:_
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.11.3
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.11.3
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.11.4.md:
--------------------------------------------------------------------------------
1 | _Date: February 15, 2019_
2 |
3 | _Milestone: [v0.11.4](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.11.4)_
4 | ([List of commits](https://github.com/dotnet/BenchmarkDotNet/compare/v0.11.3...v0.11.4))
5 |
6 | _NuGet Packages:_
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.11.4
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.11.4
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Tool/0.11.4
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.11.5.md:
--------------------------------------------------------------------------------
1 | _Date: April 2, 2019_
2 |
3 | _Milestone: [v0.11.5](https://github.com/dotnet/BenchmarkDotNet/issues?q=milestone%3Av0.11.5)_
4 | ([List of commits](https://github.com/dotnet/BenchmarkDotNet/compare/v0.11.4...v0.11.5))
5 |
6 | _NuGet Packages:_
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.11.5
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.11.5
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Tool/0.11.5
10 | * https://www.nuget.org/packages/BenchmarkDotNet.Annotations/0.11.5
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.12.0.md:
--------------------------------------------------------------------------------
1 | _Date: October 24, 2019_
2 |
3 | _Milestone: [v0.12.0](https://github.com/dotnet/BenchmarkDotNet/issues?q=milestone%3Av0.12.0)_
4 | ([List of commits](https://github.com/dotnet/BenchmarkDotNet/compare/v0.11.5...v0.12.0))
5 |
6 | _NuGet Packages:_
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.12.0
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.12.0
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Tool/0.12.0
10 | * https://www.nuget.org/packages/BenchmarkDotNet.Annotations/0.12.0
11 | * https://www.nuget.org/packages/BenchmarkDotNet.Templates/0.12.0
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.12.1.md:
--------------------------------------------------------------------------------
1 | _Date: April 6, 2020_
2 |
3 | _Milestone: [v0.12.1](https://github.com/dotnet/BenchmarkDotNet/issues?q=milestone%3Av0.12.1)_
4 | ([List of commits](https://github.com/dotnet/BenchmarkDotNet/compare/v0.12.0...v0.12.1))
5 |
6 | _NuGet Packages:_
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.12.1
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.12.1
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Tool/0.12.1
10 | * https://www.nuget.org/packages/BenchmarkDotNet.Annotations/0.12.1
11 | * https://www.nuget.org/packages/BenchmarkDotNet.Templates/0.12.1
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.13.0.md:
--------------------------------------------------------------------------------
1 | _Date: May 19, 2021_
2 |
3 | _Milestone: [v0.13.0](https://github.com/dotnet/BenchmarkDotNet/issues?q=milestone%3Av0.13.0)_
4 | ([List of commits](https://github.com/dotnet/BenchmarkDotNet/compare/v0.12.1...v0.13.0))
5 |
6 | _NuGet Packages:_
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.13.0
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.13.0
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Annotations/0.13.0
10 | * https://www.nuget.org/packages/BenchmarkDotNet.Templates/0.13.0
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.13.1.md:
--------------------------------------------------------------------------------
1 | _Date: August 11, 2021_
2 |
3 | _Milestone: [v0.13.1](https://github.com/dotnet/BenchmarkDotNet/issues?q=milestone%3Av0.13.1)_
4 | ([List of commits](https://github.com/dotnet/BenchmarkDotNet/compare/v0.13.0...v0.13.1))
5 |
6 | _NuGet Packages:_
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.13.1
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.13.1
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Annotations/0.13.1
10 | * https://www.nuget.org/packages/BenchmarkDotNet.Templates/0.13.1
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.13.10.md:
--------------------------------------------------------------------------------
1 | _Date: November 01, 2023_
2 |
3 | _Milestone: [v0.13.10](https://github.com/dotnet/BenchmarkDotNet/issues?q=milestone%3Av0.13.10)_
4 | ([List of commits](https://github.com/dotnet/BenchmarkDotNet/compare/v0.13.9...v0.13.10))
5 |
6 | _NuGet Packages:_
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.13.10
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Annotations/0.13.10
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.dotTrace/0.13.10
10 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.13.10
11 | * https://www.nuget.org/packages/BenchmarkDotNet.Templates/0.13.10
12 |
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.13.11.md:
--------------------------------------------------------------------------------
1 | _Date: December 06, 2023_
2 |
3 | _Milestone: [v0.13.11](https://github.com/dotnet/BenchmarkDotNet/issues?q=milestone%3Av0.13.11)_
4 | ([List of commits](https://github.com/dotnet/BenchmarkDotNet/compare/v0.13.10...v0.13.11))
5 |
6 | _NuGet Packages:_
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.13.11
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Annotations/0.13.11
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.dotTrace/0.13.11
10 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.13.11
11 | * https://www.nuget.org/packages/BenchmarkDotNet.Templates/0.13.11
12 |
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.13.12.md:
--------------------------------------------------------------------------------
1 | _Date: January 05, 2024_
2 |
3 | _Milestone: [v0.13.12](https://github.com/dotnet/BenchmarkDotNet/issues?q=milestone%3Av0.13.12)_
4 | ([List of commits](https://github.com/dotnet/BenchmarkDotNet/compare/v0.13.11...v0.13.12))
5 |
6 | _NuGet Packages:_
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.13.12
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Annotations/0.13.12
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.dotTrace/0.13.12
10 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.13.12
11 | * https://www.nuget.org/packages/BenchmarkDotNet.Templates/0.13.12
12 | * https://www.nuget.org/packages/BenchmarkDotNet.TestAdapter/0.13.12
13 |
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.13.2.md:
--------------------------------------------------------------------------------
1 | _Date: August 26, 2022_
2 |
3 | _Milestone: [v0.13.2](https://github.com/dotnet/BenchmarkDotNet/issues?q=milestone%3Av0.13.2)_
4 | ([List of commits](https://github.com/dotnet/BenchmarkDotNet/compare/v0.13.1...v0.13.2))
5 |
6 | _NuGet Packages:_
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.13.2
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.13.2
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Annotations/0.13.2
10 | * https://www.nuget.org/packages/BenchmarkDotNet.Templates/0.13.2
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.13.3.md:
--------------------------------------------------------------------------------
1 | _Date: December 26, 2022_
2 |
3 | _Milestone: [v0.13.3](https://github.com/dotnet/BenchmarkDotNet/issues?q=milestone%3Av0.13.3)_
4 | ([List of commits](https://github.com/dotnet/BenchmarkDotNet/compare/v0.13.2...v0.13.3))
5 |
6 | _NuGet Packages:_
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.13.3
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.13.3
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Annotations/0.13.3
10 | * https://www.nuget.org/packages/BenchmarkDotNet.Templates/0.13.3
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.13.4.md:
--------------------------------------------------------------------------------
1 | _Date: January 13, 2023_
2 |
3 | _Milestone: [v0.13.4](https://github.com/dotnet/BenchmarkDotNet/issues?q=milestone%3Av0.13.4)_
4 | ([List of commits](https://github.com/dotnet/BenchmarkDotNet/compare/v0.13.3...v0.13.4))
5 |
6 | _NuGet Packages:_
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.13.4
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.13.4
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Annotations/0.13.4
10 | * https://www.nuget.org/packages/BenchmarkDotNet.Templates/0.13.4
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.13.5.md:
--------------------------------------------------------------------------------
1 | _Date: February 17, 2023_
2 |
3 | _Milestone: [v0.13.5](https://github.com/dotnet/BenchmarkDotNet/issues?q=milestone%3Av0.13.5)_
4 | ([List of commits](https://github.com/dotnet/BenchmarkDotNet/compare/v0.13.4...v0.13.5))
5 |
6 | _NuGet Packages:_
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.13.5
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.13.5
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Annotations/0.13.5
10 | * https://www.nuget.org/packages/BenchmarkDotNet.Templates/0.13.5
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.13.6.md:
--------------------------------------------------------------------------------
1 | _Date: July 11, 2023_
2 |
3 | _Milestone: [v0.13.6](https://github.com/dotnet/BenchmarkDotNet/issues?q=milestone%3Av0.13.6)_
4 | ([List of commits](https://github.com/dotnet/BenchmarkDotNet/compare/v0.13.5...v0.13.6))
5 |
6 | _NuGet Packages:_
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.13.6
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Annotations/0.13.6
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.dotTrace/0.13.6
10 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.13.6
11 | * https://www.nuget.org/packages/BenchmarkDotNet.Templates/0.13.6
12 |
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.13.7.md:
--------------------------------------------------------------------------------
1 | _Date: August 04, 2023_
2 |
3 | _Milestone: [v0.13.7](https://github.com/dotnet/BenchmarkDotNet/issues?q=milestone%3Av0.13.7)_
4 | ([List of commits](https://github.com/dotnet/BenchmarkDotNet/compare/v0.13.6...v0.13.7))
5 |
6 | _NuGet Packages:_
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.13.7
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Annotations/0.13.7
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.dotTrace/0.13.7
10 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.13.7
11 | * https://www.nuget.org/packages/BenchmarkDotNet.Templates/0.13.7
12 |
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.13.8.md:
--------------------------------------------------------------------------------
1 | _Date: September 08, 2023_
2 |
3 | _Milestone: [v0.13.8](https://github.com/dotnet/BenchmarkDotNet/issues?q=milestone%3Av0.13.8)_
4 | ([List of commits](https://github.com/dotnet/BenchmarkDotNet/compare/v0.13.7...v0.13.8))
5 |
6 | _NuGet Packages:_
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.13.8
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Annotations/0.13.8
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.dotTrace/0.13.8
10 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.13.8
11 | * https://www.nuget.org/packages/BenchmarkDotNet.Templates/0.13.8
12 |
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.13.9.md:
--------------------------------------------------------------------------------
1 | _Date: October 05, 2023_
2 |
3 | _Milestone: [v0.13.9](https://github.com/dotnet/BenchmarkDotNet/issues?q=milestone%3Av0.13.9)_
4 | ([List of commits](https://github.com/dotnet/BenchmarkDotNet/compare/v0.13.8...v0.13.9))
5 |
6 | _NuGet Packages:_
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.13.9
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Annotations/0.13.9
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.dotTrace/0.13.9
10 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.13.9
11 | * https://www.nuget.org/packages/BenchmarkDotNet.Templates/0.13.9
12 |
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.8.2.md:
--------------------------------------------------------------------------------
1 | _Date: January 19, 2016_
2 |
3 | _NuGet Packages:_
4 | * https://www.nuget.org/packages/BenchmarkDotNet/0.8.2
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.9.0.md:
--------------------------------------------------------------------------------
1 | _Date: February 9, 2016_
2 |
3 | _NuGet Packages:_
4 | * https://www.nuget.org/packages/BenchmarkDotNet/0.9.0
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.9.1.md:
--------------------------------------------------------------------------------
1 | _Date: February 10, 2016_
2 |
3 | _NuGet Packages:_
4 | * https://www.nuget.org/packages/BenchmarkDotNet/0.9.1
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.9.2.md:
--------------------------------------------------------------------------------
1 | _Milestone: [v0.9.2](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.9.2)_
2 |
3 | _Date: March 5, 2016_
4 |
5 | _NuGet Packages:_
6 | * https://www.nuget.org/packages/BenchmarkDotNet/0.9.2
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.9.3.md:
--------------------------------------------------------------------------------
1 | _Milestone: [v0.9.3](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.9.3)_
2 |
3 | _Date: March 13, 2016_
4 |
5 | _NuGet Packages:_
6 | * https://www.nuget.org/packages/BenchmarkDotNet/0.9.3
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.9.3-beta
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.9.4.md:
--------------------------------------------------------------------------------
1 | _Milestone: [v0.9.4](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.9.4)_
2 |
3 | _Date: March 24, 2016_
4 |
5 | _NuGet Packages:_
6 | * https://www.nuget.org/packages/BenchmarkDotNet/0.9.4
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.9.4-beta
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.9.5.md:
--------------------------------------------------------------------------------
1 | _Milestone: [v0.9.5](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.9.5)_
2 |
3 | _Date: May 02, 2016_
4 |
5 | _NuGet Packages:_
6 | * https://www.nuget.org/packages/BenchmarkDotNet/0.9.5
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.9.5-beta
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.9.6.md:
--------------------------------------------------------------------------------
1 | _Milestone: [v0.9.6](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.9.6)_
2 |
3 | _Date: May 11, 2016_
4 |
5 | _NuGet Packages:_
6 | * https://www.nuget.org/packages/BenchmarkDotNet/0.9.6
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.9.6-beta
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.9.6
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.9.7.md:
--------------------------------------------------------------------------------
1 | _Milestone: [v0.9.7](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.9.7)_
2 |
3 | _Date: May 29, 2016_
4 |
5 | _NuGet Packages:_
6 | * https://www.nuget.org/packages/BenchmarkDotNet/0.9.7
7 | * https://www.nuget.org/packages/BenchmarkDotNet/0.9.7-beta
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.9.7
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.9.8.md:
--------------------------------------------------------------------------------
1 | _Milestone: [v0.9.8](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.9.8)_
2 |
3 | _Date: July 07, 2016_
4 |
5 | _NuGet Packages:_
6 | * https://www.nuget.org/packages/BenchmarkDotNet/0.9.8
7 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.9.8
--------------------------------------------------------------------------------
/docs/_changelog/footer/v0.9.9.md:
--------------------------------------------------------------------------------
1 | _Date: August 18, 2016_
2 |
3 | _Milestone: [v0.9.9](https://github.com/PerfDotNet/BenchmarkDotNet/issues?q=milestone%3Av0.9.9)_
4 |
5 | _NuGet Packages:_
6 | * https://www.nuget.org/packages/BenchmarkDotNet/0.9.9
7 | * https://www.nuget.org/packages/BenchmarkDotNet.Core/0.9.9
8 | * https://www.nuget.org/packages/BenchmarkDotNet.Toolchains.Roslyn/0.9.9
9 | * https://www.nuget.org/packages/BenchmarkDotNet.Diagnostics.Windows/0.9.9
10 |
11 | _Online Documentation:_ https://perfdotnet.github.io/BenchmarkDotNet/
--------------------------------------------------------------------------------
/docs/_changelog/header/v0.10.10.md:
--------------------------------------------------------------------------------
1 | Highlights:
2 |
3 | * Disassembly Diagnoser (read more here: [Disassembling .NET Code with BenchmarkDotNet](https://adamsitnik.com/Disassembly-Diagnoser/))
4 | * ParamsSources
5 | * .NET Core x86 support
6 | * Environment variables and Mono args support
7 | * Better environment description
8 | * More: additional sections in the documentation, bug fixes, build script improvements, internal refactoring.
9 |
10 | Overview post: [BenchmarkDotNet v0.10.10](https://aakinshin.net/posts/bdn-v0_10_10/)
--------------------------------------------------------------------------------
/docs/_changelog/header/v0.10.13.md:
--------------------------------------------------------------------------------
1 | Overview post: [BenchmarkDotNet v0.10.13](https://aakinshin.net/posts/bdn-v0_10_13/)
--------------------------------------------------------------------------------
/docs/_changelog/header/v0.10.14.md:
--------------------------------------------------------------------------------
1 | * Per-method parameterization ([Read more](https://benchmarkdotnet.org/articles/features/parameterization.html))
2 | * Console histograms and multimodal disribution detection
3 | * Many improvements for Mono disassembly support on Windows ([Read more](https://aakinshin.net/posts/dotnet-crossruntime-disasm/))
4 | * Many bugfixes
5 |
--------------------------------------------------------------------------------
/docs/_changelog/header/v0.13.10.md:
--------------------------------------------------------------------------------
1 | ## Highlights
2 |
3 | Initial support of .NET 9 and minor bug fixes.
--------------------------------------------------------------------------------
/docs/_changelog/header/v0.13.11.md:
--------------------------------------------------------------------------------
1 | ## Highlights
2 |
3 | Small improvements.
--------------------------------------------------------------------------------
/docs/_changelog/header/v0.13.12.md:
--------------------------------------------------------------------------------
1 | ## Highlights
2 |
3 | The biggest highlight of this release if our new VSTest Adapter,
4 | which allows to run benchmarks as unit tests in your favorite IDE!
5 | The detailed guide can be found [here](xref:docs.vstest).
6 |
7 | This release also includes to a minor bug fix that caused incorrect job id generation:
8 | fixed job id generation ([#2491](https://github.com/dotnet/BenchmarkDotNet/pull/2491)).
9 |
10 | Also, the target framework in the BenchmarkDotNet templates was bumped to .NET 8.0.
--------------------------------------------------------------------------------
/docs/_changelog/header/v0.13.7.md:
--------------------------------------------------------------------------------
1 | ## Highlights
2 |
3 | This release contains important bug fixes listed below.
--------------------------------------------------------------------------------
/docs/_changelog/header/v0.13.8.md:
--------------------------------------------------------------------------------
1 | ## Highlights
2 |
3 | This release contains important bug fixes.
--------------------------------------------------------------------------------
/docs/_changelog/header/v0.13.9.md:
--------------------------------------------------------------------------------
1 | ## Highlights
2 |
3 | This release contains bug fixes.
--------------------------------------------------------------------------------
/docs/_changelog/header/v0.15.0.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/docs/_changelog/header/v0.15.0.md
--------------------------------------------------------------------------------
/docs/_changelog/header/v0.9.0.md:
--------------------------------------------------------------------------------
1 | * New API
2 | * Autodetermination of amount iteration for warmup/target idle/main iterations, duration of iteration, amount of CLR launches.
--------------------------------------------------------------------------------
/docs/_changelog/header/v0.9.2.md:
--------------------------------------------------------------------------------
1 | * Dnx451 support (Closed [#51](https://github.com/PerfDotNet/BenchmarkDotNet/issues/51), Merged [#87](https://github.com/PerfDotNet/BenchmarkDotNet/issues/87))
--------------------------------------------------------------------------------
/docs/_changelog/header/v0.9.3.md:
--------------------------------------------------------------------------------
1 | * CoreCLR support (Closed [#52](https://github.com/PerfDotNet/BenchmarkDotNet/issues/52), Merged [#113](https://github.com/PerfDotNet/BenchmarkDotNet/issues/113))
--------------------------------------------------------------------------------
/docs/_changelog/header/v0.9.6.md:
--------------------------------------------------------------------------------
1 | * Added Percentiles (see [#164](https://github.com/PerfDotNet/BenchmarkDotNet/pull/164))
2 | * Added support for Json export (see [#84](https://github.com/PerfDotNet/BenchmarkDotNet/issues/84))
3 | * Bugfixes
--------------------------------------------------------------------------------
/docs/_changelog/header/v0.9.7.md:
--------------------------------------------------------------------------------
1 | * .NET Core RC2 support (see [#187](https://github.com/PerfDotNet/BenchmarkDotNet/pull/187))
2 | * Bugfixes
--------------------------------------------------------------------------------
/docs/api/index.md:
--------------------------------------------------------------------------------
1 | # BenchmarkDotNet API Reference
--------------------------------------------------------------------------------
/docs/articles/configs/analysers.md:
--------------------------------------------------------------------------------
1 | ---
2 | uid: docs.analysers
3 | name: Analysers
4 | ---
5 |
6 | # Analysers
7 |
8 | An **analyser** can analyse summary of your benchmarks and produce some useful warnings.
9 | For example, `EnvironmentAnalyser` warns you,
10 | if you build your application in the DEBUG mode or run it with an attached debugger.
11 |
--------------------------------------------------------------------------------
/docs/articles/configs/loggers.md:
--------------------------------------------------------------------------------
1 | ---
2 | uid: docs.loggers
3 | name: Loggers
4 | ---
5 |
6 | # Loggers
7 |
8 | A **logger** allows you to log results of your benchmark. By default, you can see log on console and in a file (`.log`).
9 |
10 |
--------------------------------------------------------------------------------
/docs/articles/configs/orderers.md:
--------------------------------------------------------------------------------
1 | ---
2 | uid: docs.orderers
3 | name: Orderers
4 | ---
5 |
6 | # Orderers
7 |
8 | Orderers allows customizing the order of benchmark results in the summary table.
9 |
10 | ---
11 |
12 | [!include[IntroOrderAttr](../samples/IntroOrderAttr.md)]
13 |
14 | [!include[IntroOrderManual](../samples/IntroOrderManual.md)]
--------------------------------------------------------------------------------
/docs/articles/configs/toc.yml:
--------------------------------------------------------------------------------
1 | - name: Configs
2 | href: configs.md
3 | - name: Jobs
4 | href: jobs.md
5 | - name: Columns
6 | href: columns.md
7 | - name: Exporters
8 | href: exporters.md
9 | - name: Loggers
10 | href: loggers.md
11 | - name: Diagnosers
12 | href: diagnosers.md
13 | - name: Toolchains
14 | href: toolchains.md
15 | - name: Analysers
16 | href: analysers.md
17 | - name: Validators
18 | href: validators.md
19 | - name: Filters
20 | href: filters.md
21 | - name: Orderers
22 | href: orderers.md
23 | - name: ConfigOptions
24 | href: configoptions.md
--------------------------------------------------------------------------------
/docs/articles/contributing/debugging.md:
--------------------------------------------------------------------------------
1 | # Debugging
2 |
3 | There should be two debug profiles available in VS drop down
4 |
5 | 
6 |
--------------------------------------------------------------------------------
/docs/articles/contributing/miscellaneous.md:
--------------------------------------------------------------------------------
1 | #Miscellaneous topics
2 |
3 | ## F# #
4 |
5 | We have full F# support, all you have to do is to run `dotnet restore` to download the compilers etc.
6 |
7 | ## Chat room
8 | [](https://gitter.im/dotnet/BenchmarkDotNet?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
9 |
10 | ## How can I help?
11 |
12 | [Here is a list of up-for-grabs issues](https://github.com/dotnet/BenchmarkDotNet/issues?q=is%3Aissue+is%3Aopen+label%3Aup-for-grabs)
--------------------------------------------------------------------------------
/docs/articles/contributing/toc.yml:
--------------------------------------------------------------------------------
1 | - name: Building
2 | href: building.md
3 | - name: Debugging
4 | href: debugging.md
5 | - name: Running tests
6 | href: running-tests.md
7 | - name: Miscellaneous topics
8 | href: miscellaneous.md
9 | - name: Disassembler
10 | href: disassembler.md
11 | - name: Documentation
12 | href: documentation.md
--------------------------------------------------------------------------------
/docs/articles/features/baselines.md:
--------------------------------------------------------------------------------
1 | ---
2 | uid: docs.baselines
3 | name: Benchmark and Job Baselines
4 | ---
5 |
6 | # Benchmark and Job Baselines
7 |
8 | In order to scale your results, you can mark a benchmark method or a job as a baseline.
9 | Let's learn this feature by examples.
10 |
11 | ---
12 |
13 | [!include[IntroBenchmarkBaseline](../samples/IntroBenchmarkBaseline.md)]
14 |
15 | [!include[IntroRatioSD](../samples/IntroRatioSD.md)]
16 |
17 | [!include[IntroCategoryBaseline](../samples/IntroCategoryBaseline.md)]
18 |
19 | [!include[IntroJobBaseline](../samples/IntroJobBaseline.md)]
--------------------------------------------------------------------------------
/docs/articles/features/statistics.md:
--------------------------------------------------------------------------------
1 | ---
2 | uid: docs.statistics
3 | name: Statistics
4 | ---
5 |
6 | # Statistics
7 |
8 | ---
9 |
10 | [!include[IntroStatisticsColumns](../samples/IntroStatisticsColumns.md)]
11 |
12 | [!include[IntroPercentiles](../samples/IntroPercentiles.md)]
13 |
14 | [!include[IntroRankColumn](../samples/IntroRankColumn.md)]
15 |
16 | [!include[IntroMultimodal](../samples/IntroMultimodal.md)]
17 |
18 | [!include[IntroOutliers](../samples/IntroOutliers.md)]
--------------------------------------------------------------------------------
/docs/articles/features/toc.yml:
--------------------------------------------------------------------------------
1 | - name: Parameterization
2 | href: parameterization.md
3 | - name: Baselines
4 | href: baselines.md
5 | - name: Setup And Cleanup
6 | href: setup-and-cleanup.md
7 | - name: Statistics
8 | href: statistics.md
9 | - name: Disassembler
10 | href: disassembler.md
11 | - name: EtwProfiler
12 | href: etwprofiler.md
13 | - name: EventPipeProfiler
14 | href: event-pipe-profiler.md
15 | - name: VSProfiler
16 | href: vsprofiler.md
17 | - name: VSTest
18 | href: vstest.md
--------------------------------------------------------------------------------
/docs/articles/guides/customizing-runtime.md:
--------------------------------------------------------------------------------
1 | ---
2 | uid: docs.customizing-runtime
3 | name: Customizing Runtime
4 | ---
5 |
6 | # Customizing Runtime
7 |
8 | Currently, we have only information about customizing Mono in this section.
9 | If you want to customize .NET Core, read an article about @docs.toolchains.
10 |
11 | ---
12 |
13 | [!include[IntroCustomMono](../samples/IntroCustomMono.md)]
14 |
15 | [!include[IntroCustomMonoArguments](../samples/IntroCustomMonoArguments.md)]
16 |
17 | [!include[IntroEnvVars](../samples/IntroEnvVars.md)]
18 |
19 | [!include[IntroStaThread](../samples/IntroStaThread.md)]
--------------------------------------------------------------------------------
/docs/articles/guides/toc.yml:
--------------------------------------------------------------------------------
1 | - name: Getting Started
2 | href: getting-started.md
3 | - name: How to run your benchmarks
4 | href: how-to-run.md
5 | - name: Good Practices
6 | href: good-practices.md
7 | - name: Installing NuGet packages
8 | href: nuget.md
9 | - name: Choosing RunStrategy
10 | href: choosing-run-strategy.md
11 | - name: Customizing runtime
12 | href: customizing-runtime.md
13 | - name: How it works
14 | href: how-it-works.md
15 | - name: Console Arguments
16 | href: console-args.md
17 | - name: Troubleshooting
18 | href: troubleshooting.md
19 | - name: BenchmarkDotNet templates
20 | href: dotnet-new-templates.md
--------------------------------------------------------------------------------
/docs/articles/samples/IntroBasic.md:
--------------------------------------------------------------------------------
1 | ---
2 | uid: BenchmarkDotNet.Samples.IntroBasic
3 | title: "Sample: IntroBasic"
4 | ---
5 |
6 | ## Sample: IntroBasic
7 |
8 | ### Source code
9 |
10 | [!code-csharp[IntroBasic.cs](../../../samples/BenchmarkDotNet.Samples/IntroBasic.cs)]
11 |
12 | ### Links
13 |
14 | * The permanent link to this sample: @BenchmarkDotNet.Samples.IntroBasic
15 |
16 | ---
--------------------------------------------------------------------------------
/docs/articles/samples/IntroCategories.md:
--------------------------------------------------------------------------------
1 | ---
2 | uid: BenchmarkDotNet.Samples.IntroCategories
3 | ---
4 |
5 | ## Sample: IntroCategories
6 |
7 | Combined together with `[BenchmarkCategory]` attribute, you can group the benchmarks into categories and filter them by categories.
8 |
9 | ### Source code
10 |
11 | [!code-csharp[IntroCategories.cs](../../../samples/BenchmarkDotNet.Samples/IntroCategories.cs)]
12 |
13 | ### Command line examples:
14 |
15 | ```
16 | --allCategories=A,B
17 | --anyCategories=A,B
18 | ```
19 |
20 | ### Links
21 |
22 | * @docs.filters
23 | * The permanent link to this sample: @BenchmarkDotNet.Samples.IntroCategories
24 |
25 | ---
--------------------------------------------------------------------------------
/docs/articles/samples/IntroConfigSource.md:
--------------------------------------------------------------------------------
1 | ---
2 | uid: BenchmarkDotNet.Samples.IntroConfigSource
3 | ---
4 |
5 | ## Sample: IntroConfigSource
6 |
7 | You can define own config attribute.
8 |
9 | ### Source code
10 |
11 | [!code-csharp[IntroConfigSource.cs](../../../samples/BenchmarkDotNet.Samples/IntroConfigSource.cs)]
12 |
13 | ### Links
14 |
15 | * @docs.configs
16 | * The permanent link to this sample: @BenchmarkDotNet.Samples.IntroConfigSource
17 |
18 | ---
--------------------------------------------------------------------------------
/docs/articles/samples/IntroConfigUnion.md:
--------------------------------------------------------------------------------
1 | ---
2 | uid: BenchmarkDotNet.Samples.IntroConfigUnion
3 | ---
4 |
5 | ## Sample: IntroConfigUnion
6 |
7 | ### Source code
8 |
9 | [!code-csharp[IntroConfigUnion.cs](../../../samples/BenchmarkDotNet.Samples/IntroConfigUnion.cs)]
10 |
11 | ### Links
12 |
13 | * @docs.configs
14 | * The permanent link to this sample: @BenchmarkDotNet.Samples.IntroConfigUnion
15 |
16 | ---
--------------------------------------------------------------------------------
/docs/articles/samples/IntroDisassemblyRyuJit.md:
--------------------------------------------------------------------------------
1 | ---
2 | uid: BenchmarkDotNet.Samples.IntroDisassemblyRyuJit
3 | ---
4 |
5 | ## Sample: IntroDisassemblyRyuJit
6 |
7 | ### Source code
8 |
9 | [!code-csharp[IntroDisassemblyRyuJit.cs](../../../samples/BenchmarkDotNet.Samples/IntroDisassemblyRyuJit.cs)]
10 |
11 | ### Output
12 |
13 | 
14 |
15 | ### Links
16 |
17 | * @docs.diagnosers
18 | * @docs.disassembler
19 | * The permanent link to this sample: @BenchmarkDotNet.Samples.IntroDisassemblyRyuJit
20 |
21 | ---
--------------------------------------------------------------------------------
/docs/articles/samples/IntroExport.md:
--------------------------------------------------------------------------------
1 | ---
2 | uid: BenchmarkDotNet.Samples.IntroExport
3 | ---
4 |
5 | ## Sample: IntroExport
6 |
7 | BenchmarkDotNet has a lot of predefined exporters.
8 |
9 | ### Source code
10 |
11 | [!code-csharp[IntroExport.cs](../../../samples/BenchmarkDotNet.Samples/IntroExport.cs)]
12 |
13 | ### Links
14 |
15 | * @docs.exporters
16 | * The permanent link to this sample: @BenchmarkDotNet.Samples.IntroExport
17 |
18 | ---
--------------------------------------------------------------------------------
/docs/articles/samples/IntroFilters.md:
--------------------------------------------------------------------------------
1 | ---
2 | uid: BenchmarkDotNet.Samples.IntroFilters
3 | ---
4 |
5 | ## Sample: IntroFilters
6 |
7 | You can either use one of the predefined `Filter` types or create a custom type which implements `IFilter` interface.
8 |
9 | ### Source code
10 |
11 | [!code-csharp[IntroFilters.cs](../../../samples/BenchmarkDotNet.Samples/IntroFilters.cs)]
12 |
13 | ### Links
14 |
15 | * @docs.filters
16 | * The permanent link to this sample: @BenchmarkDotNet.Samples.IntroFilters
17 |
18 | ---
--------------------------------------------------------------------------------
/docs/articles/samples/IntroFluentConfigBuilder.md:
--------------------------------------------------------------------------------
1 | ---
2 | uid: BenchmarkDotNet.Samples.IntroFluentConfigBuilder
3 | ---
4 |
5 | ## Sample: IntroFluentConfigBuilder
6 |
7 | There is no need to create new Config type, you can simply use fluent interface.
8 |
9 | ### Source code
10 |
11 | [!code-csharp[IntroFluentConfigBuilder.cs](../../../samples/BenchmarkDotNet.Samples/IntroFluentConfigBuilder.cs)]
12 |
13 | ### Links
14 |
15 | * @docs.configs
16 | * The permanent link to this sample: @BenchmarkDotNet.Samples.IntroFluentConfigBuilder
17 |
18 | ---
--------------------------------------------------------------------------------
/docs/articles/samples/IntroGcMode.md:
--------------------------------------------------------------------------------
1 | ---
2 | uid: BenchmarkDotNet.Samples.IntroGcMode
3 | ---
4 |
5 | ## Sample: IntroGcMode
6 |
7 | ### Source code
8 |
9 | [!code-csharp[IntroGcMode.cs](../../../samples/BenchmarkDotNet.Samples/IntroGcMode.cs)]
10 |
11 | ### Output
12 |
13 |
14 | ### Links
15 |
16 | * @docs.jobs
17 | * The permanent link to this sample: @BenchmarkDotNet.Samples.IntroGcMode
18 |
19 | ---
--------------------------------------------------------------------------------
/docs/articles/samples/IntroGenericTypeArguments.md:
--------------------------------------------------------------------------------
1 | ---
2 | uid: BenchmarkDotNet.Samples.IntroGenericTypeArguments
3 | ---
4 |
5 | ## Sample: IntroGenericTypeArguments
6 |
7 | ### Source code
8 |
9 | [!code-csharp[IntroGenericTypeArguments.cs](../../../samples/BenchmarkDotNet.Samples/IntroGenericTypeArguments.cs)]
10 |
11 | ### Links
12 |
13 | * The permanent link to this sample: @BenchmarkDotNet.Samples.IntroGenericTypeArguments
14 |
15 | ---
--------------------------------------------------------------------------------
/docs/articles/samples/IntroInProcessWrongEnv.md:
--------------------------------------------------------------------------------
1 | ---
2 | uid: BenchmarkDotNet.Samples.IntroInProcessWrongEnv
3 | ---
4 |
5 | ## Sample: IntroInProcessWrongEnv
6 |
7 | ### Source code
8 |
9 | [!code-csharp[IntroInProcessWrongEnv.cs](../../../samples/BenchmarkDotNet.Samples/IntroInProcessWrongEnv.cs)]
10 |
11 | ### Output
12 |
13 |
14 | ### Links
15 |
16 | * @docs.toolchains
17 | * The permanent link to this sample: @BenchmarkDotNet.Samples.IntroInProcessWrongEnv
18 |
19 | ---
--------------------------------------------------------------------------------
/docs/articles/samples/IntroInliningDiagnoser.md:
--------------------------------------------------------------------------------
1 | ---
2 | uid: BenchmarkDotNet.Samples.IntroInliningDiagnoser
3 | ---
4 |
5 | ## Sample: IntroInliningDiagnoser
6 |
7 | This sample shows how to add InliningDiagnoser with events from only one namespace (BenchmarkDotNet.Samples).
8 |
9 | ### Source code
10 |
11 | [!code-csharp[IntroInliningDiagnoser.cs](../../../samples/BenchmarkDotNet.Samples/IntroInliningDiagnoser.cs)]
--------------------------------------------------------------------------------
/docs/articles/samples/IntroLargeAddressAware.md:
--------------------------------------------------------------------------------
1 | ---
2 | uid: BenchmarkDotNet.Samples.IntroLargeAddressAware
3 | title: "Sample: IntroLargeAddressAware"
4 | ---
5 |
6 | ## Sample: IntroLargeAddressAware
7 |
8 | ### Source code
9 |
10 | [!code-csharp[IntroLargeAddressAware.cs](../../../samples/BenchmarkDotNet.Samples/IntroLargeAddressAware.cs)]
11 |
12 | ### Links
13 |
14 | * The permanent link to this sample: @BenchmarkDotNet.Samples.IntroLargeAddressAware
15 |
16 | ---
--------------------------------------------------------------------------------
/docs/articles/samples/IntroOrderAttr.md:
--------------------------------------------------------------------------------
1 | ---
2 | uid: BenchmarkDotNet.Samples.IntroOrderAttr
3 | ---
4 |
5 | ## Sample: IntroOrderAttr
6 |
7 | ### Source code
8 |
9 | [!code-csharp[IntroOrderAttr.cs](../../../samples/BenchmarkDotNet.Samples/IntroOrderAttr.cs)]
10 |
11 | ### Links
12 |
13 | * @docs.orderers
14 | * The permanent link to this sample: @BenchmarkDotNet.Samples.IntroOrderAttr
15 |
16 | ---
--------------------------------------------------------------------------------
/docs/articles/samples/IntroOrderManual.md:
--------------------------------------------------------------------------------
1 | ---
2 | uid: BenchmarkDotNet.Samples.IntroOrderManual
3 | ---
4 |
5 | ## Sample: IntroOrderManual
6 |
7 | ### Source code
8 |
9 | [!code-csharp[IntroOrderManual.cs](../../../samples/BenchmarkDotNet.Samples/IntroOrderManual.cs)]
10 |
11 | ### Links
12 |
13 | * @docs.orderers
14 | * The permanent link to this sample: @BenchmarkDotNet.Samples.IntroOrderManual
15 |
16 | ---
--------------------------------------------------------------------------------
/docs/articles/samples/IntroStopOnFirstError.md:
--------------------------------------------------------------------------------
1 | ---
2 | uid: BenchmarkDotNet.Samples.IntroStopOnFirstError
3 | ---
4 |
5 | ## Sample: IntroStopOnFirstError
6 |
7 | BenchmarkDotNet can be configured to stop on first error. You just have to add `StopOnFirstError` attribute to your class or use `--stopOnFirstError` command line argument.
8 |
9 | ### Source code
10 |
11 | [!code-csharp[IntroStopOnFirstError.cs](../../../samples/BenchmarkDotNet.Samples/IntroStopOnFirstError.cs)]
12 |
13 | ### Links
14 |
15 | * @docs.configs
16 | * @docs.console-args
17 | * The permanent link to this sample: @BenchmarkDotNet.Samples.IntroStopOnFirstError
18 |
19 | ---
--------------------------------------------------------------------------------
/docs/articles/samples/IntroTemplate.txt:
--------------------------------------------------------------------------------
1 | ---
2 | uid: BenchmarkDotNet.Samples.SAMPLENAME
3 | ---
4 |
5 | ## Sample: SAMPLENAME
6 |
7 | ### Source code
8 |
9 | [!code-csharp[SAMPLENAME.cs](../../../samples/BenchmarkDotNet.Samples/SAMPLENAME.cs)]
10 |
11 | ### Output
12 |
13 |
14 | ### Links
15 |
16 | * TODO
17 | * The permanent link to this sample: @BenchmarkDotNet.Samples.SAMPLENAME
18 |
19 | ---
--------------------------------------------------------------------------------
/docs/articles/samples/IntroWasm.md:
--------------------------------------------------------------------------------
1 | ---
2 | uid: BenchmarkDotNet.Samples.IntroWasm
3 | ---
4 |
5 | ## Sample: IntroWasm
6 |
7 | WasmToolchain uses a local Mono Runtime build to run the benchmarks compiled as WebAssembly using V8 JavaScript Engine.
8 |
9 | ### Source code
10 |
11 | [!code-csharp[IntroInProcess.cs](../../../samples/BenchmarkDotNet.Samples/IntroWasm.cs)]
12 |
13 | ### Links
14 |
15 | * @docs.toolchains
16 | * The permanent link to this sample: @BenchmarkDotNet.Samples.IntroWasm
17 |
18 | ---
--------------------------------------------------------------------------------
/docs/articles/team.md:
--------------------------------------------------------------------------------
1 | # Team
2 |
3 | Maintainers:
4 | [Andrey Akinshin](https://github.com/AndreyAkinshin) (Project Lead),
5 | [Adam Sitnik](https://github.com/adamsitnik),
6 | [Yegor Stepanov](https://github.com/YegorStepanov),
7 | [Tim Cassell](https://github.com/timcassell).
8 |
9 | [All contributors on GitHub (200+)](https://github.com/dotnet/BenchmarkDotNet/graphs/contributors)
10 |
11 | BenchmarkDotNet is a part of the [.NET Foundation](https://dotnetfoundation.org).
--------------------------------------------------------------------------------
/docs/articles/toc.yml:
--------------------------------------------------------------------------------
1 | - name: Overview
2 | href: overview.md
3 | - name: Guides
4 | href: guides/toc.yml
5 | - name: Features
6 | href: features/toc.yml
7 | - name: Configs
8 | href: configs/toc.yml
9 | - name: Samples
10 | href: samples/toc.yml
11 | - name: Contributing
12 | href: contributing/toc.yml
13 | - name: FAQ
14 | href: faq.md
15 | - name: Team
16 | href: team.md
17 | - name: License
18 | href: license.md
19 |
--------------------------------------------------------------------------------
/docs/filter.yml:
--------------------------------------------------------------------------------
1 | apiRules:
2 | - exclude:
3 | uidRegex: ^System\.Object
4 | type: member # Avoid list of inherited Object members for each type.
5 |
--------------------------------------------------------------------------------
/docs/guide/README.md:
--------------------------------------------------------------------------------
1 | Old versions of the NuGet package use `https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/master/docs/guide/logo.png` as a logo url.
2 | So, we have to keep the `logo.png` file for backward compatibility.
--------------------------------------------------------------------------------
/docs/guide/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/docs/guide/logo.png
--------------------------------------------------------------------------------
/docs/images/cygwin-binutils.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/docs/images/cygwin-binutils.png
--------------------------------------------------------------------------------
/docs/images/disasm-demo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/docs/images/disasm-demo.png
--------------------------------------------------------------------------------
/docs/images/v0.12.0/rplot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/docs/images/v0.12.0/rplot.png
--------------------------------------------------------------------------------
/docs/images/vs-profiler-demo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/docs/images/vs-profiler-demo.png
--------------------------------------------------------------------------------
/docs/images/vs-testexplorer-demo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/docs/images/vs-testexplorer-demo.png
--------------------------------------------------------------------------------
/docs/images/xamarin-screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/docs/images/xamarin-screenshot.png
--------------------------------------------------------------------------------
/docs/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/docs/logo.png
--------------------------------------------------------------------------------
/docs/logo/icon-128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/docs/logo/icon-128.png
--------------------------------------------------------------------------------
/docs/logo/icon-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/docs/logo/icon-32.png
--------------------------------------------------------------------------------
/docs/logo/icon-64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/docs/logo/icon-64.png
--------------------------------------------------------------------------------
/docs/logo/logo-cmyk.eps:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/docs/logo/logo-cmyk.eps
--------------------------------------------------------------------------------
/docs/logo/logo-rgb.eps:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/docs/logo/logo-rgb.eps
--------------------------------------------------------------------------------
/docs/logo/logo-wide.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/docs/logo/logo-wide.png
--------------------------------------------------------------------------------
/docs/logo/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/docs/logo/logo.png
--------------------------------------------------------------------------------
/docs/template/public/main.css:
--------------------------------------------------------------------------------
1 | #logo {
2 | width: 50px;
3 | height: 50px;
4 | }
5 |
6 | #breadcrumb {
7 | display: none;
8 | }
9 |
10 | .affix {
11 | display: none !important;
12 | }
--------------------------------------------------------------------------------
/docs/template/public/main.js:
--------------------------------------------------------------------------------
1 | export default {
2 | iconLinks: [
3 | {
4 | icon: 'github',
5 | href: 'https://github.com/dotnet/BenchmarkDotNet',
6 | title: 'GitHub'
7 | },
8 | {
9 | icon: 'twitter',
10 | href: 'https://twitter.com/BenchmarkDotNet',
11 | title: 'Twitter'
12 | },
13 | {
14 | icon: 'heart',
15 | href: 'https://github.com/sponsors/AndreyAkinshin',
16 | title: 'Sponsor'
17 | }
18 | ]
19 | }
--------------------------------------------------------------------------------
/docs/toc.yml:
--------------------------------------------------------------------------------
1 | - name: Articles
2 | href: articles/
3 | - name: API
4 | href: api/
5 | homepage: api/index.md
6 | - name: ChangeLog
7 | href: changelog/
8 | homepage: changelog/index.md
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.Android/Properties/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.Android/Resources/layout/Tabbar.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.Android/Resources/layout/Toolbar.xml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.Android/Resources/mipmap-anydpi-v26/icon.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.Android/Resources/mipmap-anydpi-v26/icon_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.Android/Resources/mipmap-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/samples/BenchmarkDotNet.Samples.Android/Resources/mipmap-hdpi/icon.png
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.Android/Resources/mipmap-hdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/samples/BenchmarkDotNet.Samples.Android/Resources/mipmap-hdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.Android/Resources/mipmap-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/samples/BenchmarkDotNet.Samples.Android/Resources/mipmap-mdpi/icon.png
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.Android/Resources/mipmap-mdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/samples/BenchmarkDotNet.Samples.Android/Resources/mipmap-mdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.Android/Resources/mipmap-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/samples/BenchmarkDotNet.Samples.Android/Resources/mipmap-xhdpi/icon.png
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.Android/Resources/mipmap-xhdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/samples/BenchmarkDotNet.Samples.Android/Resources/mipmap-xhdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.Android/Resources/mipmap-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/samples/BenchmarkDotNet.Samples.Android/Resources/mipmap-xxhdpi/icon.png
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.Android/Resources/mipmap-xxhdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/samples/BenchmarkDotNet.Samples.Android/Resources/mipmap-xxhdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.Android/Resources/mipmap-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/samples/BenchmarkDotNet.Samples.Android/Resources/mipmap-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/samples/BenchmarkDotNet.Samples.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.Android/Resources/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFFFF
4 | #3F51B5
5 | #303F9F
6 | #FF4081
7 |
8 |
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.Forms/App.xaml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.Forms/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.Xaml;
4 |
5 | namespace BenchmarkDotNet.Samples.Forms
6 | {
7 | public partial class App : Application
8 | {
9 | public App()
10 | {
11 | InitializeComponent();
12 |
13 | MainPage = new MainPage();
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.Forms/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using Xamarin.Forms.Xaml;
2 |
3 | [assembly: XamlCompilation(XamlCompilationOptions.Compile)]
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/samples/BenchmarkDotNet.Samples.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/samples/BenchmarkDotNet.Samples.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/samples/BenchmarkDotNet.Samples.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/samples/BenchmarkDotNet.Samples.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/samples/BenchmarkDotNet.Samples.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/samples/BenchmarkDotNet.Samples.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/samples/BenchmarkDotNet.Samples.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/samples/BenchmarkDotNet.Samples.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/samples/BenchmarkDotNet.Samples.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/samples/BenchmarkDotNet.Samples.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/samples/BenchmarkDotNet.Samples.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/samples/BenchmarkDotNet.Samples.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/samples/BenchmarkDotNet.Samples.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.iOS/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.iOS/Main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace BenchmarkDotNet.Samples.Forms.iOS
9 | {
10 | public class Application
11 | {
12 | // This is the main entry point of the application.
13 | static void Main(string[] args)
14 | {
15 | // if you want to use a different Application Delegate class from "AppDelegate"
16 | // you can specify it here.
17 | UIApplication.Main(args, null, "AppDelegate");
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.iOS/Resources/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/samples/BenchmarkDotNet.Samples.iOS/Resources/Default-568h@2x.png
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.iOS/Resources/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/samples/BenchmarkDotNet.Samples.iOS/Resources/Default-Portrait.png
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.iOS/Resources/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/samples/BenchmarkDotNet.Samples.iOS/Resources/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.iOS/Resources/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/samples/BenchmarkDotNet.Samples.iOS/Resources/Default.png
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples.iOS/Resources/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/samples/BenchmarkDotNet.Samples.iOS/Resources/Default@2x.png
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples/IntroBasic.cs:
--------------------------------------------------------------------------------
1 | using System.Threading;
2 | using BenchmarkDotNet.Attributes;
3 |
4 | namespace BenchmarkDotNet.Samples
5 | {
6 | // It is very easy to use BenchmarkDotNet. You should just create a class
7 | public class IntroBasic
8 | {
9 | // And define a method with the Benchmark attribute
10 | [Benchmark]
11 | public void Sleep() => Thread.Sleep(10);
12 |
13 | // You can write a description for your method.
14 | [Benchmark(Description = "Thread.Sleep(10)")]
15 | public void SleepWithDescription() => Thread.Sleep(10);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples/IntroBenchmarkBaseline.cs:
--------------------------------------------------------------------------------
1 | using System.Threading;
2 | using BenchmarkDotNet.Attributes;
3 |
4 | namespace BenchmarkDotNet.Samples
5 | {
6 | public class IntroBenchmarkBaseline
7 | {
8 | [Benchmark]
9 | public void Time50() => Thread.Sleep(50);
10 |
11 | [Benchmark(Baseline = true)]
12 | public void Time100() => Thread.Sleep(100);
13 |
14 | [Benchmark]
15 | public void Time150() => Thread.Sleep(150);
16 | }
17 | }
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples/IntroDisassemblyDry.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Attributes;
2 |
3 | namespace BenchmarkDotNet.Samples
4 | {
5 | [DisassemblyDiagnoser(maxDepth: 3)]
6 | [DryJob]
7 | public class IntroDisassemblyDry
8 | {
9 | [Benchmark]
10 | public void Foo()
11 | {
12 |
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples/IntroEventPipeProfiler.cs:
--------------------------------------------------------------------------------
1 | using System.Threading;
2 | using BenchmarkDotNet.Attributes;
3 | using BenchmarkDotNet.Diagnosers;
4 |
5 | namespace BenchmarkDotNet.Samples
6 | {
7 | [ShortRunJob]
8 | [EventPipeProfiler(EventPipeProfile.CpuSampling)]
9 | public class IntroEventPipeProfiler
10 | {
11 | [Benchmark]
12 | public void Sleep() => Thread.Sleep(2000);
13 | }
14 | }
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples/IntroExceptionDiagnoser.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Attributes;
2 | using System;
3 |
4 | namespace BenchmarkDotNet.Samples
5 | {
6 | [ExceptionDiagnoser]
7 | public class IntroExceptionDiagnoser
8 | {
9 | [Benchmark]
10 | public void ThrowExceptionRandomly()
11 | {
12 | try
13 | {
14 | if (new Random().Next(0, 5) > 1)
15 | {
16 | throw new Exception();
17 | }
18 | }
19 | catch
20 | {
21 | // ignored
22 | }
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples/IntroExportXml.cs:
--------------------------------------------------------------------------------
1 | using System.Threading;
2 | using BenchmarkDotNet.Attributes;
3 |
4 | namespace BenchmarkDotNet.Samples
5 | {
6 | [DryJob]
7 | [XmlExporterAttribute.Brief]
8 | [XmlExporterAttribute.Full]
9 | [XmlExporterAttribute.BriefCompressed]
10 | [XmlExporterAttribute.FullCompressed]
11 | [XmlExporter("-custom", indentXml: true, excludeMeasurements: true)]
12 | public class IntroExportXml
13 | {
14 | [Benchmark] public void Sleep10() => Thread.Sleep(10);
15 | [Benchmark] public void Sleep20() => Thread.Sleep(20);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples/IntroGenericTypeArguments.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using BenchmarkDotNet.Attributes;
3 |
4 | namespace BenchmarkDotNet.Samples
5 | {
6 | [GenericTypeArguments(typeof(int))]
7 | [GenericTypeArguments(typeof(char))]
8 | public class IntroGenericTypeArguments
9 | {
10 | [Benchmark] public T Create() => Activator.CreateInstance();
11 | }
12 | }
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples/IntroHidingColumns.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Attributes;
2 | using BenchmarkDotNet.Columns;
3 |
4 | namespace BenchmarkDotNet.Samples
5 | {
6 | [MemoryDiagnoser] // adds Gen0, Gen1, Gen2 and Allocated Bytes columns
7 | [HideColumns(Column.Gen0, Column.Gen1, Column.Gen2)] // dont display GenX columns
8 | public class IntroHidingColumns
9 | {
10 | [Benchmark]
11 | public byte[] AllocateArray() => new byte[100_000];
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples/IntroJitStatsDiagnoser.cs:
--------------------------------------------------------------------------------
1 | using System.Threading;
2 | using BenchmarkDotNet.Attributes;
3 |
4 | namespace BenchmarkDotNet.Samples
5 | {
6 | [Diagnostics.Windows.Configs.JitStatsDiagnoser]
7 | public class IntroJitStatsDiagnoser
8 | {
9 | [Benchmark]
10 | public void Sleep() => Thread.Sleep(10);
11 | }
12 | }
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples/IntroJobBaseline.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Attributes;
2 | using BenchmarkDotNet.Jobs;
3 |
4 | namespace BenchmarkDotNet.Samples
5 | {
6 | [SimpleJob(runtimeMoniker: RuntimeMoniker.Net462, baseline: true)]
7 | [SimpleJob(runtimeMoniker: RuntimeMoniker.Mono)]
8 | [SimpleJob(runtimeMoniker: RuntimeMoniker.Net50)]
9 | public class IntroJobBaseline
10 | {
11 | [Benchmark]
12 | public int SplitJoin()
13 | => string.Join(",", new string[1000]).Split(',').Length;
14 | }
15 | }
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples/IntroMonitoring.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading;
3 | using BenchmarkDotNet.Attributes;
4 | using BenchmarkDotNet.Engines;
5 |
6 | namespace BenchmarkDotNet.Samples
7 | {
8 | [SimpleJob(RunStrategy.Monitoring, iterationCount: 10, id: "MonitoringJob")]
9 | [MinColumn, Q1Column, Q3Column, MaxColumn]
10 | public class IntroMonitoring
11 | {
12 | private Random random = new Random(42);
13 |
14 | [Benchmark]
15 | public void Foo()
16 | {
17 | Thread.Sleep(random.Next(10) * 10);
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples/IntroOrderAttr.cs:
--------------------------------------------------------------------------------
1 | using System.Threading;
2 | using BenchmarkDotNet.Attributes;
3 | using BenchmarkDotNet.Order;
4 |
5 | namespace BenchmarkDotNet.Samples
6 | {
7 | [Orderer(SummaryOrderPolicy.FastestToSlowest, MethodOrderPolicy.Declared)]
8 | [DryJob]
9 | public class IntroOrderAttr
10 | {
11 | [Params(1, 2, 3)]
12 | public int X { get; set; }
13 |
14 | [Benchmark]
15 | public void Slow() => Thread.Sleep(X * 100);
16 |
17 | [Benchmark]
18 | public void Fast() => Thread.Sleep(X * 50);
19 | }
20 | }
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples/IntroParams.cs:
--------------------------------------------------------------------------------
1 | using System.Threading;
2 | using BenchmarkDotNet.Attributes;
3 |
4 | namespace BenchmarkDotNet.Samples
5 | {
6 | public class IntroParams
7 | {
8 | [Params(100, 200)]
9 | public int A { get; set; }
10 |
11 | [Params(10, 20)]
12 | public int B { get; set; }
13 |
14 | [Benchmark]
15 | public void Benchmark() => Thread.Sleep(A + B + 5);
16 | }
17 | }
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples/IntroParamsPriority.cs:
--------------------------------------------------------------------------------
1 | using System.Threading;
2 | using BenchmarkDotNet.Attributes;
3 |
4 | namespace BenchmarkDotNet.Samples
5 | {
6 | public class IntroParamsPriority
7 | {
8 | [Params(100)]
9 | public int A { get; set; }
10 |
11 | [Params(10, Priority = -100)]
12 | public int B { get; set; }
13 |
14 | [Benchmark]
15 | public void Benchmark() => Thread.Sleep(A + B + 5);
16 | }
17 | }
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples/IntroPerfCollectProfiler.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using BenchmarkDotNet.Attributes;
3 |
4 | namespace BenchmarkDotNet.Samples
5 | {
6 | [PerfCollectProfiler(performExtraBenchmarksRun: false)]
7 | public class IntroPerfCollectProfiler
8 | {
9 | private readonly string path = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName());
10 | private readonly string content = new string('a', 100_000);
11 |
12 | [Benchmark]
13 | public void WriteAllText() => File.WriteAllText(path, content);
14 |
15 | [GlobalCleanup]
16 | public void Delete() => File.Delete(path);
17 | }
18 | }
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples/IntroStaThread.cs:
--------------------------------------------------------------------------------
1 | using System.Threading;
2 | using BenchmarkDotNet.Attributes;
3 |
4 | namespace BenchmarkDotNet.Samples
5 | {
6 | public class IntroStaThread
7 | {
8 | [Benchmark, System.STAThread]
9 | public void CheckForSTA()
10 | {
11 | if (Thread.CurrentThread.GetApartmentState() != ApartmentState.STA)
12 | {
13 | throw new ThreadStateException(
14 | "The current threads apartment state is not STA");
15 | }
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples/IntroStopOnFirstError.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using BenchmarkDotNet.Attributes;
3 |
4 | namespace BenchmarkDotNet.Samples
5 | {
6 | [StopOnFirstError]
7 | public class IntroStopOnFirstError
8 | {
9 | [Benchmark(Baseline = true)]
10 | public int FirstMethod() => throw new Exception("Example exception.");
11 |
12 | [Benchmark]
13 | public int SecondMethod() => 1;
14 | }
15 | }
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples/IntroThreadingDiagnoser.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Attributes;
2 | using System.Threading;
3 |
4 | namespace BenchmarkDotNet.Samples
5 | {
6 | [ThreadingDiagnoser] // ENABLE the diagnoser
7 | public class IntroThreadingDiagnoser
8 | {
9 | [Benchmark]
10 | public void CompleteOneWorkItem()
11 | {
12 | ManualResetEvent done = new ManualResetEvent(initialState: false);
13 |
14 | ThreadPool.QueueUserWorkItem(m => (m as ManualResetEvent).Set(), done);
15 |
16 | done.WaitOne();
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples/Program.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Running;
2 |
3 | namespace BenchmarkDotNet.Samples
4 | {
5 | public class Program
6 | {
7 | public static void Main(string[] args) => BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args);
8 | }
9 | }
--------------------------------------------------------------------------------
/samples/BenchmarkDotNet.Samples/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.InteropServices;
2 |
3 | [assembly: Guid("6f2232a9-0d0c-46cf-b08c-f6e28ab612e3")]
--------------------------------------------------------------------------------
/src/BenchmarkDotNet.Annotations/Attributes/ArgumentsSourceAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace BenchmarkDotNet.Attributes
4 | {
5 | [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
6 | public class ArgumentsSourceAttribute : PriorityAttribute
7 | {
8 | public string Name { get; }
9 |
10 | public ArgumentsSourceAttribute(string name) => Name = name;
11 | }
12 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet.Annotations/Attributes/GlobalCleanupAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using JetBrains.Annotations;
3 |
4 | namespace BenchmarkDotNet.Attributes
5 | {
6 | ///
7 | /// Marks method to be executed after all benchmark iterations.
8 | /// It's going to be executed only once, after all benchmark runs.
9 | ///
10 | [AttributeUsage(AttributeTargets.Method)]
11 | [MeansImplicitUse]
12 | public class GlobalCleanupAttribute : TargetedAttribute
13 | {
14 | }
15 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet.Annotations/Attributes/GlobalSetupAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using JetBrains.Annotations;
3 |
4 | namespace BenchmarkDotNet.Attributes
5 | {
6 | ///
7 | /// Marks method to be executed before all benchmark iterations.
8 | /// It's going to be executed only once, just before warm up.
9 | ///
10 | [AttributeUsage(AttributeTargets.Method)]
11 | [MeansImplicitUse]
12 | public class GlobalSetupAttribute : TargetedAttribute
13 | {
14 | }
15 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet.Annotations/Attributes/IterationCleanupAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using JetBrains.Annotations;
3 |
4 | namespace BenchmarkDotNet.Attributes
5 | {
6 | ///
7 | /// Marks method to be executed after each benchmark iteration. This should NOT be used for microbenchmarks - please see the docs.
8 | ///
9 | [AttributeUsage(AttributeTargets.Method)]
10 | [MeansImplicitUse]
11 | public class IterationCleanupAttribute : TargetedAttribute
12 | {
13 | }
14 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet.Annotations/Attributes/IterationSetupAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using JetBrains.Annotations;
3 |
4 | namespace BenchmarkDotNet.Attributes
5 | {
6 | ///
7 | /// Marks method to be executed before each benchmark iteration. This should NOT be used for microbenchmarks - please see the docs.
8 | ///
9 | [AttributeUsage(AttributeTargets.Method)]
10 | [MeansImplicitUse]
11 | public class IterationSetupAttribute : TargetedAttribute
12 | {
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/BenchmarkDotNet.Annotations/Attributes/ParamsAllValuesAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | namespace BenchmarkDotNet.Attributes
3 | {
4 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
5 | public class ParamsAllValuesAttribute : PriorityAttribute
6 | {
7 | }
8 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet.Annotations/Attributes/ParamsAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace BenchmarkDotNet.Attributes
4 | {
5 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
6 | public class ParamsAttribute : PriorityAttribute
7 | {
8 | public object?[] Values { get; protected set; }
9 |
10 | // CLS-Compliant Code requires a constructor without an array in the argument list
11 | public ParamsAttribute() => Values = new object[0];
12 |
13 | public ParamsAttribute(params object?[]? values)
14 | => Values = values ?? new object?[] { null }; // when users do Params(null) they mean one, null argument
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/BenchmarkDotNet.Annotations/Attributes/ParamsSourceAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace BenchmarkDotNet.Attributes
4 | {
5 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
6 | public class ParamsSourceAttribute : PriorityAttribute
7 | {
8 | public string Name { get; }
9 |
10 | public ParamsSourceAttribute(string name) => Name = name;
11 | }
12 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet.Annotations/Attributes/PriorityAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace BenchmarkDotNet.Attributes
4 | {
5 | public abstract class PriorityAttribute : Attribute
6 | {
7 | ///
8 | /// Defines display order of column in the same category.
9 | ///
10 | public int Priority { get; set; } = 0;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/BenchmarkDotNet.Diagnostics.Windows/Configs/ConcurrencyVisualizerProfilerAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using BenchmarkDotNet.Configs;
3 | using JetBrains.Annotations;
4 |
5 | namespace BenchmarkDotNet.Diagnostics.Windows.Configs
6 | {
7 | [PublicAPI]
8 | [AttributeUsage(AttributeTargets.Class)]
9 | public class ConcurrencyVisualizerProfilerAttribute : Attribute, IConfigSource
10 | {
11 | public ConcurrencyVisualizerProfilerAttribute() => Config = ManualConfig.CreateEmpty().AddDiagnoser(new ConcurrencyVisualizerProfiler());
12 |
13 | public IConfig Config { get; }
14 | }
15 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet.Diagnostics.Windows/Configs/JitStatsDiagnoserAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using BenchmarkDotNet.Configs;
3 | using JetBrains.Annotations;
4 |
5 | namespace BenchmarkDotNet.Diagnostics.Windows.Configs
6 | {
7 | [PublicAPI]
8 | [AttributeUsage(AttributeTargets.Class)]
9 | public class JitStatsDiagnoserAttribute : Attribute, IConfigSource
10 | {
11 | public JitStatsDiagnoserAttribute()
12 | {
13 | Config = ManualConfig.CreateEmpty().AddDiagnoser(new JitStatsDiagnoser());
14 | }
15 |
16 | public IConfig Config { get; }
17 | }
18 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet.Diagnostics.Windows/Configs/NativeMemoryProfilerAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using BenchmarkDotNet.Configs;
3 | using JetBrains.Annotations;
4 |
5 | namespace BenchmarkDotNet.Diagnostics.Windows.Configs
6 | {
7 | [PublicAPI]
8 | [AttributeUsage(AttributeTargets.Class)]
9 | public class NativeMemoryProfilerAttribute : Attribute, IConfigSource
10 | {
11 | public NativeMemoryProfilerAttribute()
12 | {
13 | Config = ManualConfig.CreateEmpty().AddDiagnoser(new NativeMemoryProfiler());
14 | }
15 |
16 | public IConfig Config { get; }
17 | }
18 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet.Diagnostics.Windows/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 | using BenchmarkDotNet.Properties;
5 |
6 | [assembly: Guid("7bbae514-895c-4ca5-95ba-b2a1a0c2e0af")]
7 |
8 | [assembly: CLSCompliant(true)]
9 |
10 | #if RELEASE
11 | [assembly: InternalsVisibleTo("BenchmarkDotNet.IntegrationTests,PublicKey=" + BenchmarkDotNetInfo.PublicKey)]
12 | #else
13 | [assembly: InternalsVisibleTo("BenchmarkDotNet.IntegrationTests")]
14 | #endif
--------------------------------------------------------------------------------
/src/BenchmarkDotNet.Diagnostics.dotMemory/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.CompilerServices;
3 | using BenchmarkDotNet.Properties;
4 |
5 | [assembly: CLSCompliant(true)]
6 |
7 | #if RELEASE
8 | [assembly: InternalsVisibleTo("BenchmarkDotNet.Tests,PublicKey=" + BenchmarkDotNetInfo.PublicKey)]
9 | #else
10 | [assembly: InternalsVisibleTo("BenchmarkDotNet.Tests")]
11 | #endif
--------------------------------------------------------------------------------
/src/BenchmarkDotNet.Diagnostics.dotTrace/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.CompilerServices;
3 | using BenchmarkDotNet.Properties;
4 |
5 | [assembly: CLSCompliant(true)]
6 |
7 | #if RELEASE
8 | [assembly: InternalsVisibleTo("BenchmarkDotNet.Tests,PublicKey=" + BenchmarkDotNetInfo.PublicKey)]
9 | #else
10 | [assembly: InternalsVisibleTo("BenchmarkDotNet.Tests")]
11 | #endif
--------------------------------------------------------------------------------
/src/BenchmarkDotNet.TestAdapter/entrypoints/EntryPoint.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Exclude this file from StyleCop analysis. This file isn't generated but is added to projects.
3 | //
4 |
5 | using BenchmarkDotNet.Running;
6 | using System.Reflection;
7 |
8 | public class __AutoGeneratedEntryPointClass
9 | {
10 | public static void Main(string[] args) => BenchmarkSwitcher.FromAssembly(typeof(__AutoGeneratedEntryPointClass).Assembly).Run(args);
11 | }
12 |
--------------------------------------------------------------------------------
/src/BenchmarkDotNet.TestAdapter/entrypoints/EntryPoint.fs:
--------------------------------------------------------------------------------
1 | //
2 | // Exclude this file from StyleCop analysis. This file isn't generated but is added to projects.
3 | //
4 |
5 | module __AutoGeneratedEntryPointClass
6 | open System.Reflection;
7 | open BenchmarkDotNet.Running
8 |
9 | type internal __Marker = interface end // Used to help locale current assembly
10 | []
11 | let main argv =
12 | BenchmarkSwitcher.FromAssembly(typeof<__Marker>.Assembly).Run(argv) |> ignore
13 | 0 // return an integer exit code
14 |
--------------------------------------------------------------------------------
/src/BenchmarkDotNet.TestAdapter/entrypoints/EntryPoint.vb:
--------------------------------------------------------------------------------
1 | REM
2 | REM Exclude this file from StyleCop analysis. This file isn't generated but is added to projects.
3 | REM
4 |
5 | Imports System.Reflection
6 | Imports BenchmarkDotNet.Running
7 |
8 | Namespace Global
9 | Module __AutoGeneratedEntryPointClass
10 | Sub Main(args As String())
11 | Dim summary = BenchmarkSwitcher.FromAssembly(MethodBase.GetCurrentMethod().Module.Assembly).Run(args)
12 | End Sub
13 | End Module
14 | End Namespace
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Analysers/CompositeAnalyser.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Collections.Immutable;
3 | using System.Linq;
4 | using BenchmarkDotNet.Reports;
5 |
6 | namespace BenchmarkDotNet.Analysers
7 | {
8 | public class CompositeAnalyser : IAnalyser
9 | {
10 | private readonly ImmutableHashSet analysers;
11 |
12 | public CompositeAnalyser(ImmutableHashSet analysers) => this.analysers = analysers;
13 |
14 | public string Id => nameof(CompositeAnalyser);
15 |
16 | public IEnumerable Analyse(Summary summary)
17 | => analysers.SelectMany(analyser => analyser.Analyse(summary));
18 | }
19 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Analysers/ConclusionKind.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Analysers
2 | {
3 | public enum ConclusionKind
4 | {
5 | Error, Warning, Hint
6 | }
7 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Analysers/IAnalyser.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using BenchmarkDotNet.Reports;
3 | using JetBrains.Annotations;
4 |
5 | namespace BenchmarkDotNet.Analysers
6 | {
7 | public interface IAnalyser
8 | {
9 | [PublicAPI] string Id { get; }
10 | [PublicAPI] IEnumerable Analyse(Summary summary);
11 | }
12 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/ArtifactsPathAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using BenchmarkDotNet.Configs;
3 | using JetBrains.Annotations;
4 |
5 | namespace BenchmarkDotNet.Attributes
6 | {
7 | [PublicAPI]
8 | [AttributeUsage(AttributeTargets.Class)]
9 | public class ArtifactsPathAttribute : Attribute, IConfigSource
10 | {
11 | public string Value { get; }
12 | public IConfig Config { get; }
13 |
14 | public ArtifactsPathAttribute(string value)
15 | {
16 | Value = value;
17 | Config = ManualConfig.CreateEmpty().WithArtifactsPath(value);
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/CategoryDiscovererAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using BenchmarkDotNet.Configs;
3 | using BenchmarkDotNet.Running;
4 |
5 | namespace BenchmarkDotNet.Attributes
6 | {
7 | [AttributeUsage(AttributeTargets.Class)]
8 | public class CategoryDiscovererAttribute : Attribute, IConfigSource
9 | {
10 | public CategoryDiscovererAttribute(bool inherit = true)
11 | {
12 | Config = ManualConfig.CreateEmpty().WithCategoryDiscoverer(new DefaultCategoryDiscoverer(inherit));
13 | }
14 |
15 | public IConfig Config { get; }
16 | }
17 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Columns/AllStatisticsColumnAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Columns;
2 | using JetBrains.Annotations;
3 |
4 | namespace BenchmarkDotNet.Attributes
5 | {
6 | [PublicAPI]
7 | public class AllStatisticsColumnAttribute : ColumnConfigBaseAttribute
8 | {
9 | public AllStatisticsColumnAttribute() : base(StatisticColumn.AllStatistics)
10 | {
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Columns/BaselineColumnAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Columns;
2 |
3 | namespace BenchmarkDotNet.Attributes
4 | {
5 | public class BaselineColumnAttribute : ColumnConfigBaseAttribute
6 | {
7 | public BaselineColumnAttribute() : base(BaselineColumn.Default) { }
8 | }
9 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Columns/CategoriesColumnAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Columns;
2 |
3 | namespace BenchmarkDotNet.Attributes
4 | {
5 | public class CategoriesColumnAttribute : ColumnConfigBaseAttribute
6 | {
7 | public CategoriesColumnAttribute() : base(CategoriesColumn.Default) { }
8 | }
9 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Columns/ConfidenceIntervalErrorColumnAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Columns;
2 | using JetBrains.Annotations;
3 | using Perfolizer.Mathematics.Common;
4 |
5 | namespace BenchmarkDotNet.Attributes
6 | {
7 | [PublicAPI]
8 | public class ConfidenceIntervalErrorColumnAttribute : ColumnConfigBaseAttribute
9 | {
10 | public ConfidenceIntervalErrorColumnAttribute() : base(StatisticColumn.CiError(ConfidenceLevel.L999)) { }
11 | public ConfidenceIntervalErrorColumnAttribute(ConfidenceLevel level) : base(StatisticColumn.CiError(level)) { }
12 | }
13 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Columns/IterationsColumnAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Columns;
2 | using JetBrains.Annotations;
3 |
4 | namespace BenchmarkDotNet.Attributes
5 | {
6 | [PublicAPI]
7 | public class IterationsColumnAttribute : ColumnConfigBaseAttribute
8 | {
9 | public IterationsColumnAttribute() : base(StatisticColumn.Iterations) { }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Columns/KurtosisColumnAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Columns;
2 |
3 | namespace BenchmarkDotNet.Attributes
4 | {
5 | public class KurtosisColumnAttribute : ColumnConfigBaseAttribute
6 | {
7 | public KurtosisColumnAttribute() : base(StatisticColumn.Kurtosis)
8 | {
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Columns/LogicalGroupColumnAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Columns;
2 |
3 | namespace BenchmarkDotNet.Attributes
4 | {
5 | public class LogicalGroupColumnAttribute : ColumnConfigBaseAttribute
6 | {
7 | public LogicalGroupColumnAttribute() : base(LogicalGroupColumn.Default) { }
8 | }
9 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Columns/MValueColumnAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Columns;
2 | using JetBrains.Annotations;
3 |
4 | namespace BenchmarkDotNet.Attributes
5 | {
6 | ///
7 | /// Prints mvalue.
8 | /// See http://www.brendangregg.com/FrequencyTrails/modes.html
9 | ///
10 | [PublicAPI]
11 | public class MValueColumnAttribute: ColumnConfigBaseAttribute
12 | {
13 | public MValueColumnAttribute() : base(StatisticColumn.MValue)
14 | {
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Columns/MaxColumnAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Columns;
2 |
3 | namespace BenchmarkDotNet.Attributes
4 | {
5 | public class MaxColumnAttribute : ColumnConfigBaseAttribute
6 | {
7 | public MaxColumnAttribute() : base(StatisticColumn.Max)
8 | {
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Columns/MeanColumnAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Columns;
2 |
3 | namespace BenchmarkDotNet.Attributes
4 | {
5 | public class MeanColumnAttribute : ColumnConfigBaseAttribute
6 | {
7 | public MeanColumnAttribute() : base(StatisticColumn.Mean)
8 | {
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Columns/MedianColumnAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Columns;
2 |
3 | namespace BenchmarkDotNet.Attributes
4 | {
5 | public class MedianColumnAttribute : ColumnConfigBaseAttribute
6 | {
7 | public MedianColumnAttribute() : base(StatisticColumn.Median)
8 | {
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Columns/MinColumnAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Columns;
2 |
3 | namespace BenchmarkDotNet.Attributes
4 | {
5 | public class MinColumnAttribute : ColumnConfigBaseAttribute
6 | {
7 | public MinColumnAttribute() : base(StatisticColumn.Min)
8 | {
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Columns/NamespaceColumnAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Columns;
2 | using JetBrains.Annotations;
3 |
4 | namespace BenchmarkDotNet.Attributes
5 | {
6 | ///
7 | /// Add a column with the target method namespace.
8 | ///
9 | [PublicAPI]
10 | public class NamespaceColumnAttribute : ColumnConfigBaseAttribute
11 | {
12 | public NamespaceColumnAttribute() : base(TargetMethodColumn.Namespace)
13 | {
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Columns/OperationsPerSecondAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Columns;
2 | using JetBrains.Annotations;
3 |
4 | namespace BenchmarkDotNet.Attributes
5 | {
6 | public class OperationsPerSecondAttribute : ColumnConfigBaseAttribute
7 | {
8 | public OperationsPerSecondAttribute() : base(StatisticColumn.OperationsPerSecond) { }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Columns/Q1ColumnAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Columns;
2 |
3 | namespace BenchmarkDotNet.Attributes
4 | {
5 | public class Q1ColumnAttribute : ColumnConfigBaseAttribute
6 | {
7 | public Q1ColumnAttribute() : base(StatisticColumn.Q1)
8 | {
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Columns/Q3ColumnAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Columns;
2 |
3 | namespace BenchmarkDotNet.Attributes
4 | {
5 | public class Q3ColumnAttribute : ColumnConfigBaseAttribute
6 | {
7 | public Q3ColumnAttribute() : base(StatisticColumn.Q3)
8 | {
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Columns/RankColumnAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using BenchmarkDotNet.Columns;
3 | using BenchmarkDotNet.Mathematics;
4 |
5 | namespace BenchmarkDotNet.Attributes
6 | {
7 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Assembly, AllowMultiple = true)]
8 | public class RankColumnAttribute : ColumnConfigBaseAttribute
9 | {
10 | public RankColumnAttribute(NumeralSystem system = NumeralSystem.Arabic) : base(new RankColumn(system))
11 | {
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Columns/SkewnessColumnAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Columns;
2 |
3 | namespace BenchmarkDotNet.Attributes
4 | {
5 | public class SkewnessColumnAttribute : ColumnConfigBaseAttribute
6 | {
7 | public SkewnessColumnAttribute() : base(StatisticColumn.Skewness)
8 | {
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Columns/StdDevColumnAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Columns;
2 | using JetBrains.Annotations;
3 |
4 | namespace BenchmarkDotNet.Attributes
5 | {
6 | [PublicAPI]
7 | public class StdDevColumnAttribute : ColumnConfigBaseAttribute
8 | {
9 | public StdDevColumnAttribute() : base(StatisticColumn.StdDev)
10 | {
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Columns/StdErrorColumnAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Columns;
2 | using JetBrains.Annotations;
3 |
4 | namespace BenchmarkDotNet.Attributes
5 | {
6 | [PublicAPI]
7 | public class StdErrorColumnAttribute() : ColumnConfigBaseAttribute(StatisticColumn.StdErr) { }
8 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/ConfigAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using BenchmarkDotNet.Configs;
3 |
4 | namespace BenchmarkDotNet.Attributes
5 | {
6 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Assembly)]
7 | public class ConfigAttribute : Attribute, IConfigSource
8 | {
9 | public IConfig Config { get; }
10 |
11 | public ConfigAttribute(Type type) => Config = (IConfig)Activator.CreateInstance(type);
12 | }
13 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/EventPipeProfilerAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using BenchmarkDotNet.Configs;
3 | using BenchmarkDotNet.Diagnosers;
4 |
5 | namespace BenchmarkDotNet.Attributes
6 | {
7 | [AttributeUsage(AttributeTargets.Class)]
8 | public class EventPipeProfilerAttribute : Attribute, IConfigSource
9 | {
10 | public IConfig Config { get; }
11 |
12 | public EventPipeProfilerAttribute(EventPipeProfile profile)
13 | {
14 | Config = ManualConfig.CreateEmpty().AddDiagnoser(new EventPipeProfiler(profile));
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Exporters/AsciiDocExporterAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Exporters;
2 |
3 | namespace BenchmarkDotNet.Attributes
4 | {
5 | public class AsciiDocExporterAttribute : ExporterConfigBaseAttribute
6 | {
7 | public AsciiDocExporterAttribute() : base(DefaultExporters.AsciiDoc)
8 | {
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Exporters/CsvExporterAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Exporters.Csv;
2 |
3 | namespace BenchmarkDotNet.Attributes
4 | {
5 | public class CsvExporterAttribute : ExporterConfigBaseAttribute
6 | {
7 | public CsvExporterAttribute(CsvSeparator separator = CsvSeparator.CurrentCulture) : base(new CsvExporter(separator))
8 | {
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Exporters/CsvMeasurementsExporterAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Exporters.Csv;
2 |
3 | namespace BenchmarkDotNet.Attributes
4 | {
5 | public class CsvMeasurementsExporterAttribute : ExporterConfigBaseAttribute
6 | {
7 | public CsvMeasurementsExporterAttribute(CsvSeparator separator = CsvSeparator.CurrentCulture) : base(new CsvMeasurementsExporter(separator))
8 | {
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Exporters/HtmlExporterAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Exporters;
2 |
3 | namespace BenchmarkDotNet.Attributes
4 | {
5 | public class HtmlExporterAttribute : ExporterConfigBaseAttribute
6 | {
7 | public HtmlExporterAttribute() : base(DefaultExporters.Html)
8 | {
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Exporters/PerfonarExporterAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using BenchmarkDotNet.Exporters;
3 |
4 | namespace BenchmarkDotNet.Attributes;
5 |
6 | ///
7 | /// IMPORTANT: Not fully implemented yet
8 | ///
9 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Assembly, AllowMultiple = true)]
10 | internal class PerfonarExporterAttribute() : ExporterConfigBaseAttribute(new PerfonarJsonExporter(), new PerfonarMdExporter());
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Exporters/PlainExporterAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Exporters;
2 |
3 | namespace BenchmarkDotNet.Attributes
4 | {
5 | public class PlainExporterAttribute : ExporterConfigBaseAttribute
6 | {
7 | public PlainExporterAttribute() : base(DefaultExporters.Plain)
8 | {
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Exporters/RPlotExporterAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Exporters;
2 |
3 | namespace BenchmarkDotNet.Attributes
4 | {
5 | public class RPlotExporterAttribute : ExporterConfigBaseAttribute
6 | {
7 | public RPlotExporterAttribute() : base(DefaultExporters.RPlot)
8 | {
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Filters/AllCategoriesFilterAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Filters;
2 | using JetBrains.Annotations;
3 |
4 | namespace BenchmarkDotNet.Attributes
5 | {
6 | [PublicAPI]
7 | public class AllCategoriesFilterAttribute : FilterConfigBaseAttribute
8 | {
9 | // CLS-Compliant Code requires a constructor without an array in the argument list
10 | public AllCategoriesFilterAttribute() { }
11 |
12 | public AllCategoriesFilterAttribute(params string[] targetCategories) : base(new AllCategoriesFilter(targetCategories)) { }
13 | }
14 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Filters/AnyCategoriesFilterAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Filters;
2 | using JetBrains.Annotations;
3 |
4 | namespace BenchmarkDotNet.Attributes
5 | {
6 | public class AnyCategoriesFilterAttribute : FilterConfigBaseAttribute
7 | {
8 | // CLS-Compliant Code requires a constructor without an array in the argument list
9 | [PublicAPI]
10 | public AnyCategoriesFilterAttribute() { }
11 |
12 | public AnyCategoriesFilterAttribute(params string[] targetCategories) : base(new AnyCategoriesFilter(targetCategories)) { }
13 | }
14 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Filters/AotFilterAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Filters;
2 |
3 | namespace BenchmarkDotNet.Attributes.Filters
4 | {
5 | public class AotFilterAttribute : FilterConfigBaseAttribute
6 | {
7 | public AotFilterAttribute(string? reason = null)
8 | : base(new SimpleFilter(benchmark => !benchmark.GetRuntime().IsAOT))
9 | {
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Jobs/InProcessAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using BenchmarkDotNet.Jobs;
3 |
4 | namespace BenchmarkDotNet.Attributes
5 | {
6 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Assembly)]
7 | public class InProcessAttribute : JobConfigBaseAttribute
8 | {
9 | public InProcessAttribute(bool dontLogOutput = false) : base(dontLogOutput ? Job.InProcessDontLogOutput : Job.InProcess)
10 | {
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Jobs/LegacyJitX64JobAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using BenchmarkDotNet.Jobs;
3 |
4 | namespace BenchmarkDotNet.Attributes
5 | {
6 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Assembly)]
7 | public class LegacyJitX64JobAttribute : JobConfigBaseAttribute
8 | {
9 | public LegacyJitX64JobAttribute() : base(Job.LegacyJitX64)
10 | {
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Jobs/LegacyJitX86JobAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using BenchmarkDotNet.Jobs;
3 |
4 | namespace BenchmarkDotNet.Attributes
5 | {
6 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Assembly)]
7 | public class LegacyJitX86JobAttribute : JobConfigBaseAttribute
8 | {
9 | public LegacyJitX86JobAttribute() : base(Job.LegacyJitX86)
10 | {
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Jobs/RyuJitX64JobAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using BenchmarkDotNet.Jobs;
3 |
4 | namespace BenchmarkDotNet.Attributes
5 | {
6 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Assembly)]
7 | public class RyuJitX64JobAttribute : JobConfigBaseAttribute
8 | {
9 | public RyuJitX64JobAttribute() : base(Job.RyuJitX64)
10 | {
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Jobs/RyuJitX86JobAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using BenchmarkDotNet.Jobs;
3 | using JetBrains.Annotations;
4 |
5 | namespace BenchmarkDotNet.Attributes
6 | {
7 | [PublicAPI]
8 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Assembly)]
9 | public class RyuJitX86JobAttribute : JobConfigBaseAttribute
10 | {
11 | public RyuJitX86JobAttribute() : base(Job.RyuJitX86)
12 | {
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Mutators/EvaluateOverheadAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Jobs;
2 | using JetBrains.Annotations;
3 |
4 | namespace BenchmarkDotNet.Attributes
5 | {
6 | ///
7 | /// Specifies if the overhead should be evaluated (Idle runs) and it's average value subtracted from every result.
8 | /// True by default, very important for nano-benchmarks.
9 | ///
10 | [PublicAPI]
11 | public class EvaluateOverheadAttribute : JobMutatorConfigBaseAttribute
12 | {
13 | public EvaluateOverheadAttribute(bool value = true) : base(Job.Default.WithEvaluateOverhead(value))
14 | {
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Mutators/GcServerAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Jobs;
2 | using JetBrains.Annotations;
3 |
4 | namespace BenchmarkDotNet.Attributes
5 | {
6 | ///
7 | /// Specifies whether the common language runtime runs server garbage collection.
8 | /// false: Does not run server garbage collection. This is the default.
9 | /// true: Runs server garbage collection.
10 | ///
11 | [PublicAPI]
12 | public class GcServerAttribute : JobMutatorConfigBaseAttribute
13 | {
14 | public GcServerAttribute(bool value = false) : base(Job.Default.WithGcServer(value))
15 | {
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Mutators/MinInvokeCountAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Jobs;
2 | using JetBrains.Annotations;
3 |
4 | namespace BenchmarkDotNet.Attributes
5 | {
6 | ///
7 | /// Minimum count of benchmark invocations per iteration.
8 | /// The default value is 4.
9 | ///
10 | [PublicAPI]
11 | public class MinInvokeCountAttribute : JobMutatorConfigBaseAttribute
12 | {
13 | public MinInvokeCountAttribute(int minInvokeCount) : base(Job.Default.WithMinInvokeCount(minInvokeCount))
14 | {
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Mutators/OutliersAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Jobs;
2 | using Perfolizer.Mathematics.OutlierDetection;
3 |
4 | namespace BenchmarkDotNet.Attributes
5 | {
6 | ///
7 | /// Specifies which outliers should be removed from the distribution
8 | ///
9 | public class OutliersAttribute : JobMutatorConfigBaseAttribute
10 | {
11 | public OutliersAttribute(OutlierMode outlierMode) : base(Job.Default.WithOutlierMode(outlierMode))
12 | {
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Mutators/ProcessCountAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Jobs;
2 | using JetBrains.Annotations;
3 |
4 | namespace BenchmarkDotNet.Attributes
5 | {
6 | ///
7 | /// How many times we should launch process with target benchmark.
8 | ///
9 | [PublicAPI]
10 | public class ProcessCountAttribute : JobMutatorConfigBaseAttribute
11 | {
12 | public ProcessCountAttribute(int processLaunchCount) : base(Job.Default.WithLaunchCount(processLaunchCount))
13 | {
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Mutators/RunOncePerIterationAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Jobs;
2 |
3 | namespace BenchmarkDotNet.Attributes
4 | {
5 | ///
6 | /// Run the benchmark exactly once per iteration.
7 | ///
8 | public class RunOncePerIterationAttribute : JobMutatorConfigBaseAttribute
9 | {
10 | public RunOncePerIterationAttribute() : base(Job.Default.RunOncePerIteration())
11 | {
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Mutators/WarmupCountAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Jobs;
2 | using JetBrains.Annotations;
3 |
4 | namespace BenchmarkDotNet.Attributes
5 | {
6 | ///
7 | /// How many warmup iterations should be performed.
8 | ///
9 | [PublicAPI]
10 | public class WarmupCountAttribute : JobMutatorConfigBaseAttribute
11 | {
12 | public WarmupCountAttribute(int warmupCount) : base(Job.Default.WithWarmupCount(warmupCount))
13 | {
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Obsolete/ClrJobAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Environments;
2 | using BenchmarkDotNet.Jobs;
3 | using System;
4 |
5 | namespace BenchmarkDotNet.Attributes
6 | {
7 | [Obsolete("Please use [SimpleJob(RuntimeMoniker.Net$)] instead.", false)]
8 | public class ClrJobAttribute : JobConfigBaseAttribute
9 | {
10 | public ClrJobAttribute() : base(Job.Default.WithRuntime(ClrRuntime.GetCurrentVersion()))
11 | {
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Obsolete/CoreJobAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Environments;
2 | using BenchmarkDotNet.Jobs;
3 | using System;
4 |
5 | namespace BenchmarkDotNet.Attributes
6 | {
7 | [Obsolete("Please use [SimpleJob(RuntimeMoniker.NetCoreApp$)] instead.", false)]
8 | public class CoreJobAttribute : JobConfigBaseAttribute
9 | {
10 | public CoreJobAttribute() : base(Job.Default.WithRuntime(CoreRuntime.GetCurrentVersion()))
11 | {
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Obsolete/DryClrJobAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Environments;
2 | using BenchmarkDotNet.Jobs;
3 | using System;
4 |
5 | namespace BenchmarkDotNet.Attributes
6 | {
7 | [Obsolete("Please use [DryJob(RuntimeMoniker.Net$)] instead.", false)]
8 | public class DryClrJobAttribute : JobConfigBaseAttribute
9 | {
10 | public DryClrJobAttribute() : base(Job.Dry.WithRuntime(ClrRuntime.GetCurrentVersion()))
11 | {
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Obsolete/DryCoreJobAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Environments;
2 | using BenchmarkDotNet.Jobs;
3 | using System;
4 |
5 | namespace BenchmarkDotNet.Attributes
6 | {
7 | [Obsolete("Please use [DryJob(RuntimeMoniker.NetCoreApp$)] instead.", false)]
8 | public class DryCoreJobAttribute : JobConfigBaseAttribute
9 | {
10 | public DryCoreJobAttribute() : base(Job.Dry.WithRuntime(CoreRuntime.GetCurrentVersion()))
11 | {
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Obsolete/DryMonoJobAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Environments;
2 | using BenchmarkDotNet.Jobs;
3 | using System;
4 |
5 | namespace BenchmarkDotNet.Attributes
6 | {
7 | [Obsolete("Please use [DryJob(RuntimeMoniker.Mono)] instead.", false)]
8 | public class DryMonoJobAttribute : JobConfigBaseAttribute
9 | {
10 | public DryMonoJobAttribute() : base(Job.Dry.WithRuntime(MonoRuntime.Default))
11 | {
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/StopOnFirstErrorAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using BenchmarkDotNet.Configs;
3 | using JetBrains.Annotations;
4 |
5 | namespace BenchmarkDotNet.Attributes
6 | {
7 | ///
8 | /// determines if running should be stop after first error
9 | ///
10 | [PublicAPI]
11 | [AttributeUsage(AttributeTargets.Class)]
12 | public class StopOnFirstErrorAttribute : Attribute, IConfigSource
13 | {
14 | public IConfig Config { get; }
15 |
16 | public StopOnFirstErrorAttribute(bool value = true)
17 | {
18 | Config = ManualConfig.CreateEmpty().WithOption(ConfigOptions.StopOnFirstError, value);
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/UnicodeConsoleLoggerAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using BenchmarkDotNet.Configs;
3 | using BenchmarkDotNet.Loggers;
4 |
5 | namespace BenchmarkDotNet.Attributes
6 | {
7 | ///
8 | /// Enable unicode support in console logger
9 | ///
10 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Assembly)]
11 | public class UnicodeConsoleLoggerAttribute : Attribute, IConfigSource
12 | {
13 | public UnicodeConsoleLoggerAttribute()
14 | {
15 | Config = ManualConfig.CreateEmpty().AddLogger(ConsoleLogger.Unicode);
16 | }
17 |
18 | public IConfig Config { get; }
19 | }
20 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Validators/ExecutionValidatorAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Validators;
2 | using JetBrains.Annotations;
3 |
4 | namespace BenchmarkDotNet.Attributes
5 | {
6 | [PublicAPI]
7 | public class ExecutionValidatorAttribute : ValidatorConfigBaseAttribute
8 | {
9 | public ExecutionValidatorAttribute()
10 | : this(true) { }
11 |
12 | public ExecutionValidatorAttribute(bool failOnError)
13 | : base(failOnError ? ExecutionValidator.FailOnError : ExecutionValidator.DontFailOnError) { }
14 | }
15 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Attributes/Validators/ReturnValueValidatorAttribute.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Validators;
2 | using JetBrains.Annotations;
3 |
4 | namespace BenchmarkDotNet.Attributes
5 | {
6 | [PublicAPI]
7 | public class ReturnValueValidatorAttribute : ValidatorConfigBaseAttribute
8 | {
9 | public ReturnValueValidatorAttribute()
10 | : this(true) { }
11 |
12 | public ReturnValueValidatorAttribute(bool failOnError)
13 | : base(failOnError ? ReturnValueValidator.FailOnError : ReturnValueValidator.DontFailOnError) { }
14 | }
15 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Characteristics/CharacteristicSet.cs:
--------------------------------------------------------------------------------
1 | using JetBrains.Annotations;
2 |
3 | namespace BenchmarkDotNet.Characteristics
4 | {
5 | public sealed class CharacteristicSet : CharacteristicObject
6 | {
7 | [PublicAPI] public CharacteristicSet() => Apply();
8 | [PublicAPI] public CharacteristicSet(CharacteristicObject other) => Apply(other);
9 | [PublicAPI] public CharacteristicSet(params CharacteristicObject[] others) => Apply(others);
10 |
11 | protected override bool IsPropertyBag => true;
12 | }
13 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Columns/ColumnCategory.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Columns
2 | {
3 | public enum ColumnCategory
4 | {
5 | Job, Params, Statistics, Baseline, Custom, Meta, Metric
6 | }
7 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Columns/ColumnExtensions.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Columns
2 | {
3 | public static class ColumnExtensions
4 | {
5 | public static IColumnProvider ToProvider(this IColumn column) => new SimpleColumnProvider(column);
6 | }
7 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Columns/ColumnHidingByIdRule.cs:
--------------------------------------------------------------------------------
1 | using JetBrains.Annotations;
2 |
3 | namespace BenchmarkDotNet.Columns
4 | {
5 | [PublicAPI]
6 | public class ColumnHidingByIdRule: IColumnHidingRule
7 | {
8 | public string Id { get; }
9 |
10 | public ColumnHidingByIdRule(IColumn column) => Id = column.Id;
11 |
12 | public bool NeedToHide(IColumn column) => column.Id == Id;
13 | }
14 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Columns/ColumnHidingByNameRule.cs:
--------------------------------------------------------------------------------
1 | using JetBrains.Annotations;
2 |
3 | namespace BenchmarkDotNet.Columns
4 | {
5 | [PublicAPI]
6 | public class ColumnHidingByNameRule: IColumnHidingRule
7 | {
8 | public string Name { get; }
9 |
10 | public ColumnHidingByNameRule(string name) => Name = name;
11 |
12 | public bool NeedToHide(IColumn column) => column.ColumnName == Name;
13 | }
14 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Columns/CompositeColumnProvider.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using BenchmarkDotNet.Reports;
4 |
5 | namespace BenchmarkDotNet.Columns
6 | {
7 | public class CompositeColumnProvider : IColumnProvider
8 | {
9 | private readonly IColumnProvider[] providers;
10 |
11 | public CompositeColumnProvider(params IColumnProvider[] providers)
12 | {
13 | this.providers = providers;
14 | }
15 |
16 | public IEnumerable GetColumns(Summary summary) => providers.SelectMany(p => p.GetColumns(summary));
17 | }
18 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Columns/EmptyColumnProvider.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using BenchmarkDotNet.Reports;
4 |
5 | namespace BenchmarkDotNet.Columns
6 | {
7 | public class EmptyColumnProvider : IColumnProvider
8 | {
9 | public static readonly IColumnProvider Instance = new EmptyColumnProvider();
10 |
11 | private EmptyColumnProvider()
12 | {
13 | }
14 |
15 | public IEnumerable GetColumns(Summary summary) => Enumerable.Empty();
16 | }
17 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Columns/IColumnHidingRule.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Columns
2 | {
3 | public interface IColumnHidingRule
4 | {
5 | bool NeedToHide(IColumn column);
6 | }
7 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Columns/IColumnProvider.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using BenchmarkDotNet.Reports;
3 |
4 | namespace BenchmarkDotNet.Columns
5 | {
6 | public interface IColumnProvider
7 | {
8 | IEnumerable GetColumns(Summary summary);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Columns/RatioColumnStyle.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Columns
2 | {
3 | public enum RatioStyle
4 | {
5 | Value,
6 | Percentage,
7 | Trend
8 | }
9 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Columns/SimpleColumnProvider.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using BenchmarkDotNet.Reports;
4 |
5 | namespace BenchmarkDotNet.Columns
6 | {
7 | public class SimpleColumnProvider : IColumnProvider
8 | {
9 | private readonly IColumn[] columns;
10 |
11 | public SimpleColumnProvider(params IColumn[] columns)
12 | {
13 | this.columns = columns;
14 | }
15 |
16 | public IEnumerable GetColumns(Summary summary) => columns.Where(c => c.IsAvailable(summary));
17 | }
18 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Columns/UnitType.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Columns
2 | {
3 | // TODO: migrate to Perfolizer.Metrology
4 | public enum UnitType
5 | {
6 | Dimensionless,
7 | Time,
8 | Size,
9 | CodeSize
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Configs/BenchmarkLogicalGroupRule.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Configs
2 | {
3 | public enum BenchmarkLogicalGroupRule
4 | {
5 | ByMethod, ByJob, ByParams, ByCategory
6 | }
7 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Configs/ConfigUnionRule.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Configs
2 | {
3 | public enum ConfigUnionRule
4 | {
5 | Union, AlwaysUseLocal, AlwaysUseGlobal
6 | }
7 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Configs/IConfigSource.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Configs
2 | {
3 | public interface IConfigSource
4 | {
5 | IConfig Config { get; }
6 | }
7 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Configs/WakeLockType.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Configs
2 | {
3 | public enum WakeLockType
4 | {
5 | ///
6 | /// Allows the system to enter sleep and/or turn off the display while benchmarks are running.
7 | ///
8 | None,
9 |
10 | ///
11 | /// Forces the system to be in the working state while benchmarks are running.
12 | ///
13 | System,
14 |
15 | ///
16 | /// Forces the display to be on while benchmarks are running.
17 | ///
18 | Display
19 | }
20 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/ConsoleArguments/ListBenchmarks/FlatBenchmarkCasesPrinter.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using BenchmarkDotNet.Loggers;
3 |
4 | namespace BenchmarkDotNet.ConsoleArguments.ListBenchmarks
5 | {
6 | internal class FlatBenchmarkCasesPrinter : IBenchmarkCasesPrinter
7 | {
8 | public void Print(IEnumerable testNames, ILogger logger)
9 | {
10 | foreach (string test in testNames)
11 | {
12 | logger.WriteLine(test);
13 | }
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/ConsoleArguments/ListBenchmarks/IBenchmarkCasesPrinter.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using BenchmarkDotNet.Loggers;
3 |
4 | namespace BenchmarkDotNet.ConsoleArguments.ListBenchmarks
5 | {
6 | internal interface IBenchmarkCasesPrinter
7 | {
8 | void Print(IEnumerable testNames, ILogger logger);
9 | }
10 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/ConsoleArguments/ListBenchmarks/ListBechnmarkCaseMode.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.ConsoleArguments.ListBenchmarks
2 | {
3 | public enum ListBenchmarkCaseMode
4 | {
5 | ///
6 | /// Do not print any of the available full benchmark names.
7 | ///
8 | Disabled,
9 |
10 | ///
11 | /// Prints flat list of the available benchmark names.
12 | ///
13 | Flat,
14 |
15 | ///
16 | /// Prints tree of the available full benchmark names.
17 | ///
18 | Tree
19 | }
20 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/ConsoleArguments/ListBenchmarks/Node.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace BenchmarkDotNet.ConsoleArguments.ListBenchmarks
4 | {
5 | internal class Node
6 | {
7 | public string Name { get; set; }
8 |
9 | public List Children { get; } = new List();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/ConsoleArguments/LoggerWrapper.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using System.Text;
3 | using BenchmarkDotNet.Loggers;
4 |
5 | namespace BenchmarkDotNet.ConsoleArguments
6 | {
7 | internal class LoggerWrapper : TextWriter
8 | {
9 | private readonly ILogger logger;
10 |
11 | public LoggerWrapper(ILogger logger) => this.logger = logger;
12 |
13 | public override Encoding Encoding { get; } = Encoding.ASCII;
14 |
15 | public override void Write(string value) => logger.WriteInfo(value);
16 | }
17 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Detectors/Cpu/ICpuDetector.cs:
--------------------------------------------------------------------------------
1 | using Perfolizer.Models;
2 |
3 | namespace BenchmarkDotNet.Detectors.Cpu;
4 |
5 | ///
6 | /// Loads the for the current hardware
7 | ///
8 | public interface ICpuDetector
9 | {
10 | bool IsApplicable();
11 | CpuInfo? Detect();
12 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Detectors/Cpu/Windows/WindowsCpuDetector.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Detectors.Cpu.Windows;
2 |
3 | internal class WindowsCpuDetector() : CpuDetector(new MosCpuDetector(), new WmicCpuDetector());
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Detectors/Cpu/Windows/WmicCpuInfoKeyNames.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Detectors.Cpu.Windows;
2 |
3 | internal static class WmicCpuInfoKeyNames
4 | {
5 | internal const string NumberOfLogicalProcessors = "NumberOfLogicalProcessors";
6 | internal const string NumberOfCores = "NumberOfCores";
7 | internal const string Name = "Name";
8 | internal const string MaxClockSpeed = "MaxClockSpeed";
9 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Detectors/Cpu/macOS/MacOsCpuDetector.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Helpers;
2 | using Perfolizer.Models;
3 |
4 | namespace BenchmarkDotNet.Detectors.Cpu.macOS;
5 |
6 | ///
7 | /// CPU information from output of the `sysctl -a` command.
8 | /// MacOSX only.
9 | ///
10 | internal class MacOsCpuDetector : ICpuDetector
11 | {
12 | public bool IsApplicable() => OsDetector.IsMacOS();
13 |
14 | public CpuInfo? Detect()
15 | {
16 | if (!IsApplicable()) return null;
17 |
18 | string sysctlOutput = ProcessHelper.RunAndReadOutput("sysctl", "-a");
19 | return SysctlCpuInfoParser.Parse(sysctlOutput);
20 | }
21 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Diagnosers/IHardwareCounterDiagnoser.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using BenchmarkDotNet.Running;
3 |
4 | namespace BenchmarkDotNet.Diagnosers
5 | {
6 | internal interface IHardwareCountersDiagnoser : IDiagnoser
7 | {
8 | IReadOnlyDictionary Results { get; }
9 | }
10 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Diagnosers/IProfiler.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Diagnosers
2 | {
3 | internal interface IProfiler : IDiagnoser
4 | {
5 | string ShortName { get; }
6 | }
7 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Diagnosers/MemoryDiagnoserConfig.cs:
--------------------------------------------------------------------------------
1 | using JetBrains.Annotations;
2 |
3 | namespace BenchmarkDotNet.Diagnosers
4 | {
5 | public class MemoryDiagnoserConfig
6 | {
7 | /// Display Garbage Collections per Generation columns (Gen 0, Gen 1, Gen 2). True by default.
8 | [PublicAPI]
9 | public MemoryDiagnoserConfig(bool displayGenColumns = true)
10 | {
11 | DisplayGenColumns = displayGenColumns;
12 | }
13 |
14 | public bool DisplayGenColumns { get; }
15 | }
16 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Diagnosers/RunMode.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Diagnosers
2 | {
3 | public enum RunMode : byte
4 | {
5 | ///
6 | /// given diagnoser should not be executed for given benchmark
7 | ///
8 | None,
9 | ///
10 | /// needs extra run of the benchmark
11 | ///
12 | ExtraRun,
13 | ///
14 | /// no overhead, can be executed without extra run
15 | ///
16 | NoOverhead,
17 | ///
18 | /// implements some separate logic, that can be executed at any time
19 | ///
20 | SeparateLogic
21 | }
22 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Disassemblers/DisassemblySyntax.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Diagnosers
2 | {
3 | public enum DisassemblySyntax
4 | {
5 | ///
6 | /// Indicates a disassembler should use MASM syntax for generated assembly code
7 | ///
8 | Masm,
9 | ///
10 | /// Indicates a disassembler should use Intel syntax for generated assembly code.
11 | ///
12 | Intel,
13 | ///
14 | /// Indicates a disassembler should use AT&T syntax for generated assembly code.
15 | ///
16 | Att
17 | }
18 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Engines/IEngineFactory.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Engines
2 | {
3 | public interface IEngineFactory
4 | {
5 | IEngine CreateReadyToRun(EngineParameters engineParameters);
6 | }
7 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Engines/IHost.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics.CodeAnalysis;
3 |
4 | namespace BenchmarkDotNet.Engines
5 | {
6 | [SuppressMessage("ReSharper", "UnusedMember.Global")]
7 | public interface IHost : IDisposable
8 | {
9 | void Write(string message);
10 | void WriteLine();
11 | void WriteLine(string message);
12 |
13 | void SendSignal(HostSignal hostSignal);
14 | void SendError(string message);
15 |
16 | void ReportResults(RunResults runResults);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Engines/IterationMode.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Engines
2 | {
3 | public enum IterationMode
4 | {
5 | Overhead,
6 |
7 | Workload,
8 |
9 | Unknown
10 | }
11 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Engines/IterationStage.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Engines
2 | {
3 | public enum IterationStage
4 | {
5 | Jitting,
6 |
7 | ///
8 | ///
9 | ///
10 | Pilot,
11 |
12 | Warmup,
13 |
14 | Actual,
15 |
16 | Result,
17 |
18 | Unknown
19 | }
20 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Engines/RunStrategyExtensions.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Engines
2 | {
3 | public static class RunStrategyExtensions
4 | {
5 | public static bool NeedsJitting(this RunStrategy runStrategy) => runStrategy == RunStrategy.Throughput;
6 | }
7 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Environments/PowerPlan.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Environments
2 | {
3 | public enum PowerPlan
4 | {
5 | HighPerformance,
6 | UserPowerPlan,
7 | PowerSaver,
8 | Balanced,
9 | UltimatePerformance
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Environments/Runtimes/CoreRtRuntime.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace BenchmarkDotNet.Environments
4 | {
5 | [Obsolete("Please use NativeAotRuntime instead.", true)]
6 | public class CoreRtRuntime
7 | {
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Environments/Runtimes/CustomRuntime.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Jobs;
2 |
3 | namespace BenchmarkDotNet.Environments
4 | {
5 | public abstract class CustomRuntime : Runtime
6 | {
7 | protected CustomRuntime(RuntimeMoniker runtimeMoniker, string msBuildMoniker, string displayName)
8 | : base(runtimeMoniker, msBuildMoniker, displayName)
9 | {
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Exporters/Csv/CsvSeparator.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Exporters.Csv
2 | {
3 | public enum CsvSeparator
4 | {
5 | ///
6 | /// ',' will be used as the CSV separator.
7 | ///
8 | Comma,
9 |
10 | ///
11 | /// ';' will be used as the CSV separator.
12 | ///
13 | Semicolon,
14 |
15 | ///
16 | ///
17 | ///
18 | CurrentCulture
19 | }
20 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Exporters/IExporter.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using BenchmarkDotNet.Loggers;
3 | using BenchmarkDotNet.Reports;
4 |
5 | namespace BenchmarkDotNet.Exporters
6 | {
7 | public interface IExporter
8 | {
9 | string Name { get; }
10 |
11 | void ExportToLog(Summary summary, ILogger logger);
12 | IEnumerable ExportToFiles(Summary summary, ILogger consoleLogger);
13 | }
14 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Exporters/IExporterDependencies.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace BenchmarkDotNet.Exporters
4 | {
5 | ///
6 | /// This is an internal interface, it allows Exporters to specify that
7 | /// they depends on another Exporter (see RPlotExporter for example)
8 | ///
9 | internal interface IExporterDependencies
10 | {
11 | IEnumerable Dependencies { get; }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Exporters/PerfonarJsonExporter.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Loggers;
2 | using BenchmarkDotNet.Reports;
3 | using Perfolizer.Json;
4 |
5 | namespace BenchmarkDotNet.Exporters;
6 |
7 | ///
8 | /// IMPORTANT: Not fully implemented yet
9 | ///
10 | internal class PerfonarJsonExporter(LightJsonSettings? jsonSettings = null) : ExporterBase
11 | {
12 | protected override string FileExtension => "perfonar.json";
13 |
14 | public override void ExportToLog(Summary summary, ILogger logger)
15 | {
16 | logger.WriteLine(LightJsonSerializer.Serialize(summary.ToPerfonar(), jsonSettings));
17 | }
18 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Exporters/Xml/IXmlSerializer.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Exporters.Xml
2 | {
3 | internal interface IXmlSerializer
4 | {
5 | void Serialize(IXmlWriter writer, object source);
6 | }
7 |
8 | internal interface IXmlWriter
9 | {
10 | void WriteStartDocument();
11 | void WriteEndDocument();
12 | void WriteStartElement(string localName);
13 | void WriteEndElement();
14 | void WriteElementString(string localName, string value);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Extensions/DoubleExtensions.cs:
--------------------------------------------------------------------------------
1 | using System.Globalization;
2 |
3 | namespace BenchmarkDotNet.Extensions
4 | {
5 | internal static class DoubleExtensions
6 | {
7 | public static string ToInvariantString(this double value) => value.ToString(CultureInfo.InvariantCulture);
8 | public static string ToInvariantString(this double value, string format) => value.ToString(format, CultureInfo.InvariantCulture);
9 | }
10 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Extensions/EncodingExtensions.cs:
--------------------------------------------------------------------------------
1 | using System.Text;
2 |
3 | namespace BenchmarkDotNet.Extensions
4 | {
5 | internal static class EncodingExtensions
6 | {
7 | internal static string ToTemplateString(this Encoding encoding)
8 | {
9 | const string result = "System.Text.Encoding.";
10 | switch (encoding)
11 | {
12 | case UnicodeEncoding u:
13 | return result + u.EncodingName;
14 | default:
15 | return result + "ASCII";
16 | }
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Extensions/MathExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace BenchmarkDotNet.Extensions;
4 |
5 | internal static class MathExtensions
6 | {
7 | public static int RoundToInt(this double x) => (int)Math.Round(x);
8 | public static long RoundToLong(this double x) => (long)Math.Round(x);
9 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Filters/AllCategoriesFilter.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 | using BenchmarkDotNet.Running;
3 |
4 | namespace BenchmarkDotNet.Filters
5 | {
6 | ///
7 | /// Filter benchmarks which have all the target categories
8 | ///
9 | public class AllCategoriesFilter : IFilter
10 | {
11 | private readonly string[] targetCategories;
12 |
13 | public AllCategoriesFilter(string[] targetCategories) => this.targetCategories = targetCategories;
14 |
15 | public bool Predicate(BenchmarkCase benchmarkCase) => targetCategories.All(c => benchmarkCase.Descriptor.HasCategory(c));
16 | }
17 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Filters/AnyCategoriesFilter.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 | using BenchmarkDotNet.Running;
3 |
4 | namespace BenchmarkDotNet.Filters
5 | {
6 | ///
7 | /// Filter benchmarks which have any of the target categories
8 | ///
9 | public class AnyCategoriesFilter : IFilter
10 | {
11 | private readonly string[] targetCategories;
12 |
13 | public AnyCategoriesFilter(string[] targetCategories) => this.targetCategories = targetCategories;
14 |
15 | public bool Predicate(BenchmarkCase benchmarkCase) => targetCategories.Any(c => benchmarkCase.Descriptor.HasCategory(c));
16 | }
17 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Filters/DisjunctionFilter.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 | using BenchmarkDotNet.Running;
3 |
4 | namespace BenchmarkDotNet.Filters
5 | {
6 | public class DisjunctionFilter : IFilter
7 | {
8 | private readonly IFilter[] filters;
9 |
10 | public DisjunctionFilter(params IFilter[] filters) => this.filters = filters;
11 |
12 | public bool Predicate(BenchmarkCase benchmarkCase) => filters.Any(filter => filter.Predicate(benchmarkCase));
13 | }
14 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Filters/IFilter.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Running;
2 |
3 | namespace BenchmarkDotNet.Filters
4 | {
5 | public interface IFilter
6 | {
7 | bool Predicate(BenchmarkCase benchmarkCase);
8 | }
9 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Filters/NameFilter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace BenchmarkDotNet.Filters
4 | {
5 | public class NameFilter : SimpleFilter
6 | {
7 | public NameFilter(Func predicate) : base(b => predicate(b.Descriptor.WorkloadMethod.Name)) { }
8 | }
9 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Filters/SimpleFilter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using BenchmarkDotNet.Running;
3 | using JetBrains.Annotations;
4 |
5 | namespace BenchmarkDotNet.Filters
6 | {
7 | public class SimpleFilter : IFilter
8 | {
9 | private readonly Func predicate;
10 |
11 | [PublicAPI]
12 | public SimpleFilter(Func predicate) => this.predicate = predicate;
13 |
14 | [PublicAPI]
15 | public bool Predicate(BenchmarkCase benchmarkCase) => predicate(benchmarkCase);
16 | }
17 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Filters/UnionFilter.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 | using BenchmarkDotNet.Running;
3 |
4 | namespace BenchmarkDotNet.Filters
5 | {
6 | public class UnionFilter : IFilter
7 | {
8 | private readonly IFilter[] filters;
9 |
10 | public UnionFilter(params IFilter[] filters) => this.filters = filters;
11 |
12 | public bool Predicate(BenchmarkCase benchmarkCase) => filters.All(filter => filter.Predicate(benchmarkCase));
13 | }
14 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Helpers/AsciiHelper.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Helpers
2 | {
3 | internal static class AsciiHelper
4 | {
5 | ///
6 | /// The 'μ' symbol
7 | ///
8 | private const string Mu = "\u03BC";
9 |
10 | public static string ToAscii(this string? s)
11 | {
12 | // We should replace all non-ASCII symbols that used in BenchmarkDotNet by ASCII-compatible analogues
13 | return s?.Replace(Mu, "u");
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Helpers/Assertion.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using JetBrains.Annotations;
3 |
4 | namespace BenchmarkDotNet.Helpers;
5 |
6 | internal static class Assertion
7 | {
8 | [AssertionMethod]
9 | public static void NotNull(string name, object? value)
10 | {
11 | if (value == null)
12 | throw new ArgumentNullException(name, $"{name} can't be null");
13 | }
14 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Helpers/DefaultCultureInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Globalization;
2 |
3 | namespace BenchmarkDotNet.Helpers
4 | {
5 | internal static class DefaultCultureInfo
6 | {
7 | public static readonly CultureInfo Instance;
8 |
9 | static DefaultCultureInfo()
10 | {
11 | Instance = (CultureInfo) CultureInfo.InvariantCulture.Clone();
12 | Instance.NumberFormat.NumberDecimalSeparator = ".";
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Helpers/UnitHelper.cs:
--------------------------------------------------------------------------------
1 | using Perfolizer.Horology;
2 | using Perfolizer.Metrology;
3 |
4 | namespace BenchmarkDotNet.Helpers;
5 |
6 | public static class UnitHelper
7 | {
8 | public static readonly UnitPresentation DefaultPresentation = new (true, 0, gap: true);
9 |
10 | public static string ToDefaultString(this TimeInterval timeInterval, string? format = null) => timeInterval.ToString(format, null, DefaultPresentation);
11 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Helpers/XUnitHelper.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 |
4 | namespace BenchmarkDotNet.Helpers;
5 |
6 | internal static class XUnitHelper
7 | {
8 | public static Lazy IsIntegrationTest =
9 | new (() => AppDomain.CurrentDomain.GetAssemblies().Any(assembly => assembly.GetName().Name == "BenchmarkDotNet.IntegrationTests"));
10 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Jobs/JobMode`1.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Characteristics;
2 | using JetBrains.Annotations;
3 |
4 | namespace BenchmarkDotNet.Jobs
5 | {
6 | public abstract class JobMode : CharacteristicObject where T : JobMode, new()
7 | {
8 | public static readonly T Default = new T().Freeze();
9 |
10 | protected JobMode() { }
11 |
12 | protected JobMode(string? id) : base(id) { }
13 |
14 | [PublicAPI] public Job Job => OwnerOrSelf as Job;
15 | }
16 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Loggers/ILogger.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Loggers
2 | {
3 | public interface ILogger
4 | {
5 | string Id { get; }
6 |
7 | ///
8 | /// If there are several loggers with the same ,
9 | /// only logger with the highest priority will be used.
10 | ///
11 | int Priority { get; }
12 |
13 | void Write(LogKind logKind, string text);
14 |
15 | void WriteLine();
16 |
17 | void WriteLine(LogKind logKind, string text);
18 |
19 | void Flush();
20 | }
21 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Loggers/LogKind.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Loggers
2 | {
3 | public enum LogKind
4 | {
5 | Default, Help, Header, Result, Statistic, Info, Error, Hint, Warning
6 | }
7 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Loggers/NullLogger.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Loggers
2 | {
3 | public class NullLogger : ILogger
4 | {
5 | public static readonly ILogger Instance = new NullLogger();
6 |
7 | private NullLogger() { }
8 |
9 | public string Id => nameof(NullLogger);
10 | public int Priority => 0;
11 | public void Write(LogKind logKind, string text) { }
12 |
13 | public void WriteLine() { }
14 |
15 | public void WriteLine(LogKind logKind, string text) { }
16 |
17 | public void Flush() { }
18 | }
19 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Loggers/StreamLogger.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using JetBrains.Annotations;
3 |
4 | namespace BenchmarkDotNet.Loggers
5 | {
6 | public class StreamLogger : TextLogger
7 | {
8 | public StreamLogger(StreamWriter writer) : base(writer) { }
9 |
10 | [PublicAPI]
11 | public StreamLogger(string filePath, bool append = false)
12 | : this(new StreamWriter(filePath, append))
13 | { }
14 |
15 | public override string Id => nameof(StreamLogger);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Mathematics/MathHelper.cs:
--------------------------------------------------------------------------------
1 | using Perfolizer.Mathematics.Common;
2 | using Perfolizer.Metrology;
3 | using static System.Math;
4 |
5 | namespace BenchmarkDotNet.Mathematics
6 | {
7 | internal static class MathHelper
8 | {
9 | public static readonly Threshold DefaultThreshold = PercentValue.Of(2).ToThreshold();
10 | public static readonly SignificanceLevel DefaultSignificanceLevel = SignificanceLevel.P1E5;
11 | public static int Clamp(int value, int min, int max) => Min(Max(value, min), max);
12 | }
13 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Mathematics/NumeralSystem.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Mathematics
2 | {
3 | public enum NumeralSystem
4 | {
5 | ///
6 | /// Arabic numerals (1, 2, 3, 4, ...)
7 | ///
8 | Arabic,
9 |
10 | ///
11 | /// Roman numerals (I, II, III, IV, ...)
12 | ///
13 | Roman,
14 |
15 | ///
16 | /// Unary numeral system (*, **, ***, ****, ...)
17 | ///
18 | Stars
19 | }
20 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Models/BdnEnvironment.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Environments;
2 | using BenchmarkDotNet.Jobs;
3 | using Perfolizer.Models;
4 |
5 | namespace BenchmarkDotNet.Models;
6 |
7 | internal class BdnEnvironment : EnvironmentInfo
8 | {
9 | public RuntimeMoniker? Runtime { get; set; }
10 | public Jit? Jit { get; set; }
11 | public int? Affinity { get; set; }
12 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Models/BdnHostInfo.cs:
--------------------------------------------------------------------------------
1 | using Perfolizer.Models;
2 |
3 | namespace BenchmarkDotNet.Models;
4 |
5 | internal class BdnHostInfo : HostInfo
6 | {
7 | public string RuntimeVersion { get; set; } = "";
8 | public bool HasAttachedDebugger { get; set; }
9 | public bool HasRyuJit { get; set; }
10 | public string Configuration { get; set; } = "";
11 | public string DotNetSdkVersion { get; set; } = "";
12 | public double ChronometerFrequency { get; set; }
13 | public string HardwareTimerKind { get; set; } = "";
14 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Models/BdnSchema.cs:
--------------------------------------------------------------------------------
1 | using Perfolizer.Perfonar.Base;
2 |
3 | namespace BenchmarkDotNet.Models;
4 |
5 | internal class BdnSchema : PerfonarSchema
6 | {
7 | public static readonly BdnSchema Instance = new ();
8 |
9 | private BdnSchema() : base("bdn")
10 | {
11 | Add();
12 | Add();
13 | Add();
14 | Add();
15 | Add();
16 | }
17 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Order/MethodOrderPolicy.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Order
2 | {
3 | public enum MethodOrderPolicy
4 | {
5 | Alphabetical, Declared
6 | }
7 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Order/SummaryOrderPolicy.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Order
2 | {
3 | public enum SummaryOrderPolicy
4 | {
5 | Default, FastestToSlowest, SlowestToFastest, Method, Declared
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Portability/Antivirus.cs:
--------------------------------------------------------------------------------
1 | using JetBrains.Annotations;
2 |
3 | namespace BenchmarkDotNet.Portability
4 | {
5 | public class Antivirus
6 | {
7 | public Antivirus(string name, string path)
8 | {
9 | Name = name;
10 | Path = path;
11 | }
12 |
13 | [PublicAPI] public string Name { get; }
14 | [PublicAPI] public string Path { get; }
15 |
16 | public override string ToString() => $"{Name} ({Path})";
17 | }
18 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Portability/CodeGen.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | namespace BenchmarkDotNet.Portability
5 | {
6 | public static class CodeGenHelper
7 | {
8 | // AggressiveOptimization is not available in netstandard2.0, so just use the value casted to enum.
9 | public const MethodImplOptions AggressiveOptimizationOption = (MethodImplOptions) 512;
10 | public const MethodImplAttributes AggressiveOptimizationOptionForEmit = (MethodImplAttributes) 512;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Portability/HyperV.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Portability
2 | {
3 | public class HyperV : VirtualMachineHypervisor
4 | {
5 | public static HyperV Default { get; } = new HyperV();
6 |
7 | private HyperV() { }
8 |
9 | public override string Name => "Hyper-V";
10 |
11 | public override bool IsVirtualMachine(string manufacturer, string model)
12 | {
13 | return ContainsVmIdentifier(manufacturer, "microsoft") && ContainsVmIdentifier(model, "virtual");
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Portability/StringExtensions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace BenchmarkDotNet.Portability
4 | {
5 | internal static class StringExtensions
6 | {
7 | internal static bool EqualsWithIgnoreCase(this string left, string right) => left != null && left.Equals(right, StringComparison.InvariantCultureIgnoreCase);
8 |
9 | internal static bool ContainsWithIgnoreCase(this string text, string word) => text != null && text.IndexOf(word, StringComparison.InvariantCultureIgnoreCase) >= 0;
10 | }
11 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Portability/VMware.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Portability
2 | {
3 | public class VMware : VirtualMachineHypervisor
4 | {
5 | public static VMware Default { get; } = new VMware();
6 |
7 | private VMware() { }
8 |
9 | public override string Name => "VMware";
10 |
11 | public override bool IsVirtualMachine(string manufacturer, string model)
12 | {
13 | return ContainsVmIdentifier(model, "vmware");
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Portability/VirtualBox.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Portability
2 | {
3 | public class VirtualBox : VirtualMachineHypervisor
4 | {
5 | public static VirtualBox Default { get; } = new VirtualBox();
6 |
7 | private VirtualBox() { }
8 |
9 | public override string Name => "VirtualBox";
10 |
11 | public override bool IsVirtualMachine(string manufacturer, string model)
12 | {
13 | return ContainsVmIdentifier(model, "virtualbox");
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Portability/VirtualMachineHypervisor.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Portability
2 | {
3 | public abstract class VirtualMachineHypervisor
4 | {
5 | public abstract string Name { get; }
6 |
7 | public abstract bool IsVirtualMachine(string manufacturer, string model);
8 |
9 | protected static bool ContainsVmIdentifier(string systemInformation, string vmIdentifier)
10 | {
11 | return systemInformation != null && systemInformation.ContainsWithIgnoreCase(vmIdentifier);
12 | }
13 | }
14 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Running/BenchmarkBuildInfo.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Configs;
2 |
3 | namespace BenchmarkDotNet.Running
4 | {
5 | public class BenchmarkBuildInfo
6 | {
7 | public BenchmarkBuildInfo(BenchmarkCase benchmarkCase, ImmutableConfig config, int id)
8 | {
9 | BenchmarkCase = benchmarkCase;
10 | Config = config;
11 | Id = new BenchmarkId(id, benchmarkCase);
12 | }
13 |
14 | public BenchmarkCase BenchmarkCase { get; }
15 |
16 | public ImmutableConfig Config { get; }
17 |
18 | public BenchmarkId Id { get; }
19 | }
20 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Running/ICategoryDiscoverer.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 |
3 | namespace BenchmarkDotNet.Running
4 | {
5 | public interface ICategoryDiscoverer
6 | {
7 | string[] GetCategories(MethodInfo method);
8 | }
9 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Running/IUserInteraction.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using BenchmarkDotNet.Loggers;
4 |
5 | namespace BenchmarkDotNet.Running
6 | {
7 | internal interface IUserInteraction
8 | {
9 | void PrintNoBenchmarksError(ILogger logger);
10 |
11 | void PrintWrongFilterInfo(IReadOnlyList allTypes, ILogger logger, string[] userFilters);
12 |
13 | IReadOnlyList AskUser(IReadOnlyList allTypes, ILogger logger);
14 | }
15 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Running/InvalidBenchmarkDeclarationException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace BenchmarkDotNet.Running
4 | {
5 | public class InvalidBenchmarkDeclarationException : Exception
6 | {
7 | public InvalidBenchmarkDeclarationException(string message) : base(message) { }
8 | }
9 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Running/WakeLock.SafePowerHandle.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Win32.SafeHandles;
2 |
3 | namespace BenchmarkDotNet.Running;
4 |
5 | internal partial class WakeLock
6 | {
7 | private sealed class SafePowerHandle : SafeHandleZeroOrMinusOneIsInvalid
8 | {
9 | private SafePowerHandle() : base(true) { }
10 |
11 | protected override bool ReleaseHandle() => PInvoke.CloseHandle(handle);
12 | }
13 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Templates/WasmLinkerDescription.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Toolchains/CoreRt/CoreRtToolchain.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace BenchmarkDotNet.Toolchains.CoreRt
4 | {
5 | [Obsolete("Please use NativeAotToolchain instead.", true)]
6 | public class CoreRtToolchain
7 | {
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Toolchains/CoreRt/CoreRtToolchainBuilder.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace BenchmarkDotNet.Toolchains.CoreRt
4 | {
5 | [Obsolete("Please use NativeAotToolchainBuilder instead.", true)]
6 | public class CoreRtToolchainBuilder
7 | {
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Toolchains/IBuilder.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Loggers;
2 | using BenchmarkDotNet.Running;
3 | using BenchmarkDotNet.Toolchains.Results;
4 |
5 | namespace BenchmarkDotNet.Toolchains
6 | {
7 | public interface IBuilder
8 | {
9 | BuildResult Build(GenerateResult generateResult, BuildPartition buildPartition, ILogger logger);
10 | }
11 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Toolchains/IExecutor.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Toolchains.Parameters;
2 | using BenchmarkDotNet.Toolchains.Results;
3 |
4 | namespace BenchmarkDotNet.Toolchains
5 | {
6 | public interface IExecutor
7 | {
8 | ExecuteResult Execute(ExecuteParameters executeParameters);
9 | }
10 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Toolchains/IGenerator.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Loggers;
2 | using BenchmarkDotNet.Running;
3 | using BenchmarkDotNet.Toolchains.Results;
4 |
5 | namespace BenchmarkDotNet.Toolchains
6 | {
7 | public interface IGenerator
8 | {
9 | GenerateResult GenerateProject(BuildPartition buildPartition, ILogger logger, string rootArtifactsFolderPath);
10 | }
11 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Toolchains/IToolchain.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using BenchmarkDotNet.Characteristics;
3 | using BenchmarkDotNet.Running;
4 | using BenchmarkDotNet.Validators;
5 | using JetBrains.Annotations;
6 |
7 | namespace BenchmarkDotNet.Toolchains
8 | {
9 | public interface IToolchain
10 | {
11 | [PublicAPI] string Name { get; }
12 | IGenerator Generator { get; }
13 | IBuilder Builder { get; }
14 | IExecutor Executor { get; }
15 | bool IsInProcess { get; }
16 |
17 | IEnumerable Validate(BenchmarkCase benchmarkCase, IResolver resolver);
18 | }
19 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Toolchains/InProcess/Emit/Implementation/Emitters/VoidConsumeEmitter.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection.Emit;
2 |
3 | namespace BenchmarkDotNet.Toolchains.InProcess.Emit.Implementation
4 | {
5 | internal class VoidConsumeEmitter : ConsumeEmitter
6 | {
7 | public VoidConsumeEmitter(ConsumableTypeInfo consumableTypeInfo) : base(consumableTypeInfo)
8 | {
9 | }
10 |
11 | protected override void EmitDisassemblyDiagnoserReturnDefaultOverride(ILGenerator ilBuilder)
12 | {
13 | /*
14 | IL_0001: ret
15 | */
16 | ilBuilder.Emit(OpCodes.Ret);
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Toolchains/InProcess/Emit/Implementation/RunnableActionKind.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Toolchains.InProcess.Emit.Implementation
2 | {
3 | public enum RunnableActionKind
4 | {
5 | Overhead,
6 | Workload
7 | }
8 | }
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Toolchains/MonoAotLLVM/MonoAotCompilerMode.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Toolchains.MonoAotLLVM
2 | {
3 | public enum MonoAotCompilerMode
4 | {
5 | mini = 0, // default
6 | llvm,
7 | wasm
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/src/BenchmarkDotNet/Validators/IValidator.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace BenchmarkDotNet.Validators
4 | {
5 | public interface IValidator
6 | {
7 | bool TreatsWarningsAsErrors { get; }
8 |
9 | IEnumerable Validate(ValidationParameters validationParameters);
10 | }
11 | }
--------------------------------------------------------------------------------
/templates/install-from-source.sh:
--------------------------------------------------------------------------------
1 | # Run only from the folder where the shell script is located!
2 |
3 | dotnet build BenchmarkDotNet.Templates.csproj -c Release
4 | dotnet pack BenchmarkDotNet.Templates.csproj -c Release
5 |
6 | # If we install the templates via a folder path, then it will have a different ID (ID=folder path).
7 | # It will conflict with BDN templates from nuget.
8 | # We need to install the templates via a FILE path in order to update the template from nuget.
9 |
10 | nupkg_path=$(find . -name "BenchmarkDotNet.Templates*.nupkg")
11 |
12 | dotnet new uninstall "BenchmarkDotNet.Templates"
13 | dotnet new install $nupkg_path
14 |
--------------------------------------------------------------------------------
/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.CSharp/.template.config/dotnetcli.host.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/dotnetcli.host",
3 | "symbolInfo": {
4 | "skipRestore": {
5 | "longName": "no-restore",
6 | "shortName": ""
7 | },
8 | "consoleApp": {
9 | "longName": "console-app",
10 | "shortName": ""
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.CSharp/Program.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Configs;
2 | using BenchmarkDotNet.Running;
3 |
4 | namespace _BenchmarkProjectName_
5 | {
6 | public class Program
7 | {
8 | public static void Main(string[] args)
9 | {
10 | var config = DefaultConfig.Instance;
11 | var summary = BenchmarkRunner.Run<$(BenchmarkName)>(config, args);
12 |
13 | // Use this to select benchmarks from the console:
14 | // var summaries = BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args, config);
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.CSharp/_BenchmarkName_.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using BenchmarkDotNet;
3 | using BenchmarkDotNet.Attributes;
4 |
5 | namespace _BenchmarkProjectName_
6 | {
7 | #if(config)
8 | [Config(typeof(BenchmarkConfig))]
9 | #endif
10 | public class $(BenchmarkName)
11 | {
12 | [Benchmark]
13 | public void Scenario1()
14 | {
15 | // Implement your benchmark here
16 | }
17 |
18 | [Benchmark]
19 | public void Scenario2()
20 | {
21 | // Implement your benchmark here
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.FSharp/.template.config/dotnetcli.host.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/dotnetcli.host",
3 | "symbolInfo": {
4 | "skipRestore": {
5 | "longName": "no-restore",
6 | "shortName": ""
7 | },
8 | "consoleApp": {
9 | "longName": "console-app",
10 | "shortName": ""
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.FSharp/BenchmarkConfig.fs:
--------------------------------------------------------------------------------
1 | module Configs
2 |
3 | open BenchmarkDotNet.Configs
4 | open BenchmarkDotNet.Diagnosers
5 | open BenchmarkDotNet.Exporters
6 | open BenchmarkDotNet.Validators
7 |
8 | type BenchmarkConfig() as self =
9 |
10 | // Configure your benchmarks, see for more details: https://benchmarkdotnet.org/articles/configs/configs.html.
11 | inherit ManualConfig()
12 | do
13 | self
14 | .With(MemoryDiagnoser.Default)
15 | .With(MarkdownExporter.GitHub)
16 | .With(ExecutionValidator.FailOnError)
17 | |> ignore
18 |
--------------------------------------------------------------------------------
/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.FSharp/Program.fs:
--------------------------------------------------------------------------------
1 | open System
2 | open BenchmarkDotNet.Running
3 | open _BenchmarkProjectName_
4 |
5 | []
6 | let main argv =
7 | BenchmarkRunner.Run<$(BenchmarkName)>() |> ignore
8 | 0 // return an integer exit code
--------------------------------------------------------------------------------
/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.VB/.template.config/dotnetcli.host.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/dotnetcli.host",
3 | "symbolInfo": {
4 | "skipRestore": {
5 | "longName": "no-restore",
6 | "shortName": ""
7 | },
8 | "consoleApp": {
9 | "longName": "console-app",
10 | "shortName": ""
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.VB/Program.vb:
--------------------------------------------------------------------------------
1 | Imports System
2 | Imports BenchmarkDotNet.Running
3 |
4 | Namespace _BenchmarkProjectName_
5 | Module Program
6 | Sub Main(args As String())
7 | Dim summary = BenchmarkRunner.Run(Of $(BenchmarkName))()
8 | End Sub
9 | End Module
10 | End Namespace
11 |
--------------------------------------------------------------------------------
/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.VB/_BenchmarkName_.vb:
--------------------------------------------------------------------------------
1 | Imports System
2 | Imports BenchmarkDotNet
3 | Imports BenchmarkDotNet.Attributes
4 |
5 | Namespace _BenchmarkProjectName_
6 |
7 | #If config Then
8 |
9 | #End If
10 | Public Class $(BenchmarkName)
11 |
12 | Public Sub Scenario1()
13 |
14 | ' Implement your benchmark here
15 |
16 | End Sub
17 |
18 |
19 | Public Sub Scenario2()
20 |
21 | ' Implement your benchmark here
22 |
23 | End Sub
24 | End Class
25 | End Namespace
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests.ConfigPerAssembly/AssemblyConfigBenchmarks.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Attributes;
2 |
3 | namespace BenchmarkDotNet.IntegrationTests.ConfigPerAssembly
4 | {
5 | [DryJob]
6 | public class AssemblyConfigBenchmarks
7 | {
8 | [Benchmark]
9 | public void Foo()
10 | {
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests.ConfigPerAssembly/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.IntegrationTests.ConfigPerAssembly;
2 |
3 | [assembly: AssemblyConfig]
4 |
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests.CustomPaths/BenchmarksThatReturnTypeFromCustomPathDll.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Attributes;
2 | using VerySimple;
3 |
4 | namespace BenchmarkDotNet.IntegrationTests.CustomPaths
5 | {
6 | public class BenchmarksThatReturnTypeFromCustomPathDll
7 | {
8 | [Benchmark]
9 | public SingleClass Benchmark() => new SingleClass();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests.CustomPaths/BenchmarksThatUseTypeFromCustomPathDll.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Attributes;
2 | using VerySimple;
3 |
4 | namespace BenchmarkDotNet.IntegrationTests.CustomPaths
5 | {
6 | public class BenchmarksThatUseTypeFromCustomPathDll
7 | {
8 | [Benchmark]
9 | public string Benchmark() => new SingleClass().ToString();
10 | }
11 | }
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests.CustomPaths/BenchmarksThatUsesFileFromOutput.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using BenchmarkDotNet.Attributes;
4 |
5 | namespace BenchmarkDotNet.IntegrationTests.CustomPaths
6 | {
7 | public class BenchmarksThatUsesFileFromOutput
8 | {
9 | [Benchmark]
10 | public void Verify()
11 | {
12 | if (!File.Exists(Path.Combine(Directory.GetCurrentDirectory(), "ShouldGetCopied.xml")))
13 | {
14 | throw new InvalidOperationException("the file did not get copied");
15 | }
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests.CustomPaths/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.InteropServices;
2 |
3 | [assembly: Guid("0031728e-a5d4-47c1-9c1a-6c859a765c9d")]
4 |
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests.CustomPaths/ShouldGetCopied.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests.CustomPaths/customPath/VerySimple.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dotnet/BenchmarkDotNet/93d12c42c0adbc33702cdc42e1fc494d2c919208/tests/BenchmarkDotNet.IntegrationTests.CustomPaths/customPath/VerySimple.dll
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests.DisabledOptimizations/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.InteropServices;
2 |
3 | [assembly: Guid("ac2188e5-a140-43e2-8a76-4bdabfe30aba")]
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests.EnabledOptimizations/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.InteropServices;
2 |
3 | [assembly: Guid("873581ff-db9d-42e5-8f11-32a4b7bb28ec")]
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests.ManualRunning/xunit.runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadowCopy": false,
3 | "methodDisplay": "method",
4 | "diagnosticMessages": true,
5 | "longRunningTestSeconds": 30
6 | }
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests.Static/BenchmarkClassWithStaticMethod.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Attributes;
2 |
3 | namespace BenchmarkDotNet.IntegrationTests.Static
4 | {
5 | [DryJob]
6 | public class BenchmarkClassWithStaticMethodsOnly
7 | {
8 | [Benchmark]
9 | public static void StaticMethod() { }
10 | }
11 |
12 | [DryJob]
13 | public class BenchmarkClassWithInstanceMethod
14 | {
15 | [Benchmark]
16 | public void NonStaticMethod() { }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests.VisualBasic/BenchmarkDotNet.IntegrationTests.VisualBasic.vbproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | true
5 |
6 |
7 |
8 | net462;net8.0
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests.VisualBasic/Sample.vb:
--------------------------------------------------------------------------------
1 | Imports BenchmarkDotNet.Attributes
2 |
3 | Public Class Sample
4 |
5 | Public Property A As Integer
6 |
7 | Public Property B As Integer
8 |
9 |
10 | Public Function Benchmark() As Integer
11 | return A + B
12 | End Function
13 | End Class
14 |
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests/AppBundle/test-main.js:
--------------------------------------------------------------------------------
1 | // Licensed to the .NET Foundation under one or more agreements.
2 | // The .NET Foundation licenses this file to you under the MIT license.
3 |
4 | import { dotnet } from './_framework/dotnet.js'
5 |
6 | await dotnet
7 | .withDiagnosticTracing(false)
8 | .withApplicationArguments(...arguments)
9 | .run()
10 |
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests/AssemblyConfigTests.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.IntegrationTests.ConfigPerAssembly;
2 | using Xunit;
3 | using Xunit.Abstractions;
4 |
5 | namespace BenchmarkDotNet.IntegrationTests
6 | {
7 | public class AssemblyConfigTests : BenchmarkTestExecutor
8 | {
9 | public AssemblyConfigTests(ITestOutputHelper output) : base(output) { }
10 |
11 | [Fact]
12 | public void ConfigCanBeSetPerAssembly()
13 | {
14 | CanExecute();
15 |
16 | Assert.True(AssemblyConfigAttribute.IsActivated);
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests/ContinuousIntegration.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Portability;
2 | using System;
3 | using BenchmarkDotNet.Detectors;
4 |
5 | namespace BenchmarkDotNet.IntegrationTests
6 | {
7 | internal static class ContinuousIntegration
8 | {
9 | private static bool IsGitHubActions() => !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("GITHUB_ACTION"));
10 |
11 | internal static bool IsGitHubActionsOnWindows()
12 | => OsDetector.IsWindows() && IsGitHubActions();
13 |
14 | internal static bool IsLocalRun() => !IsGitHubActions();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests/CopyToOutputTests.cs:
--------------------------------------------------------------------------------
1 | #if NETFRAMEWORK
2 | using BenchmarkDotNet.IntegrationTests.CustomPaths;
3 | using Xunit;
4 | using Xunit.Abstractions;
5 |
6 | namespace BenchmarkDotNet.IntegrationTests
7 | {
8 | public class CopyToOutputTests : BenchmarkTestExecutor
9 | {
10 | public CopyToOutputTests(ITestOutputHelper output) : base(output) { }
11 |
12 | [Fact]
13 | public void CopyToOutputIsSupported() => CanExecute();
14 | }
15 | }
16 | #endif
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests/FSharpTests.cs:
--------------------------------------------------------------------------------
1 | using Xunit;
2 | using Xunit.Abstractions;
3 | using static FSharpBenchmarks;
4 |
5 | namespace BenchmarkDotNet.IntegrationTests
6 | {
7 | public class FSharpTests : BenchmarkTestExecutor
8 | {
9 | public FSharpTests(ITestOutputHelper output) : base(output) { }
10 |
11 | [Fact]
12 | public void ParamsSupportFSharpEnums() => CanExecute();
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests/IntegrationTestSetupTests.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Helpers;
2 | using Xunit;
3 |
4 | namespace BenchmarkDotNet.IntegrationTests;
5 |
6 | public class IntegrationTestSetupTests
7 | {
8 | [Fact]
9 | public void IntegrationTestsAreDetected() => Assert.True(XUnitHelper.IsIntegrationTest.Value);
10 | }
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests/LanguageVersionTests.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Attributes;
2 | using Xunit;
3 | using Xunit.Abstractions;
4 |
5 | namespace BenchmarkDotNet.IntegrationTests
6 | {
7 | public class LanguageVersionTests : BenchmarkTestExecutor
8 | {
9 | public LanguageVersionTests(ITestOutputHelper output) : base(output) { }
10 |
11 | [Fact]
12 | public void WeSupportCsharp72() => CanExecute();
13 | }
14 |
15 | public class UsingCsharp7_2
16 | {
17 | private protected int fieldWithCsharp7_2_access = 7;
18 |
19 | [Benchmark]
20 | public ref int Benchmark() => ref fieldWithCsharp7_2_access;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests/PowerRequest.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.IntegrationTests;
2 |
3 | internal class PowerRequest(string requestType, string requesterType, string requesterName, string? reason)
4 | {
5 | public string RequestType { get; } = requestType;
6 | public string RequesterType { get; } = requesterType;
7 | public string RequesterName { get; } = requesterName;
8 | public string? Reason { get; } = reason;
9 | }
10 |
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.InteropServices;
2 | using Xunit;
3 |
4 | [assembly: Guid("74362bb1-9f64-4be5-b079-b4ac19dae5db")]
5 |
6 | [assembly: CollectionBehavior(CollectionBehavior.CollectionPerAssembly, DisableTestParallelization = true)]
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests/TestCultureInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Globalization;
2 | using BenchmarkDotNet.Helpers;
3 |
4 | namespace BenchmarkDotNet.IntegrationTests
5 | {
6 | internal static class TestCultureInfo
7 | {
8 | public static readonly CultureInfo Instance;
9 |
10 | static TestCultureInfo()
11 | {
12 | Instance = (CultureInfo) DefaultCultureInfo.Instance.Clone();
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests/Xunit/Constants.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.IntegrationTests.Xunit
2 | {
3 | public class Constants
4 | {
5 | public const string Category = "Category";
6 | public const string BackwardCompatibilityCategory = "BackwardCompatibility";
7 | }
8 | }
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests/Xunit/Extensions.cs:
--------------------------------------------------------------------------------
1 | using System.Linq;
2 | using BenchmarkDotNet.Reports;
3 |
4 | namespace BenchmarkDotNet.IntegrationTests.Xunit
5 | {
6 | public static class Extensions
7 | {
8 | public static void CheckPlatformLinkerIssues(this Summary summary)
9 | {
10 | if (summary.Reports.Any(r =>
11 | !r.BuildResult.IsBuildSuccess &&
12 | r.BuildResult.ErrorMessage.Contains("Platform linker not found")))
13 | throw new MisconfiguredEnvironmentException("Failed to build benchmarks because the platform linker not found");
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests/Xunit/MisconfiguredEnvironmentException.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace BenchmarkDotNet.IntegrationTests.Xunit
4 | {
5 | public class MisconfiguredEnvironmentException : Exception
6 | {
7 | public MisconfiguredEnvironmentException(string message) : base(message) { }
8 |
9 | public string SkipMessage => $"Skip this test because the environment is misconfigured ({Message})";
10 | }
11 | }
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests/runtimeconfig.template.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeOptions": {
3 | "configProperties": {
4 | "System.Runtime.TieredCompilation": false
5 | }
6 | }
7 | }
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.IntegrationTests/xunit.runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadowCopy": false,
3 | "methodDisplay": "method",
4 | "diagnosticMessages": true,
5 | "longRunningTestSeconds": 60,
6 | "parallelizeAssembly": false,
7 | "parallelizeTestCollections": false
8 | }
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.Tests/CharacteristicPresenterTests.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using BenchmarkDotNet.Extensions;
3 | using Xunit;
4 |
5 | namespace BenchmarkDotNet.Tests
6 | {
7 | public class CharacteristicPresenterTests
8 | {
9 | [Theory]
10 | [InlineData(1, 8, "00000001")]
11 | [InlineData(8, 8, "00001000")]
12 | [InlineData(0, 4, "0000")]
13 | public void ProcessorAffinityIsPrintedAsBitMask(int mask, int processorCount, string expectedResult)
14 | {
15 | Assert.Equal(expectedResult, ((IntPtr)mask).ToPresentation(processorCount));
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.Tests/Columns/TagColumnTests.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Columns;
2 | using Xunit;
3 |
4 | namespace BenchmarkDotNet.Tests.Columns
5 | {
6 | public class TagColumnTests
7 | {
8 | [Fact]
9 | public void TagColumnsHasDifferentIds() // #1146
10 | {
11 | var column1 = new TagColumn("A", _ => _);
12 | var column2 = new TagColumn("B", _ => _);
13 | Assert.NotEqual(column1.Id, column2.Id);
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.Tests/Exporters/VerifiedFiles/MarkdownExporterVerifyTests.GroupExporterTest_HideColumns_TableMarkDown.verified.txt:
--------------------------------------------------------------------------------
1 | === HideColumns_TableMarkDown ===
2 |
3 | BenchmarkDotNet v0.10.x-mock, Microsoft Windows NT 10.0.x.mock (Hyper-V)
4 | MockIntel Core i7-6700HQ CPU 2.60GHz (Max: 3.10GHz), 1 CPU, 8 logical and 4 physical cores
5 | Frequency: 2531248 Hz, Resolution: 395.062 ns, Timer: TSC
6 | [Host] : Clr 4.0.x.mock, 64mock RyuJIT-v4.6.x.mock CONFIGURATION
7 | DefaultJob : extra output line
8 |
9 | StdDev=8.80 ns
10 |
11 | Method | Mean | Error |
12 | ------- |---------:|--------:|
13 | Foo | 114.5 ns | 5.88 ns |
14 |
15 | Errors: 0
16 |
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.Tests/Infra/VerifyHelper.cs:
--------------------------------------------------------------------------------
1 | using VerifyTests;
2 |
3 | namespace BenchmarkDotNet.Tests.Infra;
4 |
5 | public static class VerifyHelper
6 | {
7 | public static VerifySettings Create(string? typeName = null)
8 | {
9 | var result = new VerifySettings();
10 | result.UseDirectory("VerifiedFiles");
11 | result.DisableDiff();
12 | if (typeName != null)
13 | result.UseTypeName(typeName);
14 | return result;
15 | }
16 | }
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.Tests/KnownIssue.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Tests
2 | {
3 | public class KnownIssue
4 | {
5 | public static KnownIssue Issue2299 => new (2299, "Non-supported Mono on Linux", false);
6 |
7 | public int Number { get; }
8 | public string Description { get; }
9 | public bool IsFixed { get; }
10 |
11 | public KnownIssue(int number, string description, bool isFixed)
12 | {
13 | Number = number;
14 | Description = description;
15 | IsFixed = isFixed;
16 | }
17 |
18 | public string IgnoreMessage => $"This test is ignored because of the issue #{Number} '{Description}'";
19 | }
20 | }
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.Tests/Mocks/MockClock.cs:
--------------------------------------------------------------------------------
1 | using Perfolizer.Horology;
2 |
3 | namespace BenchmarkDotNet.Tests.Mocks
4 | {
5 | public class MockClock : IClock
6 | {
7 | public MockClock(Frequency frequency)
8 | {
9 | Frequency = frequency;
10 | }
11 |
12 | public string Title => "Mock";
13 | public bool IsAvailable => true;
14 | public Frequency Frequency { get; }
15 |
16 | private long counter;
17 | public long GetTimestamp() => counter++;
18 | }
19 | }
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.Tests/Perfonar/Infra/PerfonarMock.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Properties;
2 | using Perfolizer.Models;
3 |
4 | namespace BenchmarkDotNet.Tests.Perfonar.Infra;
5 |
6 | public static class PerfonarMock
7 | {
8 | public static readonly EngineInfo Engine = new ()
9 | {
10 | Name = BenchmarkDotNetInfo.BenchmarkDotNetCaption,
11 | Version = "0.1729.0-mock"
12 | };
13 | }
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.Tests/Perfonar/VerifiedFiles/Perfonar.PerfonarIndexTest_key=sort01.verified.txt:
--------------------------------------------------------------------------------
1 | [Keys]
2 | .benchmark
3 | .benchmark.method
4 | .benchmark.type
5 | .iterationIndex
6 | .unit
7 | .value
8 |
9 | [Entry0]
10 | .benchmark = Bench.Foo
11 | .benchmark.method = Foo
12 | .benchmark.type = Bench
13 | .iterationIndex = 0
14 | .unit = ms
15 | .value = 10
16 | [Entry1]
17 | .benchmark = Bench.Bar
18 | .benchmark.method = Bar
19 | .benchmark.type = Bench
20 | .iterationIndex = 0
21 | .unit = ms
22 | .value = 20
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.Tests/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Runtime.InteropServices;
2 |
3 | [assembly: Guid("16c47abf-43e0-4db4-8151-36ca7a4082ae")]
4 |
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.Tests/Properties/BenchmarkDotNetInfoTests.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Properties;
2 | using Xunit;
3 |
4 | namespace BenchmarkDotNet.Tests.Properties;
5 |
6 | public class BenchmarkDotNetInfoTests
7 | {
8 | [Theory]
9 | [InlineData("", "")]
10 | [InlineData("1.2.3.4", "1.2.3.4")]
11 | [InlineData("1729-foo", "1729-foo")]
12 | [InlineData("0.13.9+228a464e8be6c580ad9408e98f18813f6407fb5a", "0.13.9")]
13 | [InlineData("1-2+3", "1-2")]
14 | public void RemoveVersionMetadata(string input, string expectedOutput)
15 | {
16 | string? actualOutput = BenchmarkDotNetInfo.RemoveVersionMetadata(input);
17 | Assert.Equal(expectedOutput, actualOutput);
18 | }
19 | }
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.Tests/Running/BenchmarkConverterTests.BAC_Partial_DifferentFiles.cs:
--------------------------------------------------------------------------------
1 | using BenchmarkDotNet.Attributes;
2 |
3 | namespace BenchmarkDotNet.Tests.Running
4 | {
5 | public partial class BenchmarkConverterTests
6 | {
7 | public partial class BAC_Partial_DifferentFiles
8 | {
9 | [Benchmark] public void B() { }
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.Tests/TestCultureInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Globalization;
2 | using BenchmarkDotNet.Helpers;
3 |
4 | namespace BenchmarkDotNet.Tests
5 | {
6 | internal static class TestCultureInfo
7 | {
8 | public static readonly CultureInfo Instance;
9 |
10 | static TestCultureInfo()
11 | {
12 | Instance = (CultureInfo) DefaultCultureInfo.Instance.Clone();
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.Tests/TheoryDataHelper.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Xunit;
3 |
4 | namespace BenchmarkDotNet.Tests
5 | {
6 | public static class TheoryDataHelper
7 | {
8 | public static TheoryData Create(IEnumerable values)
9 | {
10 | var data = new TheoryData();
11 | foreach (string value in values)
12 | data.Add(value);
13 | return data;
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.Tests/XUnit/EnvRequirement.cs:
--------------------------------------------------------------------------------
1 | namespace BenchmarkDotNet.Tests.XUnit;
2 |
3 | public enum EnvRequirement
4 | {
5 | WindowsOnly,
6 | NonWindows,
7 | NonLinux,
8 | FullFrameworkOnly,
9 | NonFullFramework,
10 | DotNetCoreOnly,
11 | NeedsPrivilegedProcess
12 | }
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.Tests/XUnit/EnvRequirementCheckerTests.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Linq;
3 | using Xunit;
4 |
5 | namespace BenchmarkDotNet.Tests.XUnit;
6 |
7 | public class EnvRequirementCheckerTests
8 | {
9 | [Fact]
10 | public void AllEnvRequirementsAreSupported()
11 | {
12 | foreach (var envRequirement in Enum.GetValues(typeof(EnvRequirement)).Cast())
13 | EnvRequirementChecker.GetSkip(envRequirement);
14 | }
15 | }
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.Tests/XUnit/FactEnvSpecific.cs:
--------------------------------------------------------------------------------
1 | using Xunit;
2 |
3 | namespace BenchmarkDotNet.Tests.XUnit;
4 |
5 | public class FactEnvSpecificAttribute : FactAttribute
6 | {
7 | public FactEnvSpecificAttribute(params EnvRequirement[] requirements)
8 | {
9 | Skip = EnvRequirementChecker.GetSkip(requirements);
10 | }
11 |
12 | public FactEnvSpecificAttribute(string reason, params EnvRequirement[] requirements)
13 | {
14 | string skip = EnvRequirementChecker.GetSkip(requirements);
15 | if (skip != null)
16 | Skip = $"{skip} ({reason})";
17 | }
18 | }
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.Tests/XUnit/TheoryEnvSpecific.cs:
--------------------------------------------------------------------------------
1 | using Xunit;
2 |
3 | namespace BenchmarkDotNet.Tests.XUnit;
4 |
5 | public class TheoryEnvSpecificAttribute : TheoryAttribute
6 | {
7 | public TheoryEnvSpecificAttribute(params EnvRequirement[] requirements)
8 | {
9 | Skip = EnvRequirementChecker.GetSkip(requirements);
10 | }
11 |
12 | public TheoryEnvSpecificAttribute(string reason, params EnvRequirement[] requirements)
13 | {
14 | string skip = EnvRequirementChecker.GetSkip(requirements);
15 | if (skip != null)
16 | Skip = $"{skip} ({reason})";
17 | }
18 | }
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.Tests/dotMemory/DotMemoryTests.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using BenchmarkDotNet.Diagnostics.dotMemory;
3 | using BenchmarkDotNet.Jobs;
4 | using Xunit;
5 |
6 | namespace BenchmarkDotNet.Tests.dotMemory;
7 |
8 | public class DotMemoryTests
9 | {
10 | [Fact]
11 | public void AllRuntimeMonikerAreKnown()
12 | {
13 | var diagnoser = new DotMemoryDiagnoser();
14 | foreach (RuntimeMoniker moniker in Enum.GetValues(typeof(RuntimeMoniker)))
15 | diagnoser.IsSupported(moniker); // Just check that it doesn't throw exceptions
16 | }
17 | }
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.Tests/dotTrace/DotTraceTests.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using BenchmarkDotNet.Diagnostics.dotTrace;
3 | using BenchmarkDotNet.Jobs;
4 | using Xunit;
5 |
6 | namespace BenchmarkDotNet.Tests.dotTrace;
7 |
8 | public class DotTraceTests
9 | {
10 | [Fact]
11 | public void AllRuntimeMonikerAreKnown()
12 | {
13 | var diagnoser = new DotTraceDiagnoser();
14 | foreach (RuntimeMoniker moniker in Enum.GetValues(typeof(RuntimeMoniker)))
15 | diagnoser.IsSupported(moniker); // Just check that it doesn't throw exceptions
16 | }
17 | }
--------------------------------------------------------------------------------
/tests/BenchmarkDotNet.Tests/xunit.runner.json:
--------------------------------------------------------------------------------
1 | {
2 | "shadowCopy": false,
3 | "methodDisplay": "method",
4 | "diagnosticMessages": true,
5 | "longRunningTestSeconds": 3
6 | }
--------------------------------------------------------------------------------
/tests/runCoreTests.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | dotnet test BenchmarkDotNet.Tests/BenchmarkDotNet.Tests.csproj --configuration Release --framework net8.0 2>&1 | tee tests.log
3 | dotnet test BenchmarkDotNet.IntegrationTests/BenchmarkDotNet.IntegrationTests.csproj --configuration Release --framework net8.0 2>&1 | tee integration-tests.log
4 |
--------------------------------------------------------------------------------