ITNEXT

ITNEXT is a platform for IT developers & software engineers to share knowledge, connect…

Follow publication

Make Microsoft Run Benchmark Tests for You

Stephen Walsh
ITNEXT
Published in
7 min readJul 27, 2022

Microsoft
Photo by Turag Photography on Unsplash

Benchmarking

Benchmarking in .NET

A Simple Benchmark Test

dotnet new console --framework net6.0

Running the Benchmarks

dotnet run -c Release --project ./BenchmarkApp.csproj
| Method | Iterations |     Mean | Allocated |
|------- |----------- |---------:|----------:|
| Locked | 100 | 7.495 us | 1,152 B |
| Shared | 100 | 2.235 us | 848 B |
| Thread | 100 | 9.223 us | 1,288 B |

Running Benchmarks Remotely

Creating a New GitHub Repository
Creating a New GitHub Repository
GitHub Repository after Initial Commit
GitHub Repository after Initial Commit
Creating an Example GitHub Action for BenchmarkDotNet
GitHub Action Results for BenchmarkDotNet Job
GitHub Action Results for BenchmarkDotNet Job
Finding the Results from the Benchmark Test
Finding the Results from the Benchmark Test

Finally

Example Repository

Connect or Support?If you like this, or want to checkout my other work, please connect with me on LinkedIn, Twitter or GitHub, and consider supporting me at Buy Me a Coffee.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Published in ITNEXT

ITNEXT is a platform for IT developers & software engineers to share knowledge, connect, collaborate, learn and experience next-gen technologies.

Written by Stephen Walsh

Hello! I’m a Husband, Father, Software Engineer, Learner & Leader. I live in Wisconsin, and spend my days trying to balance all of the above.

No responses yet

Write a response