diff options
| author | JP Dillingham <jp@dillingham.me> | 2026-01-01 18:39:30 -0600 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2026-01-01 18:39:30 -0600 |
| commit | be5bd15dad2fb849b8c7358a87ed04f86b861730 (patch) | |
| tree | d514f767e8766e8e5c09afab722bea75d9c07a17 /src | |
| parent | 2100d773a653bf2bd49e5cb53d649744fc44c387 (diff) | |
| download | slskd-be5bd15dad2fb849b8c7358a87ed04f86b861730.tar.gz | |
report decision stats in finally
Diffstat (limited to 'src')
| -rw-r--r-- | src/slskd/Application.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/slskd/Application.cs b/src/slskd/Application.cs index f5a15be1..df01206f 100644 --- a/src/slskd/Application.cs +++ b/src/slskd/Application.cs @@ -803,6 +803,16 @@ namespace slskd } finally { + if (decisionStopwatch.IsRunning) + { + decisionStopwatch.Stop(); + } + + // decision latency is reported here so that we can track both successes and failures; they do the same + // work so lumping them together gives us the clearest picture + Metrics.Enqueue.DecisionLatency.Observe(decisionStopwatch.ElapsedMilliseconds); + Metrics.Enqueue.CurrentDecisionLatency.Update(decisionStopwatch.ElapsedMilliseconds); + if (userSemaphoreAcquired) { userSemaphore.Release(); |
