Skip to content

Commit

Permalink
Switch EntityFrameworkMetricsData.Get* methods to internal. These are…
Browse files Browse the repository at this point in the history
… consumed only by EF. (#34379)
  • Loading branch information
cincuranet authored Aug 8, 2024
1 parent 06d39be commit 320f589
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/EFCore/Infrastructure/EntityFrameworkMetricsData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static void ReportDbContextDisposing()
/// <summary>
/// Number of currently active <see cref="DbContext" /> instances.
/// </summary>
public static int GetActiveDbContexts()
internal static int GetActiveDbContexts()
=> Volatile.Read(ref _activeDbContexts);

/// <summary>
Expand All @@ -59,7 +59,7 @@ public static void ReportQueryExecuting()
/// <summary>
/// Cumulative count of queries executed.
/// </summary>
public static long GetTotalQueriesExecuted()
internal static long GetTotalQueriesExecuted()
=> Interlocked.Read(ref _totalQueriesExecuted);

/// <summary>
Expand All @@ -71,7 +71,7 @@ public static void ReportSavingChanges()
/// <summary>
/// Cumulative count of changes saved.
/// </summary>
public static long GetTotalSaveChanges()
internal static long GetTotalSaveChanges()
=> Interlocked.Read(ref _totalSaveChanges);

/// <summary>
Expand All @@ -95,7 +95,7 @@ public static void ReportCompiledQueryCacheMiss()
/// <summary>
/// Gets number of hits and misses and also the computed hit rate for the compiled query cache.
/// </summary>
public static (int hits, int misses, double hitRate) GetCompiledQueryCacheHitRate()
internal static (int hits, int misses, double hitRate) GetCompiledQueryCacheHitRate()
=> _compiledQueryCacheInfo.CalculateHitsMissesHitRate(false);

/// <summary>
Expand All @@ -113,7 +113,7 @@ public static void ReportExecutionStrategyOperationFailure()
/// <summary>
/// Cumulative number of failed operation executed by an <see cref="IExecutionStrategy" />.
/// </summary>
public static long GetTotalExecutionStrategyOperationFailures()
internal static long GetTotalExecutionStrategyOperationFailures()
=> Interlocked.Read(ref _totalExecutionStrategyOperationFailures);

/// <summary>
Expand All @@ -125,7 +125,7 @@ public static void ReportOptimisticConcurrencyFailure()
/// <summary>
/// Cumulative number of optimistic concurrency failures.
/// </summary>
public static long GetTotalOptimisticConcurrencyFailures()
internal static long GetTotalOptimisticConcurrencyFailures()
=> Interlocked.Read(ref _totalOptimisticConcurrencyFailures);

[StructLayout(LayoutKind.Explicit)]
Expand Down

0 comments on commit 320f589

Please sign in to comment.