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

Use UpDownCounter for grain and system target counts #8781

Merged
merged 1 commit into from
Dec 17, 2023
Merged
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions src/Orleans.Core/Diagnostics/Metrics/GrainInstruments.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ static GrainInstruments()
GrainMetricsListener.Start();
}

internal static Counter<int> GrainCounts = Instruments.Meter.CreateCounter<int>(InstrumentNames.GRAIN_COUNTS);
internal static UpDownCounter<int> GrainCounts = Instruments.Meter.CreateUpDownCounter<int>(InstrumentNames.GRAIN_COUNTS);
internal static void IncrementGrainCounts(string grainTypeName)
{
GrainCounts.Add(1, new KeyValuePair<string, object>("type", grainTypeName));
Expand All @@ -20,7 +20,7 @@ internal static void DecrementGrainCounts(string grainTypeName)
GrainCounts.Add(-1, new KeyValuePair<string, object>("type", grainTypeName));
}

internal static Counter<int> SystemTargetCounts = Instruments.Meter.CreateCounter<int>(InstrumentNames.SYSTEM_TARGET_COUNTS);
internal static UpDownCounter<int> SystemTargetCounts = Instruments.Meter.CreateUpDownCounter<int>(InstrumentNames.SYSTEM_TARGET_COUNTS);
internal static void IncrementSystemTargetCounts(string systemTargetTypeName)
{
SystemTargetCounts.Add(1, new KeyValuePair<string, object>("type", systemTargetTypeName));
Expand Down
Loading