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

Binary search for large bucket count histograms #3252

Merged
merged 51 commits into from
Sep 2, 2022
Merged
Changes from 2 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
a69121c
Binary search for large bucket count histograms
mic-max May 4, 2022
6e446cd
Update CHANGELOG.md
mic-max May 4, 2022
e420a15
netcoreapp3.1 was complaining
mic-max May 4, 2022
e8913b2
ci rerun
mic-max May 4, 2022
4ade35a
ci rerun
mic-max May 4, 2022
52e2c43
Update MetricTestData.cs
mic-max May 4, 2022
f7e88af
use 400 buckets
mic-max May 12, 2022
51d7219
Update ExplicitBucketHistogramConfiguration.cs
mic-max May 4, 2022
1bb61e9
separate nan part
mic-max May 12, 2022
685b46e
Address PR comments
mic-max May 12, 2022
773fefd
Merge branch 'hist-binary' of https://github.com/mic-max/opentelemetr…
mic-max May 12, 2022
de60b0e
update to 140
mic-max May 12, 2022
020c42e
remove double.nan from invalid hist bounds
mic-max May 12, 2022
daf1a80
Refactor and perf to histogram bucket index find
mic-max May 25, 2022
5bc4998
fine tune bound limit to switch to binary search
mic-max May 26, 2022
e84127a
included benchmark results in comment
mic-max May 26, 2022
0e939b6
new bench result
mic-max May 26, 2022
fb1ad6b
histogram stress test update
mic-max Jun 9, 2022
99bd6f1
Merge remote-tracking branch 'upstream/main' into hist-binary
mic-max Jun 28, 2022
05cc3c1
fix changelog
mic-max Jun 28, 2022
15c3464
spacing fix
mic-max Jun 28, 2022
a2c0e5d
sealed bucket class
mic-max Jul 1, 2022
ef28da0
ci
mic-max Jul 1, 2022
1810ddd
Merge branch 'main' into hist-binary
mic-max Jul 1, 2022
543a6d5
double.negative infinity
mic-max Jul 5, 2022
19ddae3
Merge branch 'hist-binary' of https://github.com/mic-max/opentelemetr…
mic-max Jul 5, 2022
f2a20f7
update order of operations
mic-max Jul 5, 2022
c9f3a3d
remove stress test change
mic-max Jul 5, 2022
a201b86
ci
mic-max Jul 5, 2022
d0d92a7
Add histogram binary mode tests
mic-max Jul 6, 2022
7f8d32b
ci
mic-max Jul 6, 2022
53ad017
Merge branch 'main' into hist-binary
utpilla Jul 6, 2022
b41879c
Merge branch 'main' into hist-binary
mic-max Jul 8, 2022
dbc5f3e
pr review changes
mic-max Jul 11, 2022
3046ac7
Merge branch 'hist-binary' of https://github.com/mic-max/opentelemetr…
mic-max Jul 11, 2022
881caca
Merge branch 'main' into hist-binary
mic-max Jul 11, 2022
370fb1a
allocated column - hist benchmark
mic-max Jul 12, 2022
07689ac
Merge branch 'hist-binary' of https://github.com/mic-max/opentelemetr…
mic-max Jul 12, 2022
4fe19f9
Merge branch 'main' into hist-binary
mic-max Jul 12, 2022
4d97b4e
Merge branch 'main' into hist-binary
utpilla Jul 15, 2022
8307bf8
Merge branch 'main' into hist-binary
mic-max Jul 26, 2022
3b2f762
CI
mic-max Jul 26, 2022
2030736
Merge branch 'hist-binary' of https://github.com/mic-max/opentelemetr…
mic-max Jul 26, 2022
42b1def
Merge branch 'main' into hist-binary
utpilla Jul 27, 2022
adb6945
Merge branch 'main' into hist-binary
utpilla Jul 28, 2022
90a95e6
Merge branch 'hist-binary' of https://github.com/mic-max/opentelemetr…
mic-max Aug 2, 2022
21de441
Merge branch 'main' into hist-binary
mic-max Aug 3, 2022
7806dbc
Merge branch 'main' into hist-binary
mic-max Aug 9, 2022
e7212ac
Merge branch 'main' into hist-binary
mic-max Aug 25, 2022
9a3025c
Merge branch 'main' into hist-binary
mic-max Aug 31, 2022
2bb1212
Merge branch 'main' into hist-binary
cijothomas Sep 2, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions test/Benchmarks/Metrics/HistogramBenchmarks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,35 +24,35 @@
using OpenTelemetry.Tests;

/*
BenchmarkDotNet=v0.13.1, OS=Windows 10.0.22000
Intel Core i7-1065G7 CPU 1.30GHz, 1 CPU, 8 logical and 4 physical cores
BenchmarkDotNet=v0.13.1, OS=Windows 10.0.19044.1706 (21H2)
AMD Ryzen 9 3900X, 1 CPU, 24 logical and 12 physical cores
mic-max marked this conversation as resolved.
Show resolved Hide resolved
.NET SDK=6.0.203
[Host] : .NET 6.0.5 (6.0.522.21309), X64 RyuJIT
DefaultJob : .NET 6.0.5 (6.0.522.21309), X64 RyuJIT


| Method | BoundCount | Mean | Error | StdDev | Allocated |
|---------------------------- |----------- |----------:|----------:|----------:|----------:|
| HistogramHotPath | 10 | 55.07 ns | 0.664 ns | 1.091 ns | - |
| HistogramWith1LabelHotPath | 10 | 108.66 ns | 1.324 ns | 1.174 ns | - |
| HistogramWith3LabelsHotPath | 10 | 193.79 ns | 3.261 ns | 3.349 ns | - |
| HistogramWith5LabelsHotPath | 10 | 279.44 ns | 4.608 ns | 3.848 ns | - |
| HistogramWith7LabelsHotPath | 10 | 334.28 ns | 6.650 ns | 5.895 ns | - |
| HistogramHotPath | 49 | 68.27 ns | 0.744 ns | 0.581 ns | - |
| HistogramWith1LabelHotPath | 49 | 125.55 ns | 2.265 ns | 2.518 ns | - |
| HistogramWith3LabelsHotPath | 49 | 207.95 ns | 4.023 ns | 3.951 ns | - |
| HistogramWith5LabelsHotPath | 49 | 293.45 ns | 5.689 ns | 5.842 ns | - |
| HistogramWith7LabelsHotPath | 49 | 362.19 ns | 5.610 ns | 6.003 ns | - |
| HistogramHotPath | 50 | 69.64 ns | 1.422 ns | 1.330 ns | - |
| HistogramWith1LabelHotPath | 50 | 118.15 ns | 2.040 ns | 1.908 ns | - |
| HistogramWith3LabelsHotPath | 50 | 250.31 ns | 4.617 ns | 9.326 ns | - |
| HistogramWith5LabelsHotPath | 50 | 335.31 ns | 3.904 ns | 3.461 ns | - |
| HistogramWith7LabelsHotPath | 50 | 398.02 ns | 6.815 ns | 6.374 ns | - |
| HistogramHotPath | 1000 | 94.05 ns | 1.890 ns | 2.100 ns | - |
| HistogramWith1LabelHotPath | 1000 | 148.57 ns | 2.055 ns | 1.822 ns | - |
| HistogramWith3LabelsHotPath | 1000 | 661.78 ns | 11.599 ns | 20.314 ns | - |
| HistogramWith5LabelsHotPath | 1000 | 761.54 ns | 15.049 ns | 16.727 ns | - |
| HistogramWith7LabelsHotPath | 1000 | 830.14 ns | 16.063 ns | 17.853 ns | - |
| Method | BoundCount | Mean | Error | StdDev |
mic-max marked this conversation as resolved.
Show resolved Hide resolved
|---------------------------- |----------- |----------:|----------:|----------:|
| HistogramHotPath | 10 | 45.19 ns | 0.321 ns | 0.285 ns |
| HistogramWith1LabelHotPath | 10 | 97.21 ns | 0.129 ns | 0.114 ns |
| HistogramWith3LabelsHotPath | 10 | 179.77 ns | 0.270 ns | 0.239 ns |
| HistogramWith5LabelsHotPath | 10 | 263.30 ns | 2.423 ns | 2.267 ns |
| HistogramWith7LabelsHotPath | 10 | 338.42 ns | 3.121 ns | 2.919 ns |
| HistogramHotPath | 49 | 56.18 ns | 0.593 ns | 0.554 ns |
| HistogramWith1LabelHotPath | 49 | 110.60 ns | 0.815 ns | 0.762 ns |
| HistogramWith3LabelsHotPath | 49 | 193.30 ns | 1.048 ns | 0.980 ns |
| HistogramWith5LabelsHotPath | 49 | 281.55 ns | 1.638 ns | 1.532 ns |
| HistogramWith7LabelsHotPath | 49 | 343.88 ns | 2.148 ns | 2.010 ns |
| HistogramHotPath | 50 | 57.46 ns | 0.264 ns | 0.234 ns |
| HistogramWith1LabelHotPath | 50 | 121.73 ns | 0.372 ns | 0.348 ns |
| HistogramWith3LabelsHotPath | 50 | 227.95 ns | 1.074 ns | 1.004 ns |
| HistogramWith5LabelsHotPath | 50 | 313.15 ns | 1.068 ns | 0.999 ns |
| HistogramWith7LabelsHotPath | 50 | 377.04 ns | 1.191 ns | 0.930 ns |
| HistogramHotPath | 1000 | 78.33 ns | 0.441 ns | 0.391 ns |
| HistogramWith1LabelHotPath | 1000 | 127.57 ns | 0.457 ns | 0.428 ns |
| HistogramWith3LabelsHotPath | 1000 | 494.19 ns | 4.490 ns | 3.980 ns |
| HistogramWith5LabelsHotPath | 1000 | 608.75 ns | 11.306 ns | 10.576 ns |
| HistogramWith7LabelsHotPath | 1000 | 649.16 ns | 3.273 ns | 2.555 ns |
*/

namespace Benchmarks.Metrics
Expand Down