Update Metrics benchmarks (#4472)

Co-authored-by: Cijo Thomas <cithomas@microsoft.com>
This commit is contained in:
Utkarsh Umesan Pillai 2023-05-09 07:42:46 -07:00 committed by GitHub
parent 085df7a6a0
commit 67f01170a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 77 additions and 80 deletions

View File

@ -22,23 +22,21 @@ using OpenTelemetry.Metrics;
using OpenTelemetry.Tests;
/*
// * Summary *
BenchmarkDotNet=v0.13.3, OS=Windows 10 (10.0.19045.2604)
Intel Core i7-4790 CPU 3.60GHz (Haswell), 1 CPU, 8 logical and 4 physical cores
.NET SDK=7.0.103
[Host] : .NET 7.0.3 (7.0.323.6910), X64 RyuJIT AVX2
DefaultJob : .NET 7.0.3 (7.0.323.6910), X64 RyuJIT AVX2
BenchmarkDotNet=v0.13.5, OS=Windows 11 (10.0.23424.1000)
Intel Core i7-9700 CPU 3.00GHz, 1 CPU, 8 logical and 8 physical cores
.NET SDK=7.0.203
[Host] : .NET 7.0.5 (7.0.523.17405), X64 RyuJIT AVX2
DefaultJob : .NET 7.0.5 (7.0.523.17405), X64 RyuJIT AVX2
| Method | ExemplarFilter | Mean | Error | StdDev |
|-------------------------- |--------------- |---------:|--------:|--------:|
| HistogramNoTagReduction | AlwaysOff | 380.7 ns | 5.92 ns | 5.53 ns |
| HistogramWithTagReduction | AlwaysOff | 356.5 ns | 3.33 ns | 2.95 ns |
| HistogramNoTagReduction | AlwaysOn | 412.3 ns | 2.11 ns | 1.64 ns |
| HistogramWithTagReduction | AlwaysOn | 461.0 ns | 4.65 ns | 4.35 ns |
| HistogramNoTagReduction | HighValueOnly | 378.3 ns | 2.22 ns | 2.08 ns |
| HistogramWithTagReduction | HighValueOnly | 383.1 ns | 7.48 ns | 7.35 ns |
| Method | ExemplarFilter | Mean | Error | StdDev | Allocated |
|-------------------------- |--------------- |---------:|--------:|--------:|----------:|
| HistogramNoTagReduction | AlwaysOff | 315.5 ns | 5.93 ns | 5.55 ns | - |
| HistogramWithTagReduction | AlwaysOff | 296.4 ns | 0.95 ns | 0.89 ns | - |
| HistogramNoTagReduction | AlwaysOn | 366.5 ns | 6.96 ns | 7.74 ns | - |
| HistogramWithTagReduction | AlwaysOn | 397.1 ns | 4.09 ns | 3.82 ns | - |
| HistogramNoTagReduction | HighValueOnly | 364.8 ns | 2.73 ns | 2.28 ns | - |
| HistogramWithTagReduction | HighValueOnly | 391.9 ns | 4.38 ns | 4.10 ns | - |
*/
namespace Benchmarks.Metrics

View File

@ -22,35 +22,35 @@ using OpenTelemetry.Metrics;
using OpenTelemetry.Tests;
/*
BenchmarkDotNet=v0.13.3, OS=Windows 11 (10.0.22621.963)
BenchmarkDotNet=v0.13.5, OS=Windows 11 (10.0.23424.1000)
Intel Core i7-9700 CPU 3.00GHz, 1 CPU, 8 logical and 8 physical cores
.NET SDK=7.0.101
[Host] : .NET 7.0.1 (7.0.122.56804), X64 RyuJIT AVX2
DefaultJob : .NET 7.0.1 (7.0.122.56804), X64 RyuJIT AVX2
.NET SDK=7.0.203
[Host] : .NET 7.0.5 (7.0.523.17405), X64 RyuJIT AVX2
DefaultJob : .NET 7.0.5 (7.0.523.17405), X64 RyuJIT AVX2
| Method | BoundCount | Mean | Error | StdDev | Allocated |
|---------------------------- |----------- |----------:|----------:|----------:|----------:|
| HistogramHotPath | 10 | 47.80 ns | 0.111 ns | 0.098 ns | - |
| HistogramWith1LabelHotPath | 10 | 99.18 ns | 0.448 ns | 0.419 ns | - |
| HistogramWith3LabelsHotPath | 10 | 189.60 ns | 0.872 ns | 0.815 ns | - |
| HistogramWith5LabelsHotPath | 10 | 263.10 ns | 2.813 ns | 2.494 ns | - |
| HistogramWith7LabelsHotPath | 10 | 309.09 ns | 1.603 ns | 1.421 ns | - |
| HistogramHotPath | 49 | 61.80 ns | 0.282 ns | 0.235 ns | - |
| HistogramWith1LabelHotPath | 49 | 111.22 ns | 0.347 ns | 0.290 ns | - |
| HistogramWith3LabelsHotPath | 49 | 203.53 ns | 2.263 ns | 2.006 ns | - |
| HistogramWith5LabelsHotPath | 49 | 278.45 ns | 2.401 ns | 2.005 ns | - |
| HistogramWith7LabelsHotPath | 49 | 331.96 ns | 4.160 ns | 3.892 ns | - |
| HistogramHotPath | 50 | 62.30 ns | 0.385 ns | 0.342 ns | - |
| HistogramWith1LabelHotPath | 50 | 108.47 ns | 0.132 ns | 0.111 ns | - |
| HistogramWith3LabelsHotPath | 50 | 237.33 ns | 3.291 ns | 3.079 ns | - |
| HistogramWith5LabelsHotPath | 50 | 316.26 ns | 1.989 ns | 1.763 ns | - |
| HistogramWith7LabelsHotPath | 50 | 359.67 ns | 2.359 ns | 2.091 ns | - |
| HistogramHotPath | 1000 | 82.72 ns | 0.366 ns | 0.286 ns | - |
| HistogramWith1LabelHotPath | 1000 | 134.84 ns | 1.502 ns | 1.331 ns | - |
| HistogramWith3LabelsHotPath | 1000 | 555.89 ns | 3.501 ns | 2.923 ns | - |
| HistogramWith5LabelsHotPath | 1000 | 645.98 ns | 11.965 ns | 9.991 ns | - |
| HistogramWith7LabelsHotPath | 1000 | 700.72 ns | 13.467 ns | 12.597 ns | - |
| Method | BoundCount | Mean | Error | StdDev | Median | Allocated |
|---------------------------- |----------- |----------:|----------:|----------:|----------:|----------:|
| HistogramHotPath | 10 | 50.11 ns | 0.219 ns | 0.204 ns | 50.06 ns | - |
| HistogramWith1LabelHotPath | 10 | 108.52 ns | 0.559 ns | 0.523 ns | 108.44 ns | - |
| HistogramWith3LabelsHotPath | 10 | 212.31 ns | 1.873 ns | 1.661 ns | 212.32 ns | - |
| HistogramWith5LabelsHotPath | 10 | 299.97 ns | 5.162 ns | 5.737 ns | 298.60 ns | - |
| HistogramWith7LabelsHotPath | 10 | 349.53 ns | 2.115 ns | 1.875 ns | 349.62 ns | - |
| HistogramHotPath | 49 | 61.34 ns | 0.171 ns | 0.160 ns | 61.35 ns | - |
| HistogramWith1LabelHotPath | 49 | 118.64 ns | 1.539 ns | 1.285 ns | 118.09 ns | - |
| HistogramWith3LabelsHotPath | 49 | 226.70 ns | 1.653 ns | 1.465 ns | 226.62 ns | - |
| HistogramWith5LabelsHotPath | 49 | 314.40 ns | 5.185 ns | 4.850 ns | 313.96 ns | - |
| HistogramWith7LabelsHotPath | 49 | 375.37 ns | 5.796 ns | 5.138 ns | 373.76 ns | - |
| HistogramHotPath | 50 | 60.08 ns | 0.062 ns | 0.049 ns | 60.08 ns | - |
| HistogramWith1LabelHotPath | 50 | 118.16 ns | 0.640 ns | 0.568 ns | 118.03 ns | - |
| HistogramWith3LabelsHotPath | 50 | 258.96 ns | 3.710 ns | 3.098 ns | 259.70 ns | - |
| HistogramWith5LabelsHotPath | 50 | 353.81 ns | 5.646 ns | 5.281 ns | 351.81 ns | - |
| HistogramWith7LabelsHotPath | 50 | 406.75 ns | 6.491 ns | 6.072 ns | 406.01 ns | - |
| HistogramHotPath | 1000 | 86.82 ns | 0.543 ns | 0.481 ns | 86.68 ns | - |
| HistogramWith1LabelHotPath | 1000 | 147.04 ns | 0.535 ns | 0.447 ns | 146.88 ns | - |
| HistogramWith3LabelsHotPath | 1000 | 619.11 ns | 10.943 ns | 14.608 ns | 617.10 ns | - |
| HistogramWith5LabelsHotPath | 1000 | 759.64 ns | 22.509 ns | 63.855 ns | 737.58 ns | - |
| HistogramWith7LabelsHotPath | 1000 | 760.85 ns | 6.220 ns | 5.514 ns | 761.68 ns | - |
*/
namespace Benchmarks.Metrics

View File

@ -21,17 +21,17 @@ using OpenTelemetry.Metrics;
using OpenTelemetry.Tests;
/*
BenchmarkDotNet=v0.12.1, OS=Windows 10.0.19043
Intel Core i7-8650U CPU 1.90GHz (Kaby Lake R), 1 CPU, 8 logical and 4 physical cores
.NET Core SDK=5.0.400
[Host] : .NET Core 3.1.18 (CoreCLR 4.700.21.35901, CoreFX 4.700.21.36305), X64 RyuJIT
DefaultJob : .NET Core 3.1.18 (CoreCLR 4.700.21.35901, CoreFX 4.700.21.36305), X64 RyuJIT
BenchmarkDotNet=v0.13.5, OS=Windows 11 (10.0.23424.1000)
Intel Core i7-9700 CPU 3.00GHz, 1 CPU, 8 logical and 8 physical cores
.NET SDK=7.0.203
[Host] : .NET 7.0.5 (7.0.523.17405), X64 RyuJIT AVX2
DefaultJob : .NET 7.0.5 (7.0.523.17405), X64 RyuJIT AVX2
| Method | UseWithRef | Mean | Error | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
|-------- |----------- |---------:|---------:|---------:|------:|------:|------:|----------:|
| Collect | False | 51.38 us | 1.027 us | 1.261 us | - | - | - | 136 B |
| Collect | True | 33.86 us | 0.716 us | 2.088 us | - | - | - | 136 B |
| Method | UseWithRef | Mean | Error | StdDev | Gen0 | Allocated |
|-------- |----------- |---------:|---------:|---------:|-------:|----------:|
| Collect | False | 16.24 us | 0.233 us | 0.621 us | 0.0153 | 160 B |
| Collect | True | 12.94 us | 0.092 us | 0.081 us | 0.0153 | 160 B |
*/
namespace Benchmarks.Metrics

View File

@ -22,28 +22,27 @@ using OpenTelemetry.Metrics;
using OpenTelemetry.Tests;
/*
// * Summary *
BenchmarkDotNet=v0.13.3, OS=Windows 11 (10.0.22621.963)
BenchmarkDotNet=v0.13.5, OS=Windows 11 (10.0.23424.1000)
Intel Core i7-9700 CPU 3.00GHz, 1 CPU, 8 logical and 8 physical cores
.NET SDK=7.0.101
[Host] : .NET 7.0.1 (7.0.122.56804), X64 RyuJIT AVX2
DefaultJob : .NET 7.0.1 (7.0.122.56804), X64 RyuJIT AVX2
.NET SDK=7.0.203
[Host] : .NET 7.0.5 (7.0.523.17405), X64 RyuJIT AVX2
DefaultJob : .NET 7.0.5 (7.0.523.17405), X64 RyuJIT AVX2
| Method | AggregationTemporality | Mean | Error | StdDev | Allocated |
|-------------------------- |----------------------- |----------:|---------:|---------:|----------:|
| CounterHotPath | Cumulative | 13.83 ns | 0.030 ns | 0.026 ns | - |
| CounterWith1LabelsHotPath | Cumulative | 60.59 ns | 0.075 ns | 0.067 ns | - |
| CounterWith3LabelsHotPath | Cumulative | 141.04 ns | 0.422 ns | 0.395 ns | - |
| CounterWith5LabelsHotPath | Cumulative | 221.42 ns | 0.923 ns | 0.818 ns | - |
| CounterWith6LabelsHotPath | Cumulative | 252.18 ns | 1.040 ns | 0.973 ns | - |
| CounterWith7LabelsHotPath | Cumulative | 278.59 ns | 0.457 ns | 0.428 ns | - |
| CounterHotPath | Delta | 13.76 ns | 0.024 ns | 0.023 ns | - |
| CounterWith1LabelsHotPath | Delta | 62.50 ns | 0.094 ns | 0.083 ns | - |
| CounterWith3LabelsHotPath | Delta | 140.97 ns | 0.590 ns | 0.523 ns | - |
| CounterWith5LabelsHotPath | Delta | 222.37 ns | 0.467 ns | 0.390 ns | - |
| CounterWith6LabelsHotPath | Delta | 254.25 ns | 1.387 ns | 1.298 ns | - |
| CounterWith7LabelsHotPath | Delta | 279.22 ns | 0.843 ns | 0.747 ns | - |
| CounterHotPath | Cumulative | 17.06 ns | 0.113 ns | 0.094 ns | - |
| CounterWith1LabelsHotPath | Cumulative | 71.47 ns | 1.464 ns | 2.100 ns | - |
| CounterWith3LabelsHotPath | Cumulative | 162.04 ns | 2.469 ns | 2.188 ns | - |
| CounterWith5LabelsHotPath | Cumulative | 237.30 ns | 2.884 ns | 2.698 ns | - |
| CounterWith6LabelsHotPath | Cumulative | 269.41 ns | 4.087 ns | 3.623 ns | - |
| CounterWith7LabelsHotPath | Cumulative | 303.01 ns | 5.313 ns | 4.970 ns | - |
| CounterHotPath | Delta | 17.30 ns | 0.350 ns | 0.310 ns | - |
| CounterWith1LabelsHotPath | Delta | 70.96 ns | 0.608 ns | 0.539 ns | - |
| CounterWith3LabelsHotPath | Delta | 156.55 ns | 3.139 ns | 3.358 ns | - |
| CounterWith5LabelsHotPath | Delta | 247.14 ns | 4.703 ns | 5.598 ns | - |
| CounterWith6LabelsHotPath | Delta | 271.30 ns | 5.310 ns | 5.215 ns | - |
| CounterWith7LabelsHotPath | Delta | 309.02 ns | 5.934 ns | 5.828 ns | - |
*/
namespace Benchmarks.Metrics

View File

@ -22,20 +22,20 @@ using OpenTelemetry.Metrics;
using OpenTelemetry.Tests;
/*
BenchmarkDotNet=v0.13.2, OS=Windows 10 (10.0.19044.2130/21H2/November2021Update)
Intel Core i7-4790 CPU 3.60GHz (Haswell), 1 CPU, 8 logical and 4 physical cores
.NET SDK=7.0.100-preview.7.22377.5
[Host] : .NET 6.0.10 (6.0.1022.47605), X64 RyuJIT AVX2
DefaultJob : .NET 6.0.10 (6.0.1022.47605), X64 RyuJIT AVX2
BenchmarkDotNet=v0.13.5, OS=Windows 11 (10.0.23424.1000)
Intel Core i7-9700 CPU 3.00GHz, 1 CPU, 8 logical and 8 physical cores
.NET SDK=7.0.203
[Host] : .NET 7.0.5 (7.0.523.17405), X64 RyuJIT AVX2
DefaultJob : .NET 7.0.5 (7.0.523.17405), X64 RyuJIT AVX2
| Method | ViewConfig | Mean | Error | StdDev | Median | Allocated |
|--------------- |------------- |---------:|--------:|---------:|---------:|----------:|
| CounterHotPath | NoView | 289.3 ns | 5.80 ns | 9.20 ns | 285.0 ns | - |
| CounterHotPath | ViewNA | 295.7 ns | 5.91 ns | 11.38 ns | 289.6 ns | - |
| CounterHotPath | ViewApplied | 298.7 ns | 2.54 ns | 2.12 ns | 298.6 ns | - |
| CounterHotPath | ViewToRename | 294.7 ns | 2.15 ns | 1.80 ns | 294.5 ns | - |
| CounterHotPath | ViewZeroTag | 112.4 ns | 1.83 ns | 1.96 ns | 111.5 ns | - |
| Method | ViewConfig | Mean | Error | StdDev | Allocated |
|--------------- |------------- |---------:|--------:|--------:|----------:|
| CounterHotPath | NoView | 254.6 ns | 1.62 ns | 1.27 ns | - |
| CounterHotPath | ViewNA | 257.9 ns | 3.00 ns | 2.80 ns | - |
| CounterHotPath | ViewApplied | 282.7 ns | 5.60 ns | 6.45 ns | - |
| CounterHotPath | ViewToRename | 256.8 ns | 0.83 ns | 0.70 ns | - |
| CounterHotPath | ViewZeroTag | 112.1 ns | 1.87 ns | 1.75 ns | - |
*/
namespace Benchmarks.Metrics