57 lines
1.9 KiB
C#
57 lines
1.9 KiB
C#
using Fleet.Core;
|
|
using MoShiro.Backend.Analysis;
|
|
|
|
namespace MoShiro.Backend.Application;
|
|
|
|
public sealed record SummaryResult(
|
|
IReadOnlyDictionary<string, double?> Values,
|
|
IReadOnlyDictionary<string, ulong> Samples,
|
|
double Coverage);
|
|
|
|
public sealed record GapInfo(long FromMs, long ToMs, string Reason);
|
|
|
|
public sealed record SeriesResult(
|
|
LineKey Line,
|
|
QueryRange Range,
|
|
SourcePlan Plan,
|
|
IReadOnlyList<long> T,
|
|
IReadOnlyDictionary<string, double?[]> Values,
|
|
SummaryResult Summary,
|
|
IReadOnlyList<GapInfo> Gaps,
|
|
IReadOnlyList<EventRecord> Events,
|
|
IReadOnlyDictionary<string, string> Versions);
|
|
|
|
public sealed record OverviewLine(LineView Line, SummaryResult Summary, TestRecord? LastTest);
|
|
|
|
public sealed record OverviewResult(QueryRange Range, IReadOnlyList<OverviewLine> Lines, SourcePlan Plan);
|
|
|
|
public sealed record DistributionBucket(double Le, ulong Count);
|
|
|
|
public sealed record DistributionResult(
|
|
string Metric,
|
|
string Unit,
|
|
IReadOnlyList<DistributionBucket> Buckets,
|
|
double? P50,
|
|
double? P95,
|
|
double? P99,
|
|
ulong Count);
|
|
|
|
public sealed record HeatmapResult(IReadOnlyList<long> T, IReadOnlyList<double> Edges, IReadOnlyList<IReadOnlyList<ulong>> Counts, QueryRange Range, SourcePlan Plan);
|
|
|
|
public sealed record CompareResult(
|
|
IReadOnlyList<long> T,
|
|
IReadOnlyDictionary<string, double?[]> Values,
|
|
IReadOnlyDictionary<string, double?> Summary,
|
|
string Metric,
|
|
QueryRange Range,
|
|
SourcePlan Plan);
|
|
|
|
/// <summary>单个 Agent 任务(目标任务)的时序:和线路时序同一套分层与汇总,只是没有线路、事件和评分。</summary>
|
|
public sealed record TargetSeriesResult(
|
|
QueryRange Range,
|
|
SourcePlan Plan,
|
|
IReadOnlyList<long> T,
|
|
IReadOnlyDictionary<string, double?[]> Values,
|
|
SummaryResult Summary,
|
|
IReadOnlyDictionary<string, string> Versions);
|