Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expanded Decorator Benchmarks and tests for #1113 #1116

Merged
merged 3 commits into from
May 9, 2020
Merged

Expanded Decorator Benchmarks and tests for #1113 #1116

merged 3 commits into from
May 9, 2020

Conversation

VonOgre
Copy link
Contributor

@VonOgre VonOgre commented May 7, 2020

A response to good feedback from PR #1114 that I subsequently abandoned to start on a clean slate.

This adds skipped unit tests that illustrate issue #1113 and adds/expands on the decorator benchmarks.

…ior around resolving IEnumerable<T> and T when decorators are in play

-- Exposes issue #1113 in a number of skipped tests
…ecorators

-- Altered base decorator benchmarks to perform multiple iterations to meansure repeats
public virtual void EnumerableResolve()
[Arguments(1)]
[Arguments(2)]
[Arguments(3)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I expanded on all of the decorator benchmarks to have repetition runs, since the first execution of Resolve<> is always really fast, but seeing the effect of repeated resolutions when using shared or independent resolutions provided some good data. My BenchmarkDotNet experience is literally only these files, so if there are recommendations for improvement, I'm all ears!
Sample output with repetitions for KeylessNestedSharedInstanceLambdaBenchmark:
image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just so you are aware, BenchmarkDotNet outputs a markdown file that contains GitHub-compatible markdown you can just paste straight here (rather than needing an image).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem with the repetition approach you have here is that the benchmark methods are already being executed millions of times as it is, against a single Container instance, to get the average time. See the comment on the repetition logic as to why you are actually seeing a discrepancy between 1 and 2.

So, 99.999999% of runs are going to be using the shared instance.

This sort of global state behaviour with benchmarks is always fun. In this particular case, my suggestion to you would be to resolve from a lifetime scope, and use a baseline to determine the cost of creating the lifetime scope.

Something like:

  1. Change the shared scope of the benchmarks to be lifetime scope, rather than SingleInstance.
  2. Derive from a new base class ScopedDecoratorBenchmarkBase (or something).
  3. In this benchmark class, create a new lifetime scope at the beginning of each benchmark, and resolve from that.
  4. Add a new baseline benchmark in your new base class that's only job is to create and dispose of a lifetime scope. This gives us the 'no-op' cost of the actual benchmarks.

Hope that was clear, I really like benchmarks, but they can be a bit black-magic sometimes.

Copy link
Contributor Author

@VonOgre VonOgre May 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The suggestion is completely clear! I misunderstood how global "GlobalSetup" really was, so I see how that + repetition didn't quite do what I was thinking it was doing. I was coming at it from the perspective of the fact that a single call to Resolve<>() doesn't really expose the costs of just the instance lookup when the initial resolve created a shared instance. With your suggestion about creating a lifetime scope, I'm assuming the repetition element would still be valuable, since it would expose the costs of instance lookup vs instance creation?

The benchmark stuff is definitely really interesting, though. I'll be spending some time over the next couple of months to see how I might be able to leverage BenchmarkDotNet or something similar at work

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, the repetition would still be valuable in that case, because you'd be resolving X times from the lifetime scope before it is disposed.

I'd expect to see the highest cost on the first resolve, then lower on the second, and all subsequent repetitions should be of similar cost to the second.

Copy link
Member

@alistairjevans alistairjevans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the new benchmarks introduce shared state into the container, we'll have to make some changes; benchmarks are fun!

public virtual void EnumerableResolve()
[Arguments(1)]
[Arguments(2)]
[Arguments(3)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just so you are aware, BenchmarkDotNet outputs a markdown file that contains GitHub-compatible markdown you can just paste straight here (rather than needing an image).

public virtual void EnumerableResolve()
[Arguments(1)]
[Arguments(2)]
[Arguments(3)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem with the repetition approach you have here is that the benchmark methods are already being executed millions of times as it is, against a single Container instance, to get the average time. See the comment on the repetition logic as to why you are actually seeing a discrepancy between 1 and 2.

So, 99.999999% of runs are going to be using the shared instance.

This sort of global state behaviour with benchmarks is always fun. In this particular case, my suggestion to you would be to resolve from a lifetime scope, and use a baseline to determine the cost of creating the lifetime scope.

Something like:

  1. Change the shared scope of the benchmarks to be lifetime scope, rather than SingleInstance.
  2. Derive from a new base class ScopedDecoratorBenchmarkBase (or something).
  3. In this benchmark class, create a new lifetime scope at the beginning of each benchmark, and resolve from that.
  4. Add a new baseline benchmark in your new base class that's only job is to create and dispose of a lifetime scope. This gives us the 'no-op' cost of the actual benchmarks.

Hope that was clear, I really like benchmarks, but they can be a bit black-magic sometimes.

…re each benchmark iteration actually creates instances on the first Resolve<> for the decorators
@@ -8,18 +8,30 @@ public abstract class DecoratorBenchmarkBase<TCommandHandler>
{
protected IContainer Container { get; set; }

[Benchmark(Baseline =true)]
public virtual void Baseline()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I updated the base for all of the decorators to carry the same lifetime scope baseline and work, just so everything was an apples-to-apples comparison.

Copy link
Member

@alistairjevans alistairjevans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@alistairjevans
Copy link
Member

@VonOgre, just to be thorough (and for posterity), could you please run all the benchmarks from develop, and all the benchmarks (including new ones) on your feature/benchmarks branch and paste both sets of results here to give us a before and after?

I'd do the develop ones myself, but then before and after wouldn't be running on the same hardware.

@VonOgre
Copy link
Contributor Author

VonOgre commented May 8, 2020

@alistairjevans - You got it! Long comment incoming ;) Just kidding, I found collapsible section markdown syntax!

Interestingly, comparing the shared instance and instance per dependency timings for the decorators seem to indicate that the lion's share of the cost is in the lookup, rather than instantiation. It might be in part due to how simple the resolution is in these too

Original Benchmarks

Expand

Autofac.Benchmarks.ChildScopeResolveBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
Resolve 40.60 us 0.508 us 0.475 us 6.1646 0.3662 - 50.7 KB

Autofac.Benchmarks.ConcurrencyBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method ResolveTaskCount ResolvesPerTask Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
MultipleResolvesOnMultipleTasks 100 100 2.091 ms 0.0365 ms 0.0324 ms 617.1875 27.3438 - 4.9 MB

Autofac.Benchmarks.ConcurrencyNestedScopeBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method ConcurrentRequests RepeatCount Mean Error StdDev Median Gen 0 Gen 1 Gen 2 Allocated
MultipleResolvesOnMultipleTasks 100 10 1.486 ms 0.0364 ms 0.1028 ms 1.449 ms 865.2344 164.0625 - 6.83 MB

Autofac.Benchmarks.Decorators.KeyedGenericBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
EnumerableResolve 1,883.0 ns 3.86 ns 3.42 ns 0.3624 - - 2.96 KB
SingleResolve 681.6 ns 2.14 ns 2.00 ns 0.1507 - - 1.23 KB

Autofac.Benchmarks.Decorators.KeyedNestedBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
EnumerableResolve 2,110.5 ns 13.93 ns 11.63 ns 0.3395 - - 2.77 KB
SingleResolve 773.7 ns 5.28 ns 4.68 ns 0.1392 - - 1.14 KB

Autofac.Benchmarks.Decorators.KeyedSimpleBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
EnumerableResolve 1,699.8 ns 6.12 ns 5.72 ns 0.2804 - - 2360 B
SingleResolve 531.8 ns 1.31 ns 1.09 ns 0.1106 - - 928 B

Autofac.Benchmarks.Decorators.KeylessGenericBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
EnumerableResolve 2,112.0 ns 20.01 ns 18.71 ns 0.4959 - - 4.08 KB
SingleResolve 787.5 ns 13.66 ns 12.78 ns 0.2241 - - 1.84 KB

Autofac.Benchmarks.Decorators.KeylessNestedBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
EnumerableResolve 3.622 us 0.0717 us 0.0704 us 0.8659 0.0038 - 7.09 KB
SingleResolve 1.453 us 0.0155 us 0.0130 us 0.4082 - - 3.34 KB

Autofac.Benchmarks.Decorators.KeylessNestedLambdaBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
EnumerableResolve 3.289 us 0.0223 us 0.0208 us 0.7248 - - 5.94 KB
SingleResolve 1.308 us 0.0038 us 0.0036 us 0.3376 - - 2.77 KB

Autofac.Benchmarks.Decorators.KeylessSimpleBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
EnumerableResolve 2,410.9 ns 41.58 ns 38.90 ns 0.5302 - - 4.36 KB
SingleResolve 938.3 ns 18.35 ns 20.39 ns 0.2413 - - 1.98 KB

Autofac.Benchmarks.Decorators.KeylessSimpleLambdaBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
EnumerableResolve 2,154.9 ns 12.04 ns 11.26 ns 0.4616 - - 3.78 KB
SingleResolve 855.5 ns 3.62 ns 3.38 ns 0.2060 - - 1.69 KB

Autofac.Benchmarks.DeepGraphResolveBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
Resolve 11.32 us 0.056 us 0.053 us 2.2430 0.0458 - 18.45 KB

Autofac.Benchmarks.EnumerableResolveBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
ResolveIEnumerable 2.435 us 0.0085 us 0.0079 us 0.4311 - - 3.54 KB
ResolveIReadOnlyList 2.423 us 0.0055 us 0.0051 us 0.4349 - - 3.57 KB
ResolveArray 2.385 us 0.0181 us 0.0169 us 0.4311 - - 3.54 KB

Autofac.Benchmarks.OpenGenericBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
ResolveOpenGeneric 333.2 ns 0.93 ns 0.82 ns 0.0820 - - 688 B

Autofac.Benchmarks.PropertyInjectionBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
Resolve 3.644 us 0.0088 us 0.0078 us 0.7706 0.0038 - 6.3 KB

Autofac.Benchmarks.RootContainerResolveBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method Mean Error StdDev Ratio RatioSD Gen 0 Gen 1 Gen 2 Allocated
OperatorNew 2.574 ns 0.0401 ns 0.0376 ns 1.00 0.00 0.0029 - - 24 B
NonSharedReflectionResolve 331.177 ns 0.9454 ns 0.8843 ns 128.69 2.00 0.0820 - - 688 B
NonSharedDelegateResolve 257.597 ns 1.4743 ns 1.3791 ns 100.10 1.48 0.0639 - - 536 B
SharedResolve 233.258 ns 0.5229 ns 0.4635 ns 90.66 1.34 0.0610 - - 512 B

New Benchmarks

Expand

Autofac.Benchmarks.ChildScopeResolveBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.201
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
Resolve 41.08 us 0.203 us 0.180 us 6.1646 0.3662 - 50.7 KB

Autofac.Benchmarks.ConcurrencyBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.201
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method ResolveTaskCount ResolvesPerTask Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
MultipleResolvesOnMultipleTasks 100 100 2.041 ms 0.0402 ms 0.0376 ms 617.1875 27.3438 - 4.9 MB

Autofac.Benchmarks.Decorators.KeylessNestedSharedInstanceLambdaBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method repetitions Mean Error StdDev Ratio RatioSD Gen 0 Gen 1 Gen 2 Allocated
Baseline ? 477.0 ns 2.84 ns 2.52 ns 1.00 0.00 0.2093 - - 1.71 KB
ResolveEnumerableT 1 4,066.8 ns 43.22 ns 40.43 ns ? ? 0.9613 0.0076 - 7.9 KB
ResolveT 1 2,151.8 ns 9.01 ns 8.43 ns ? ? 0.5875 0.0038 - 4.83 KB
ResolveEnumerableT 2 6,679.9 ns 37.64 ns 35.21 ns ? ? 1.5945 0.0153 - 13.05 KB
ResolveT 2 3,270.0 ns 12.28 ns 11.49 ns ? ? 0.8812 0.0076 - 7.2 KB
ResolveEnumerableT 3 9,114.3 ns 39.82 ns 37.25 ns ? ? 2.2278 0.0153 - 18.21 KB
ResolveT 3 4,120.2 ns 7.43 ns 6.95 ns ? ? 1.1673 0.0076 - 9.58 KB

Autofac.Benchmarks.PropertyInjectionBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
Resolve 3.635 us 0.0158 us 0.0148 us 0.7706 0.0038 - 6.3 KB

Autofac.Benchmarks.OpenGenericBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
ResolveOpenGeneric 328.5 ns 5.94 ns 5.56 ns 0.0820 - - 688 B

Autofac.Benchmarks.DeepGraphResolveBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
Resolve 11.31 us 0.036 us 0.034 us 2.2430 0.0458 - 18.45 KB

Autofac.Benchmarks.ConcurrencyBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method ResolveTaskCount ResolvesPerTask Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
MultipleResolvesOnMultipleTasks 100 100 1.941 ms 0.0386 ms 0.0460 ms 617.1875 27.3438 - 4.9 MB

Autofac.Benchmarks.Decorators.KeylessSimpleLambdaBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method repetitions Mean Error StdDev Ratio RatioSD Gen 0 Gen 1 Gen 2 Allocated
Baseline ? 479.6 ns 2.39 ns 2.24 ns 1.00 0.00 0.2089 - - 1.71 KB
ResolveEnumerableT 1 2,985.5 ns 22.68 ns 21.21 ns ? ? 0.6714 0.0038 - 5.49 KB
ResolveT 1 1,399.8 ns 8.95 ns 8.37 ns ? ? 0.4158 - - 3.4 KB
ResolveEnumerableT 2 5,271.4 ns 30.99 ns 28.99 ns ? ? 1.1292 0.0076 - 9.27 KB
ResolveT 2 2,263.0 ns 12.28 ns 11.48 ns ? ? 0.6218 0.0038 - 5.09 KB
ResolveEnumerableT 3 7,591.6 ns 25.30 ns 23.66 ns ? ? 1.5945 0.0153 - 13.05 KB
ResolveT 3 3,122.5 ns 18.08 ns 16.03 ns ? ? 0.8278 0.0038 - 6.77 KB

Autofac.Benchmarks.Decorators.KeylessNestedLambdaBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method repetitions Mean Error StdDev Ratio RatioSD Gen 0 Gen 1 Gen 2 Allocated
Baseline ? 478.3 ns 1.47 ns 1.37 ns 1.00 0.00 0.2089 - - 1.71 KB
ResolveEnumerableT 1 4,070.9 ns 9.48 ns 8.87 ns ? ? 0.9308 0.0076 - 7.65 KB
ResolveT 1 1,894.9 ns 9.34 ns 8.74 ns ? ? 0.5474 0.0038 - 4.48 KB
ResolveEnumerableT 2 7,164.8 ns 18.07 ns 16.90 ns ? ? 1.6632 0.0153 - 13.59 KB
ResolveT 2 3,293.6 ns 14.04 ns 13.13 ns ? ? 0.8850 0.0076 - 7.24 KB
ResolveEnumerableT 3 10,575.3 ns 23.66 ns 22.14 ns ? ? 2.3804 0.0153 - 19.52 KB
ResolveT 3 4,532.6 ns 27.35 ns 25.58 ns ? ? 1.2207 0.0076 - 10.01 KB

Autofac.Benchmarks.RootContainerResolveBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method Mean Error StdDev Ratio RatioSD Gen 0 Gen 1 Gen 2 Allocated
OperatorNew 2.571 ns 0.0302 ns 0.0283 ns 1.00 0.00 0.0029 - - 24 B
NonSharedReflectionResolve 335.762 ns 2.2634 ns 2.1172 ns 130.62 1.70 0.0820 - - 688 B
NonSharedDelegateResolve 253.400 ns 1.2290 ns 1.1496 ns 98.58 1.05 0.0639 - - 536 B
SharedResolve 229.811 ns 0.5025 ns 0.4700 ns 89.40 0.95 0.0610 - - 512 B

Autofac.Benchmarks.Decorators.KeylessNestedSharedInstanceBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method repetitions Mean Error StdDev Ratio RatioSD Gen 0 Gen 1 Gen 2 Allocated
Baseline ? 477.8 ns 2.03 ns 1.80 ns 1.00 0.00 0.2089 - - 1.71 KB
ResolveEnumerableT 1 4,340.2 ns 15.22 ns 14.24 ns ? ? 1.0376 0.0076 - 8.48 KB
ResolveT 1 2,268.8 ns 5.55 ns 5.19 ns ? ? 0.6599 0.0038 - 5.41 KB
ResolveEnumerableT 2 6,719.7 ns 28.59 ns 26.75 ns ? ? 1.6632 0.0153 - 13.63 KB
ResolveT 2 3,247.4 ns 7.98 ns 7.46 ns ? ? 0.9499 0.0076 - 7.78 KB
ResolveEnumerableT 3 8,997.0 ns 37.94 ns 35.49 ns ? ? 2.2888 0.0153 - 18.79 KB
ResolveT 3 4,280.1 ns 15.04 ns 14.07 ns ? ? 1.2360 0.0076 - 10.16 KB

Autofac.Benchmarks.ConcurrencyNestedScopeBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method ConcurrentRequests RepeatCount Mean Error StdDev Median Gen 0 Gen 1 Gen 2 Allocated
MultipleResolvesOnMultipleTasks 100 10 1.820 ms 0.0358 ms 0.0536 ms 1.793 ms 863.2813 156.2500 - 6.83 MB

Autofac.Benchmarks.Decorators.KeyedNestedBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method repetitions Mean Error StdDev Ratio RatioSD Gen 0 Gen 1 Gen 2 Allocated
Baseline ? 476.0 ns 1.29 ns 1.20 ns 1.00 0.00 0.2093 0.0005 - 1.71 KB
ResolveEnumerableT 1 2,772.6 ns 8.81 ns 8.24 ns ? ? 0.5455 0.0038 - 4.48 KB
ResolveT 1 1,345.6 ns 4.43 ns 4.14 ns ? ? 0.3490 0.0019 - 2.85 KB
ResolveEnumerableT 2 4,917.2 ns 14.56 ns 13.62 ns ? ? 0.8850 0.0076 - 7.26 KB
ResolveT 2 2,101.8 ns 13.48 ns 12.61 ns ? ? 0.4883 - - 3.99 KB
ResolveEnumerableT 3 6,977.8 ns 25.24 ns 23.61 ns ? ? 1.2207 0.0076 - 10.03 KB
ResolveT 3 2,929.2 ns 9.47 ns 8.86 ns ? ? 0.6256 0.0038 - 5.13 KB

Autofac.Benchmarks.Decorators.KeylessNestedBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method repetitions Mean Error StdDev Ratio RatioSD Gen 0 Gen 1 Gen 2 Allocated
Baseline ? 479.3 ns 1.24 ns 1.16 ns 1.00 0.00 0.2089 - - 1.71 KB
ResolveEnumerableT 1 4,198.6 ns 11.59 ns 10.84 ns ? ? 1.0757 0.0076 - 8.8 KB
ResolveT 1 1,998.2 ns 6.73 ns 6.30 ns ? ? 0.6180 0.0038 - 5.05 KB
ResolveEnumerableT 2 7,809.8 ns 21.39 ns 20.01 ns ? ? 1.9379 0.0153 - 15.9 KB
ResolveT 2 3,404.2 ns 10.92 ns 10.22 ns ? ? 1.0262 0.0076 - 8.4 KB
ResolveEnumerableT 3 11,193.8 ns 27.98 ns 26.17 ns ? ? 2.8076 0.0153 - 22.99 KB
ResolveT 3 4,833.8 ns 7.86 ns 6.97 ns ? ? 1.4343 0.0076 - 11.74 KB

Autofac.Benchmarks.Decorators.KeylessSimpleBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method repetitions Mean Error StdDev Ratio RatioSD Gen 0 Gen 1 Gen 2 Allocated
Baseline ? 474.8 ns 1.82 ns 1.62 ns 1.00 0.00 0.2093 0.0005 - 1.71 KB
ResolveEnumerableT 1 2,913.3 ns 10.41 ns 9.74 ns ? ? 0.7401 0.0038 - 6.07 KB
ResolveT 1 1,440.7 ns 2.61 ns 2.18 ns ? ? 0.4501 0.0019 - 3.69 KB
ResolveEnumerableT 2 5,232.2 ns 34.12 ns 30.25 ns ? ? 1.2741 0.0076 - 10.43 KB
ResolveT 2 2,383.1 ns 6.77 ns 6.00 ns ? ? 0.6905 0.0038 - 5.66 KB
ResolveEnumerableT 3 7,802.9 ns 34.28 ns 26.77 ns ? ? 1.8005 0.0153 - 14.79 KB
ResolveT 3 3,306.1 ns 8.58 ns 8.03 ns ? ? 0.9346 0.0076 - 7.64 KB

Autofac.Benchmarks.ChildScopeResolveBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
Resolve 40.12 us 0.356 us 0.333 us 6.1646 0.3662 - 50.7 KB

Autofac.Benchmarks.Decorators.KeylessGenericBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method repetitions Mean Error StdDev Ratio RatioSD Gen 0 Gen 1 Gen 2 Allocated
Baseline ? 481.8 ns 9.25 ns 9.09 ns 1.00 0.00 0.2089 - - 1.71 KB
ResolveEnumerableT 1 2,914.0 ns 33.25 ns 29.48 ns ? ? 0.7057 0.0038 - 5.79 KB
ResolveT 1 1,412.9 ns 15.78 ns 13.99 ns ? ? 0.4330 0.0019 - 3.55 KB
ResolveEnumerableT 2 4,999.8 ns 46.34 ns 43.35 ns ? ? 1.2054 0.0076 - 9.87 KB
ResolveT 2 2,245.1 ns 7.98 ns 7.47 ns ? ? 0.6561 0.0038 - 5.38 KB
ResolveEnumerableT 3 7,210.7 ns 24.58 ns 22.99 ns ? ? 1.7014 0.0153 - 13.95 KB
ResolveT 3 2,955.0 ns 14.06 ns 13.16 ns ? ? 0.8812 0.0038 - 7.22 KB

Autofac.Benchmarks.EnumerableResolveBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
ResolveIEnumerable 2.380 us 0.0052 us 0.0046 us 0.4311 - - 3.54 KB
ResolveIReadOnlyList 2.407 us 0.0074 us 0.0069 us 0.4349 - - 3.57 KB
ResolveArray 2.395 us 0.0058 us 0.0054 us 0.4311 - - 3.54 KB

Autofac.Benchmarks.Decorators.KeylessSimpleSharedInstanceBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method repetitions Mean Error StdDev Ratio RatioSD Gen 0 Gen 1 Gen 2 Allocated
Baseline ? 475.8 ns 1.85 ns 1.73 ns 1.00 0.00 0.2093 - - 1.71 KB
ResolveEnumerableT 1 3,197.1 ns 5.28 ns 4.68 ns ? ? 0.7362 0.0038 - 6.02 KB
ResolveT 1 1,679.8 ns 6.60 ns 6.18 ns ? ? 0.4787 0.0038 - 3.92 KB
ResolveEnumerableT 2 4,889.0 ns 30.37 ns 28.40 ns ? ? 1.1292 0.0076 - 9.24 KB
ResolveT 2 2,278.6 ns 12.41 ns 11.61 ns ? ? 0.6523 - - 5.33 KB
ResolveEnumerableT 3 6,405.0 ns 25.09 ns 23.47 ns ? ? 1.5182 0.0076 - 12.46 KB
ResolveT 3 2,888.5 ns 33.04 ns 30.90 ns ? ? 0.8240 0.0038 - 6.73 KB

Autofac.Benchmarks.Decorators.KeylessSimpleSharedInstanceLambdaBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method repetitions Mean Error StdDev Ratio RatioSD Gen 0 Gen 1 Gen 2 Allocated
Baseline ? 479.9 ns 4.96 ns 4.63 ns 1.00 0.00 0.2089 - - 1.71 KB
ResolveEnumerableT 1 3,061.2 ns 10.73 ns 10.04 ns ? ? 0.7019 0.0038 - 5.73 KB
ResolveT 1 1,608.9 ns 8.39 ns 7.85 ns ? ? 0.4444 0.0019 - 3.63 KB
ResolveEnumerableT 2 4,845.8 ns 24.08 ns 22.53 ns ? ? 1.0910 0.0076 - 8.95 KB
ResolveT 2 2,246.8 ns 5.09 ns 4.76 ns ? ? 0.6142 0.0038 - 5.04 KB
ResolveEnumerableT 3 6,631.4 ns 13.26 ns 12.40 ns ? ? 1.4877 0.0076 - 12.17 KB
ResolveT 3 2,784.6 ns 25.19 ns 23.56 ns ? ? 0.7858 0.0038 - 6.45 KB

Autofac.Benchmarks.Decorators.KeyedGenericBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method repetitions Mean Error StdDev Ratio RatioSD Gen 0 Gen 1 Gen 2 Allocated
Baseline ? 477.2 ns 1.18 ns 1.10 ns 1.00 0.00 0.2093 0.0010 - 1.71 KB
ResolveEnumerableT 1 2,487.0 ns 11.16 ns 10.44 ns ? ? 0.5684 0.0038 - 4.67 KB
ResolveT 1 1,212.4 ns 2.92 ns 2.73 ns ? ? 0.3605 0.0019 - 2.95 KB
ResolveEnumerableT 2 4,496.7 ns 35.23 ns 32.96 ns ? ? 0.9308 0.0076 - 7.63 KB
ResolveT 2 1,890.0 ns 8.18 ns 7.65 ns ? ? 0.5112 0.0019 - 4.18 KB
ResolveEnumerableT 3 6,476.4 ns 15.99 ns 14.96 ns ? ? 1.2894 0.0076 - 10.59 KB
ResolveT 3 2,621.5 ns 12.05 ns 11.27 ns ? ? 0.6599 0.0038 - 5.41 KB

Autofac.Benchmarks.Decorators.KeyedSimpleBenchmark-report-github.md

BenchmarkDotNet=v0.12.0, OS=Windows 10.0.18363
Intel Core i9-9900K CPU 3.60GHz (Coffee Lake), 1 CPU, 16 logical and 8 physical cores
.NET Core SDK=3.1.200
  [Host]     : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT
  DefaultJob : .NET Core 3.1.3 (CoreCLR 4.700.20.11803, CoreFX 4.700.20.12001), X64 RyuJIT

Method repetitions Mean Error StdDev Ratio RatioSD Gen 0 Gen 1 Gen 2 Allocated
Baseline ? 476.4 ns 3.38 ns 3.16 ns 1.00 0.00 0.2089 - - 1.71 KB
ResolveEnumerableT 1 2,382.0 ns 17.09 ns 15.99 ns ? ? 0.4883 0.0038 - 4.02 KB
ResolveT 1 1,079.1 ns 4.29 ns 4.01 ns ? ? 0.3185 - - 2.62 KB
ResolveEnumerableT 2 3,962.4 ns 16.25 ns 15.20 ns ? ? 0.7706 - - 6.32 KB
ResolveT 2 1,633.9 ns 4.82 ns 4.51 ns ? ? 0.4311 0.0019 - 3.52 KB
ResolveEnumerableT 3 5,574.7 ns 17.23 ns 16.12 ns ? ? 1.0529 0.0076 - 8.63 KB
ResolveT 3 2,204.8 ns 10.00 ns 9.36 ns ? ? 0.5417 - - 4.43 KB

@alistairjevans
Copy link
Member

Cool, I didn't actually know about the collapsible markdown, that's a neat trick. Thanks for the efforts on getting the extra benchmarks sorted; we're in a good place to assess any of the decorator lifetime changes now! 🎉

@alistairjevans alistairjevans merged commit 20ec12c into autofac:develop May 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants