benchmarkdotnet Questions

2

Solved

I ran a benchmark example and got this table. BenchmarkDotNet=v0.12.0, OS=Windows 7 SP1 (6.1.7601.0) Intel Xeon CPU E5-4660 v3 2.10GHz, 1 CPU, 28 logical and 14 physical cores Frequency=2050214 Hz...
Overbuild asked 25/11, 2019 at 9:25

2

Solved

I'm running BenchmarkDotNet against the following code on .NET 8: using System.Runtime.InteropServices; using BenchmarkDotNet.Attributes; using BenchmarkDotNet.Running; [StructLayout(LayoutKind.Ex...
Maricruzmaridel asked 29/7 at 14:18

1

I do have an existing rest API project developed using asp.net core 3.1. At present, we are planning to do code refactoring and optimize it. I came across BenchMarkDotNet recently. All the example...
Nocturn asked 27/9, 2022 at 13:38

4

Solved

I'm looking at BenchmarkDotNet and benchmarking in general for the first time ever. I appear to be unable to run benchmarks using the normal BenchmarkRunner because of antivirus restrictions on our...
Ramah asked 24/8, 2022 at 15:4

2

I am using .NET Core 3.1 in my project (web api, VS2019) and XUnit 2.4.1. Recently I was thinking about adding some performance tests and I came accross this library - BenchmarkDotNet. Since I've a...
Chameleon asked 24/3, 2020 at 10:4

1

Solved

I'd like to use BenchmarkDotNet on some legacy code I'm working with right now. It is written in C# Net462. It is a big, old and complex system and I'd like to Benchmark some methods inside some sp...
Fleda asked 31/7, 2022 at 10:5

2

Solved

Suppose that you're writing some benchmarks for use with BenchmarkDotNet that are multi-targeted to net48 and net6.0, and that one of those benchmarks can only be compiled for the net6.0 target. Th...
Whichever asked 8/12, 2021 at 12:22

1

Solved

I want to measure performance of some methods in my console application using BenchmarkDotNet library. The question is: should I create a separate project in my solution where I will copy the metho...
Upheave asked 11/2, 2022 at 10:36

3

I'm playing around with BenchmarkDotNet and its MemoryDiagnoser feature. Considering the following benchmark: [Benchmark] public void Dummy() { var buffer = new byte[1]; } I expect it to alloc...
Episcopal asked 16/2, 2020 at 13:34

1

I'm trying to run this code : public class Parsing { private const string Url ="blabla"; private static HttpClient client = new HttpClient(); private static Task<string> newton = ParseNe...
Oersted asked 28/3, 2018 at 14:0

1

Solved

I'm using BenchmarkDotNet library for performance checks and I want to inject parameters when using the benchmark class. Something like this: public class Program { public static void Main() { ...
Goodale asked 31/10, 2019 at 16:40

1

I'm banging my head against the wall here, so I hope that some of you may be able to educate me. I was doing some performance benchmarks using BenchmarkDotNet and I ran into this weird case where i...
Netherlands asked 13/11, 2019 at 12:52

1

Solved

I'm interested in performance (speed, memory usage) comparison of two approaches how to deserialize HTTP response JSON payload using Newtonsoft.Json. I'm aware of Newtonsoft.Json's Performance Tip...
Fifteen asked 5/6, 2019 at 12:59

1

Solved

I have implemented the following benchmark using BenchmarkDotNet: public class ForVsFillVsEnumerable { private bool[] data; [Params(10, 100, 1000)] public int N; [GlobalSetup] public void S...
Cassiani asked 8/1, 2019 at 16:53

1

Solved

I created a simple benchmark out of curiosity, but cannot explain the results. As benchmark data, I prepared an array of structs with some random values. The preparation phase is not benchmarked: ...
Actinia asked 3/8, 2018 at 12:57

1

Solved

I have encountered a performance issue in .NET Core 2.1 that I am trying to understand. The code for this can be found here: https://github.com/mike-eee/StructureActivation Here is the relavant b...
Puga asked 29/9, 2018 at 5:41

3

So, I have a following piece of code in my Main() method for (int x = 0; x < 100; x++) // to mimic BenchmarkDotnet runs for (int y = 0; y < 10000; y++) LogicUnderTest(); Next, I have the...
Juryrigged asked 7/9, 2018 at 13:33

1

I have unit tests. If one of them fails, my build fails. I would like to apply the same principle to performance. I have a series of microbenchmarks for several hot paths through a library. Empiri...
Liddy asked 29/5, 2018 at 14:43

1

Introduction We are trying to catch potential memory leaks using BenchmarksDotNet. For the simplicity of example, here is an unsophisticated TestClass: public class TestClass { private readon...
Yearbook asked 26/2, 2018 at 15:42

1

Solved

I have tried out BenchmarkDotNet with a simple test class public class BenchTest { bool First = false; [Benchmark] public void FirstTimeInitEffect() { if (First == false) { Console.WriteLi...
Helwig asked 29/12, 2016 at 0:56
1

© 2022 - 2024 — McMap. All rights reserved.