From 129227032ffcf2ec03cdb15f68f65caaf30985c5 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Mon, 1 Sep 2025 19:11:49 -0500 Subject: stub UserSummary --- src/slskd/Telemetry/Types/UserSummary.cs | 66 ++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 src/slskd/Telemetry/Types/UserSummary.cs (limited to 'src') diff --git a/src/slskd/Telemetry/Types/UserSummary.cs b/src/slskd/Telemetry/Types/UserSummary.cs new file mode 100644 index 00000000..757b5ae7 --- /dev/null +++ b/src/slskd/Telemetry/Types/UserSummary.cs @@ -0,0 +1,66 @@ +// +// 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/. +// + +namespace slskd.Telemetry; + +using System.Collections.Generic; +using Soulseek; + +public record UserSummary +{ + public UserTransferSummary Transfers { get; init; } +} + +public record UserTransferSummary +{ + public UserTransferDirectionSummary Upload { get; init; } + public UserTransferDirectionSummary Download { get; init; } + public UserTransferRatios Ratios { get; init; } + public Dictionary Errors { get; init; } +} + +public record UserTransferRatios +{ + public double Count { get; init; } + public double TotalBytes { get; init; } +} + +public record UserTransferDirectionSummary +{ + public Dictionary Summary { get; init; } + public List Errors { get; init; } + public UserTransferDirectionStatistics Statistics { get; init; } +} + +public record UserTransferErrorSummary +{ + public string Exception { get; init; } + public long Count { get; init; } +} + +public record UserTransferDirectionStatistics +{ + public double SuccessRate { get; init; } + public double ErrorRate { get; init; } + public double CancelRate { get; init; } +} + +public record UserMessageStatistics +{ + public int Sent { get; init; } + public int Received { get; init; } +} \ No newline at end of file -- cgit v1.2.3