Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 11 03:58
    dnfadmin commented #1901
  • Aug 10 11:47
    adamsitnik commented #1818
  • Aug 09 17:10
    martincostello commented #2039
  • Aug 09 16:56
    adamsitnik commented #2072
  • Aug 09 16:05
    kunalspathak commented #2072
  • Aug 09 16:05
    kunalspathak commented #2072
  • Aug 08 18:07
    radical commented #1818
  • Aug 08 14:49
    adamsitnik commented #1818
  • Aug 08 14:06

    adamsitnik on diassemblerGlobFilters

    (compare)

  • Aug 08 14:06

    adamsitnik on master

    Add glob filters support to dis… (compare)

  • Aug 08 14:06
    adamsitnik closed #2072
  • Aug 08 13:25
    janvorli commented #2072
  • Aug 08 12:44
    adamsitnik labeled #2072
  • Aug 08 12:44
    adamsitnik milestoned #2072
  • Aug 08 12:44
    adamsitnik opened #2072
  • Aug 08 12:26

    adamsitnik on diassemblerGlobFilters

    make it possible to specify fil… implement support for ClrMD v2 implement support for ClrMD v1 and 1 more (compare)

  • Aug 08 10:24

    adamsitnik on useClrMd2WhenPossible

    (compare)

  • Aug 08 10:24

    adamsitnik on master

    use ClrMd2Disassembler on Windo… (compare)

  • Aug 08 10:24
    adamsitnik closed #2071
  • Aug 08 09:21
    adamsitnik labeled #2071
TeBeCo
@tebeco
if your looking for network benchmark you're looking for the wrong product i think
Luciano Evaristo Guerche (Gorše)
@guercheLE
Hi I am using Benchmarkdotnet to benchmark tests which check gauge grpc against webapi. For that, I was already able to use MemoryDiagnoser to get memory allocation, but haven't found any sample on how to plug into System.Net (HttpClient) and collect bytes sent and received. Any clues on how to achieve it?
Is there any Diagnoser to collect bytes sent and received?
TeBeCo
@tebeco
are you looking at network load testing ?
because byte sent/receive is network load
there's chances you're using the wrong tool
there's stuff like crankier / bombardier
Luciano Evaristo Guerche (Gorše)
@guercheLE
No, just need to figure out the payload (bytes sent/received) to figure out whether or not gRpc is actually the one with smaller payloads.
For load test I usually use JMeter.
TeBeCo
@tebeco
you don't need benchmark.net for that right ?
Luciano Evaristo Guerche (Gorše)
@guercheLE
It would be a plus to have a Diagnoser which plugs into the System.Net and collects these metrics.
But, if it is/will not feasible to, I can resort to other tools, for sure.
TeBeCo
@tebeco
the .AddDebug of the logging stack in aspnetcore dumps bit to the console iirc
so digging in that code will help you finding that up
workgroupengineering
@workgroupengineering
Hi at all, what is the correct value of LogKind if you want to signal a warning?
Venkatesan R
@vengi83644
Hey guys, I am new here. New to even perf testing. May I know how do we do perf testing for methods involving DB calls?
Is there a way to mock them?
TeBeCo
@tebeco
just like you said with a mock in code
just like unit test
Venkatesan R
@vengi83644
OK, Thanks.
Got it.
TeBeCo
@tebeco
make sure your mock are not slow either
Venkatesan R
@vengi83644

OK. What about DI? In the Globalsetup, I want to call a service to get data from it and use it in the benchmark code.

Whether benchmarkdotnet allows DI?

I know about parameters. But I am talking about a dictionary holding 1M records/
kambiuchan
@kambiuchan
Hi, I tried to run the Md5VsSha256 benchmark and realized that it was trying to access the network. May I know why and is there a way to run it without the access? My work place has super strict network policy. Using the network proxy is basically not an option :( . (I got HTTP 407 when running the benchmark)
TeBeCo
@tebeco

can you use fiddler or wireshqrk to see why
we used to use it in same proxy / ntlm explicit shirtstorm and we had no issue regarding that

a proper network capture would probably be more relevant here to start discussion about the why
you would have the actual target FQDN

telemetry / restore / vscode extensions / ....
too many possibilities to start suspecting while the dumb will be explicit

Jose
@pepone

I trying to write a benchmark for a custom stream class, the programs is something like

[GenericTypeArguments(typeof(byte))]
[GenericTypeArguments(typeof(long))]
public class WriteSequences<T> where T : struct
{
    private T[]? _data;
    private MyStream? _stream;

    [GlobalSetup]
    public void GlobalSetup() => _data = ArrayPool<T>.Shared.Rent(8192);

    [IterationSetup]
    public void IterationSetup() => _stream = new MyStream();

    [IterationCleanup]
    public void IterationCleanup() => _stream = null;

    [GlobalCleanup]
    public void GlobalCleanup() => ArrayPool<T>.Shared.Return(_data!);

    [Benchmark(OperationsPerInvoke = 100)]
    [InvocationCount(30000)]
    public void Encoding_Array() => _stream!.WriteSequence(_data!);
}

But I keep getting OutOfMemoryException, here MyStream implementation allocates memory when required using new byte[] but the only reference to this arrays is in MyStream, not clear to me how to get this to work

cgranade
@cgranade:matrix.org
[m]
Out of curiosity, are there any beta packages for recent builds of benchmark.net? I've got a CI pipeline that's blocked by dotnet/BenchmarkDotNet#1731, and was wondering if there's a NuGet package I could pick up to get my pipeline running. Thank you for your help!
SuperDaveOsbourne
@SuperDaveOsbourne
Is there a way to insert the time for each job to the report in HTML and then a total time. I know I could you stopwatch but wondering if that might conflict with the underlying timing. I am going to be doing a lot of them and want to know when to come back after a run and how long a run with take before I do.
TeBeCo
@tebeco
check the reporters class and see if you can tweak that
Andrey Akinshin
@AndreyAkinshin
@cgranade:matrix.org BenchmarkDotNet v0.13.1 has been released, the changelog could be found here: https://benchmarkdotnet.org/changelog/v0.13.1.html
We publish nightly NuGet package after each successful commit in the master branch; they are available via the following NuGet feed: https://ci.appveyor.com/nuget/benchmarkdotnet
SuperDaveOsbourne
@SuperDaveOsbourne
https://www.youtube.com/watch?v=mmza9x3QxYE Intro to Benchmark.net from youtuber IAmTimCorey
Matthew Sitton
@mdsitton
I'm having issues running benchmarks for mono with current BenchmarkDotNet version. I'm getting this error when trying to build using mono MsBuild error MSB4237: The SDK resolver type "DotNetMSBuildSdkResolver" failed to load. The type initializer for 'Microsoft.DotNet.MSBuildSdkResolver.VSSettings' threw an exception.
I have mono installed and the following .net sdk installed:
E:\development\NoFrillSMF\NoFrillSMF.Benchmark>dotnet --list-sdks
5.0.202 [C:\Program Files\dotnet\sdk]
Martin
@mfe-
hi, generating testdata for the benchmark takes some time. whats the proper way to setup a benchmark without measuring the generation of testdata? I used consume but I'm unsure if I did it correctly
https://gist.github.com/mfe-/bf262695677bd8ad0cb31d51e24ce7c4
here I setup my testdata GraphExtensions.GenerateGridGraph(1024, 1024, VertexFactoryDouble, (lastVertex) => goalToFind = lastVertex, null, 0.1); which is quite expensive
I want to benchmark g.Start.AStar(goalToFind, funcManhattanDistanceHeuristic);
workgroupengineering
@workgroupengineering
What is the reason why the Median column does not appear in some cases?
Lucas Ontivero
@lontivero

Hi, I need to print some extra info in the report table and I cannot find how to do it. Imagine I have something like this:

[Benchmark]
public long Factoria() => ComputeFactorial(number);

I would need to log the result of the factorial or the average of the factorial. Ofc Factorial is just a simplified example and i am not working on a function like that.
Is there a way to do that? thank you

Ernesto Ortiz
@netotz
has anyone run a benchmark inside a .NET notebook? I get an error that says that I have to benchmark in Release mode
https://github.com/netotz/codecamp/blob/master/agileengine/second/PlusMinusConversion/PlusMinusConversion.ipynb
Devedse
@devedse
Is it possible with Benchmark dotnet to benchmark multiple steps in a process?
For example:
  1. Generate a maze
  2. Solve the maze
  3. Store an image of the maze including the solved path
Devedse
@devedse
Another question, can benchmark dotnet also output other details? E.g. I can imagine other interesting metrics
Marius Niemenmaa
@LokSrc
Hi, Benchmark dotnet seems to kill the whole application when it finishes benchmarking. Is there a way to avoid this? Benchmarking is one part of my application and I don't want it to shutdown whole application
workgroupengineering
@workgroupengineering
You could create the benchmark as a separate process and communicate with it through Named Pipes.
Marius Niemenmaa
@LokSrc
So there is no way to disable it with parameters etc? Is that for a good reason or is that something I could fork without causing issues?
Vojtech Machacek
@vmachacek
hi, want to test how long takes to run the tests with different mocking scenarios, do you guys think BenchmarkDotNet is a good fit?
LP
@grofit
Hey just wanted to confirm, is there no way to have an abstract class with attributes for setup/benchmark etc and then just have the implementation be ignorant of it all? as currently unless I explicitly mark the implementation (with the benchmark attribute it is ignored, and I am using the implementation type in the BenchmarkRunner.Run method, I was just hoping to wrap up a lot of generic setup stuff into a convention to just simplify all the test scenarios.
LP
@grofit
Also I am struggling to find a way to stop it filling the console with all the info related outputs, I basically just want the table output without the warmup info etc, is there a way to just tell it to purely output the table results and ignore the rest of it?
UnnecessaryPunctuation
@UnnecessaryPunctuation
Is there a way to order ArgumentsSource ?
In the Documentation https://benchmarkdotnet.org/articles/features/parameterization.html#sample-introarrayparam.
While data are yield in the following order 3,100,100.
The displayer order is 100,3,100