-
Notifications
You must be signed in to change notification settings - Fork 772
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
Use lock for Histogram #3547
Use lock for Histogram #3547
Conversation
using System.Threading; | ||
using BenchmarkDotNet.Attributes; | ||
|
||
namespace Benchmarks.Metrics |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignore this file.
Codecov Report
@@ Coverage Diff @@
## main #3547 +/- ##
==========================================
+ Coverage 87.04% 87.17% +0.13%
==========================================
Files 275 275
Lines 9959 9951 -8
==========================================
+ Hits 8669 8675 +6
+ Misses 1290 1276 -14
|
This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or Pushing will instruct the bot to automatically remove the label. This bot runs once per day. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
Use lock for Histogram updates
Stress Test Results (high contention) with Prometheus Exporter scraping interval = 10s
Multiple threads updating the same Histogram MetricPoint in parallel
Stress Test Results (low contention) with Prometheus Exporter scraping interval = 10s
Multiple threads updating random Histogram MetricPoints in parallel
Benchmark Results
// * Summary *
BenchmarkDotNet=v0.13.1, OS=Windows 10.0.22000
Intel Core i7-9700 CPU 3.00GHz, 1 CPU, 8 logical and 8 physical cores
.NET SDK=6.0.302
[Host] : .NET 6.0.7 (6.0.722.32202), X64 RyuJIT
DefaultJob : .NET 6.0.7 (6.0.722.32202), X64 RyuJIT