-
Notifications
You must be signed in to change notification settings - Fork 494
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
Draft: 3892: Adding metrics to Azure Benchmark tool #3897
Closed
M-Lipin
wants to merge
10
commits into
Azure:master
from
M-Lipin:users/v-milipin/benchmark-metrics-3892
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
9bd7ba8
Adding metrics to Azure Benchmark tool.
M-Lipin b34ba6e
Adding 999 and 9999 quantiles.
M-Lipin 36308e6
Base classes for operations.
M-Lipin f450f54
Separating operations and metrics collecting, refactoring, code clean…
M-Lipin f644c20
Tracking percentiles with AppInsights TelemetryClient.
92adc38
Moving back to OpenTelemetry.
270aece
Adding gauges.
33a2597
Adding configurable flush interval.
7888b8e
Adding ARM template for Dashboard.
c55f4c2
Adding Application Insights resource.
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
15 changes: 15 additions & 0 deletions
15
Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/Fx/BenchmarkOperation.cs
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,15 @@ | ||
//------------------------------------------------------------ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
//------------------------------------------------------------ | ||
|
||
namespace CosmosBenchmark | ||
{ | ||
using System.Threading.Tasks; | ||
|
||
internal abstract class BenchmarkOperation : IBenchmarkOperation | ||
{ | ||
public abstract Task<OperationResult> ExecuteOnceAsync(); | ||
|
||
public abstract Task PrepareAsync(); | ||
} | ||
} |
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
15 changes: 15 additions & 0 deletions
15
Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/Fx/IMetricsCollector.cs
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,15 @@ | ||
//------------------------------------------------------------ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
//------------------------------------------------------------ | ||
|
||
namespace CosmosBenchmark | ||
{ | ||
public interface IMetricsCollector | ||
{ | ||
void RecordLatencyAndRps(double milliseconds); | ||
|
||
void CollectMetricsOnSuccess(); | ||
|
||
void CollectMetricsOnFailure(); | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/Fx/InsertBenchmarkOperation.cs
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,10 @@ | ||
//------------------------------------------------------------ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
//------------------------------------------------------------ | ||
|
||
namespace CosmosBenchmark | ||
{ | ||
internal abstract class InsertBenchmarkOperation : BenchmarkOperation | ||
{ | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/Fx/InsertOperationMetricsCollector.cs
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,28 @@ | ||
//------------------------------------------------------------ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
//------------------------------------------------------------ | ||
|
||
namespace CosmosBenchmark | ||
{ | ||
using Microsoft.ApplicationInsights; | ||
using System.Diagnostics.Metrics; | ||
|
||
internal class InsertOperationMetricsCollector : MetricsCollector | ||
{ | ||
public InsertOperationMetricsCollector(Meter meter) : base(meter) | ||
{ | ||
} | ||
|
||
protected override string RpsHistogramName => "InsertOperationRpsHistogram"; | ||
|
||
protected override string LatencyInMsHistogramName => "InsertOperationLatencyInMsHistogram"; | ||
|
||
protected override string RpsMetricName => "InsertOperationRps"; | ||
|
||
protected override string LatencyInMsMetricName => "InsertOperationLatencyInMs"; | ||
|
||
protected override string FailureOperationMetricName => "InsertOperationFailure"; | ||
|
||
protected override string SuccessOperationMetricName => "InsertOperationSuccess"; | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
NOTE: Required.