Class QueryPerformanceConfiguration
- Namespace
- FishMMO.Database.Npgsql.Monitoring.Diagnostics
- Assembly
- FishMMO-DB.dll
Configuration for query performance tracking. Can be loaded from appsettings.json or set programmatically.
public sealed class QueryPerformanceConfiguration
- Inheritance
-
QueryPerformanceConfiguration
- Inherited Members
Properties
AlwaysLogSlowQueries
Gets or sets whether slow queries should always be logged. Default: true.
public bool AlwaysLogSlowQueries { get; set; }
Property Value
Enabled
Gets or sets whether query performance tracking is enabled. Default: true (Basic level).
public bool Enabled { get; set; }
Property Value
Level
Gets or sets the tracking detail level. Default: Basic.
public TrackingLevel Level { get; set; }
Property Value
MaxRecentSamplesPerOperation
Gets or sets the maximum number of recent samples to keep per operation for percentile calculations. Default: 1000.
public int MaxRecentSamplesPerOperation { get; set; }
Property Value
MaxTrackedOperations
Gets or sets the maximum number of unique operations to track. Prevents memory exhaustion if operation names are dynamically generated. Default: 1000.
public int MaxTrackedOperations { get; set; }
Property Value
SampleRate
Gets or sets the sample rate for detailed tracking (0.0 to 1.0). 1.0 = 100% sampling, 0.1 = 10% sampling. Only applies to Standard and Detailed levels. Default: 0.1 (10%).
public double SampleRate { get; set; }
Property Value
SlowQueryThresholdMs
Gets or sets the threshold in milliseconds for considering a query slow. Queries exceeding this threshold are always logged regardless of tracking level. Default: 1000ms (1 second).
public double SlowQueryThresholdMs { get; set; }
Property Value
TrackPerOperationMetrics
Gets or sets whether to track per-operation metrics. Default: true.
public bool TrackPerOperationMetrics { get; set; }