Table of Contents

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

bool

Enabled

Gets or sets whether query performance tracking is enabled. Default: true (Basic level).

public bool Enabled { get; set; }

Property Value

bool

Level

Gets or sets the tracking detail level. Default: Basic.

public TrackingLevel Level { get; set; }

Property Value

TrackingLevel

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

int

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

int

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

double

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

double

TrackPerOperationMetrics

Gets or sets whether to track per-operation metrics. Default: true.

public bool TrackPerOperationMetrics { get; set; }

Property Value

bool