-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a423dde
commit b2b6704
Showing
4 changed files
with
39 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using Vostok.Metrics.Primitives.Timer; | ||
|
||
namespace Vostok.Hercules.Consumers.Helpers | ||
{ | ||
internal static class HistogramHelper | ||
{ | ||
public static HistogramBuckets CreateDefaultBuckets() | ||
{ | ||
var upperBounds = new double[30]; | ||
|
||
upperBounds[0] = 0; | ||
upperBounds[1] = 1; | ||
for (var i = 2; i < upperBounds.Length; i++) | ||
upperBounds[i] = upperBounds[i - 1] * 2; | ||
|
||
return new HistogramBuckets(upperBounds); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters