Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 31 22:54
    djfoxer opened #1413
  • Mar 31 10:24
    adamsitnik commented #1412
  • Mar 31 10:20
    alexeybut commented #1412
  • Mar 31 10:15
    alexeybut commented #1412
  • Mar 31 10:13
    alexeybut commented #1412
  • Mar 31 09:26
    adamsitnik commented #1412
  • Mar 31 09:11
    alexeybut opened #1412
  • Mar 31 06:43
    adamsitnik commented #1411
  • Mar 31 02:38
    rmanjusha opened #1411
  • Mar 30 14:23
    AndreyAkinshin labeled #1407
  • Mar 30 14:23
    AndreyAkinshin assigned #1407
  • Mar 30 14:23
    AndreyAkinshin commented #1407
  • Mar 30 14:22

    AndreyAkinshin on master

    Improve warnings for small oper… (compare)

  • Mar 30 14:22
    AndreyAkinshin closed #1407
  • Mar 30 14:22
    AndreyAkinshin closed #1003
  • Mar 30 14:22
    AndreyAkinshin milestoned #1407
  • Mar 30 14:21
    AndreyAkinshin closed #1404
  • Mar 30 14:21
    CodeFuller review_requested #1407
  • Mar 30 14:20
    AndreyAkinshin commented #1404
  • Mar 30 13:49
    bender2k14 commented #1404
TeBeCo
@tebeco
serilog has an internal logevent pool ok 200k entries
not sure i get your code properly but i have the feeling it attempt to log 20k ?

also i'm wondering if a limit of 10 thread on the CPU used won't have bad side effect

you have more than 10logic CPU Core ?

why not use the TaskScheduler/Factory existing API for the "parallelism degree" ?
TeBeCo
@tebeco

also your bench seems to compute the overhead of the Task creation

why not use like a param ?

[Param]
public int TaskNumber {get;set}
and create the Pool ahead
Mikel Blanchard
@CodeBlanch
@tebeco CPU where I'm running the tests has 16 logic cores.
@tebeco Trying to consume what you're saying. Thread creation is throwing off the tests you think?
TeBeCo
@tebeco
too much factor that could affect it
Mikel Blanchard
@CodeBlanch
Happen to know of a sample that does threadpool or parallelism I could model after?
TeBeCo
@tebeco
so i won't gamble
it's just what went through my mind
i might be wrong
just trying to isolate the code you want to bench
TeBeCo
@tebeco
@AndreyAkinshin
i got a very weird question ;)
is there a way, as of today to agregate bench results from differents project output
as of today (aspnetcore/signalr 3.1.2) has an hard dependency on MessagePack 1.7.x
and azure-signalr moved out by "building from source" using a submodule
we had an internal HubProtocol at work that relies on MessagePack too
I went for an update from MessagePack 1.x to 2.x (since we can now)
the thing is that i can't load twice the "same" Assembly with 2 different version to compare each other :
  • original MsgPack (from dotnet/aspnetcore) <= require 1.7.x
  • custom made <= require 1.x
  • custom made upgraded to 2.x
TeBeCo
@tebeco
also i'm curious about the way to change Name of a Parameterized bench ;)
image.png
the result look like this :
Adam Sitnik
@adamsitnik
also i'm curious about the way to change Name of a Parameterized bench
You need to override .ToString() in the class that is used as paramter (in your case its JsonHubProtocol etc)
TeBeCo
@tebeco
so i have to inherits the one from aspnetcore or wrap it ?
Adam Sitnik
@adamsitnik
you could just wrap it, or inherit. You can also add a new enum, use it as parameter and then handle in the setup method
sth like
public enum Hub
{
    Json,
    NetonsoftJson,
    MessagePack
}

[Params(Hub.Json, Hub.Json, Hub.MessagePack)]
public Hub Hub;

[GlobalSetup]
public Setup()
{
    switch (Hub)
    {
        case Json;
            hubProtocol = new JsonHubProtocol();
            break;
    }
}

private IHubProtocol hubProtocol;
TeBeCo
@tebeco

i wondered yesterday if there was another attribute like for example

[ColumnSource]
public string Foo => this.HubProtocol.Name;

to generate a column name Foo
but that would also mean finding how to hide the automated one

The attributes are name but as it is attributes value must be known at compile time

i'm very curious here

about inheritance thx, spot that yesterday but not sure this was the only way since it felt weird at first

i did not though about the enum ^^
looks a bit better for this scenario
Adam Sitnik
@adamsitnik
I've forgotten about the simplest solution....
You could just increase the column width
because it's contaisn the type name (the default .ToString() behaviour in .NET), but it's trimmed
TeBeCo
@tebeco
yep looks like typeof(T).FullName
Adam Sitnik
@adamsitnik
TeBeCo
@tebeco
(.ToString() as you said ^^)
Adam Sitnik
@adamsitnik
I am before my first coffee :d
TeBeCo
@tebeco
any idea for the other tricky question ^^ ?
with or without a coffee ☕️ hahaha
this one is a mystery for me

i saw that there were .WithNuget helpers but my guess is that it's helps full when thing still builds
i'm looking at few breaking change in my own implementation ;)

one way would be to release both version of my code in release and bench against my own Nugets package since i just consume an IHubProtocol ?

Adam Sitnik
@adamsitnik
You could also add a custom build configuration
TeBeCo
@tebeco
i though about that too, it's not a simple breaking change in my own lib, i'll try to see how it goes but it might complexify stuff just for the cost of a bench
while previous version of this lib where already shipped but the exposed "contract" is still the same, the .WithNuget might do the trick if i consume a "local" RestoreSource
i'll just make sure PackOnBuild is enabled to consume the "nuget feed" versus local feed
the breaking change is for MessagePack in my scenario so it's not a simple one ;)
Collin J. Sutton
@insaneinside
Hey folks, new user here. Trying to benchmark something that (in setup) requires creation of a resource, whose location isn't known before it's created but needs to be communicated to the benchmark methods somehow. Is this (a) not possible, (b) a bad idea/wrong way to do things, (c) an indication that I'm using the wrong benchmarking library, or (d) all of the above?
Adam Sitnik
@adamsitnik
hi @insaneinside you are fine ;) what kind of resource are we talking about?
Collin J. Sutton
@insaneinside
@adamsitnik , I'm specifically comparing how a filesystem search heuristic scales depending on certain settings. My plan was to create a set of test directories somewhere in %TEMP%, and compare performance between settings, using [Params("scaledirname1", "scaledirname2", "scaledirname3")] etc, but still need to communicate the root directory for each scale directory. (Yes, I'm aware of the fact that all sorts of things will affect benchmarks based on disk I/O, and am not yet worrying about it.)
Adam Sitnik
@adamsitnik
@insaneinside in such case, most probably the simplest solution would be to create the corresponding directories in the [GlobalSeutp] method based on the value of [Params]
an alternative is to use env vars to pass something to the process
Collin J. Sutton
@insaneinside
On a similar note, is there something like the MSTest DeploymentItemAttribute available?