dotnet / dotnet/BenchmarkDotNet

Using a benchmark target's return value in a column

Open
#784 22 comments 29 reactions 0 assignees View on GitHub
help wanted up-for-grabs
Dominant language
C#
Stars
11.5k
Forks
1.1k
Avg merge
6d 11h
Merged PRs (30d)
12

Description

I'm writing a deserialization library that is basically taking a file stream and producing a `List`:

```cs
[Benchmark(Description = "Achievement (WDC1)")]
public StorageList WDC1()
{
using (var fs = OpenFile("Achievement.WDC1.db2"))
return new StorageList(fs);
}
```

And it goes on for a couple versions.

However, the execution times don't make much sense since they are a measurement of the total amount of entries per file, which changes per version (I have no control over the data). It would make a lot more sense to display the average time needed to load one single element of each version.

I'd love to be able to have an implementation of `IColumn` that is able to obtain the return value from a benchmark target and work on it.

I have a local project that is basically a dumbed down performance meter but it has its limitations, namely in regards to results output - producing histograms is a chore.

Is there a way to do that, or am I out of luck? By giving the source a quick glance through ILspy, I don't see much.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.