// Copyright (c) Microsoft. All rights reserved.
namespace AgentConversation.IntegrationTests;
///
/// Captures the before-and-after for a single test case run,
/// enabling comparison and reporting of context size changes.
///
public sealed class ConversationMetricsReport
{
///
/// Gets the metrics captured before the agent steps were executed.
///
public required ConversationMetrics Before { get; init; }
///
/// Gets the metrics captured after the agent steps were executed.
///
public required ConversationMetrics After { get; init; }
///
/// Gets the change in message count between and .
/// A positive value means messages were added; a negative value means compaction removed messages.
///
public int MessageCountDelta => After.MessageCount - Before.MessageCount;
///
/// Gets the change in serialized size in bytes between and .
///
public long SizeDeltaBytes => After.SerializedSizeBytes - Before.SerializedSizeBytes;
///
public override string ToString() =>
$"Before=[{Before}] After=[{After}] Delta=[Messages={MessageCountDelta:+#;-#;0}, Size={SizeDeltaBytes:+#;-#;0}B]";
}