diff options
| author | JP Dillingham <jp@dillingham.me> | 2025-11-30 12:51:03 -0600 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2025-11-30 12:51:03 -0600 |
| commit | c84f12161fa46ee95c4e0d447864b9a5cf80c6d1 (patch) | |
| tree | 6937a9938af75eff3c76abbcfeb49673c642039a /src/slskd/Telemetry/Types | |
| parent | bf8341a9f0eda057b81657017c2dd1f8646a08dd (diff) | |
| download | slskd-c84f12161fa46ee95c4e0d447864b9a5cf80c6d1.tar.gz | |
exceptions
Diffstat (limited to 'src/slskd/Telemetry/Types')
| -rw-r--r-- | src/slskd/Telemetry/Types/TransferExceptionDetail.cs | 39 | ||||
| -rw-r--r-- | src/slskd/Telemetry/Types/TransferExceptionSummary.cs | 25 | ||||
| -rw-r--r-- | src/slskd/Telemetry/Types/TransferSummary.cs | 1 |
3 files changed, 65 insertions, 0 deletions
diff --git a/src/slskd/Telemetry/Types/TransferExceptionDetail.cs b/src/slskd/Telemetry/Types/TransferExceptionDetail.cs new file mode 100644 index 00000000..a749c6a5 --- /dev/null +++ b/src/slskd/Telemetry/Types/TransferExceptionDetail.cs @@ -0,0 +1,39 @@ +// <copyright file="TransferExceptionDetail.cs" company="slskd Team"> +// Copyright (c) slskd Team. All rights reserved. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published +// by the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see https://www.gnu.org/licenses/. +// </copyright> + +namespace slskd.Telemetry; + +using System; +using Soulseek; + +public record TransferExceptionDetail +{ + public string Id { get; init; } + public string Username { get; init; } + public TransferDirection Direction { get; init; } + public string Filename { get; init; } + public long Size { get; set; } + public long StartOffset { get; init; } + public TransferStates State { get; set; } = TransferStates.None; + public DateTime RequestedAt { get; set; } + public DateTime? EnqueuedAt { get; set; } + public DateTime? StartedAt { get; set; } + public DateTime? EndedAt { get; set; } + public long BytesTransferred { get; set; } + public double AverageSpeed { get; set; } + public string Exception { get; set; } +}
\ No newline at end of file diff --git a/src/slskd/Telemetry/Types/TransferExceptionSummary.cs b/src/slskd/Telemetry/Types/TransferExceptionSummary.cs new file mode 100644 index 00000000..03b64df5 --- /dev/null +++ b/src/slskd/Telemetry/Types/TransferExceptionSummary.cs @@ -0,0 +1,25 @@ +// <copyright file="TransferExceptionSummary.cs" company="slskd Team"> +// Copyright (c) slskd Team. All rights reserved. +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published +// by the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see https://www.gnu.org/licenses/. +// </copyright> + +namespace slskd.Telemetry; + +public record TransferExceptionSummary +{ + public string Exception { get; init; } + public long Count { get; init; } + public long DistinctUsers { get; init; } +}
\ No newline at end of file diff --git a/src/slskd/Telemetry/Types/TransferSummary.cs b/src/slskd/Telemetry/Types/TransferSummary.cs index 159330fe..c25f81fc 100644 --- a/src/slskd/Telemetry/Types/TransferSummary.cs +++ b/src/slskd/Telemetry/Types/TransferSummary.cs @@ -22,6 +22,7 @@ public record TransferSummary public string Username { get; init; } public long TotalBytes { get; init; } public long Count { get; init; } + public long DistinctUsers { get; init; } public double AverageSpeed { get; init; } public double AverageWait { get; init; } public double AverageDuration { get; init; } |
