diff options
| author | JP Dillingham <jp@dillingham.me> | 2026-01-19 12:53:17 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-19 12:53:17 -0600 |
| commit | 6fdc317978fd91fbfd5828ee72c7e7f19c316b13 (patch) | |
| tree | 0370a03f1fadda7e6d4979cb4ee46c4d75880e8d /src/slskd/Core/State.cs | |
| parent | 9c1c726f2de69dd3fd38740f5bdb7f1f76e97fcf (diff) | |
| parent | 5b302ae5f2e0c01cb111a37680d63df3d47b114d (diff) | |
| download | slskd-6fdc317978fd91fbfd5828ee72c7e7f19c316b13.tar.gz | |
Merge pull request #1608 from slskd/search-metrics
Add throttling for incoming search requests, add additional prometheus metrics covering search responses
Diffstat (limited to 'src/slskd/Core/State.cs')
| -rw-r--r-- | src/slskd/Core/State.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/slskd/Core/State.cs b/src/slskd/Core/State.cs index 86b628b5..4f7876de 100644 --- a/src/slskd/Core/State.cs +++ b/src/slskd/Core/State.cs @@ -37,6 +37,7 @@ namespace slskd public ServerState Server { get; init; } = new ServerState(); public ServerConnectionWatchdogState ConnectionWatchdog { get; init; } = new ServerConnectionWatchdogState(); public RelayState Relay { get; init; } = new RelayState(); + public HealthState Health { get; init; } = new HealthState(); public UserState User { get; init; } = new UserState(); public DistributedNetworkState DistributedNetwork { get; init; } = new DistributedNetworkState(); public ShareState Shares { get; init; } = new ShareState(); @@ -44,6 +45,23 @@ namespace slskd public User[] Users { get; init; } = Array.Empty<User>(); } + public record HealthState + { + public SearchHealthState Search { get; init; } = new(); + + public record SearchHealthState + { + public IncomingSearchHealthState Incoming { get; init; } = new(); + + public record IncomingSearchHealthState + { + public double Latency { get; init; } + public int QueueDepth { get; init; } + public double DropRate { get; init; } + } + } + } + public record VersionState { public string Full { get; init; } = Program.FullVersion; |
