From bbf6757918ec6b3161cc1a1ce407eadd37a4c7f0 Mon Sep 17 00:00:00 2001 From: Anas Khan <83116240+anxkhn@users.noreply.github.com> Date: Fri, 3 Jul 2026 14:14:17 +0530 Subject: [PATCH] Fix calculateCPUPercent docstring parameter names and units. The docstring listed the parameters as cpuUsageUsec1, cpuUsageUsec2, and timeDeltaUsec, each described as microseconds, but the function signature takes cpuUsage1, cpuUsage2, and timeInterval as Duration values. Rename the documented parameters to match the signature and describe them as durations so DocC and Xcode no longer warn about mismatched parameter names. --- Sources/ContainerCommands/Container/ContainerStats.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/ContainerCommands/Container/ContainerStats.swift b/Sources/ContainerCommands/Container/ContainerStats.swift index 769a28809..d3b870ad1 100644 --- a/Sources/ContainerCommands/Container/ContainerStats.swift +++ b/Sources/ContainerCommands/Container/ContainerStats.swift @@ -199,9 +199,9 @@ extension Application { /// Calculate CPU percentage from two stat snapshots /// - Parameters: - /// - cpuUsageUsec1: CPU usage in microseconds from first sample - /// - cpuUsageUsec2: CPU usage in microseconds from second sample - /// - timeDeltaUsec: Time delta between samples in microseconds + /// - cpuUsage1: Cumulative CPU time from the first sample + /// - cpuUsage2: Cumulative CPU time from the second sample + /// - timeInterval: Elapsed wall-clock time between the two samples /// - Returns: CPU percentage where 100% = one fully utilized core static func calculateCPUPercent( cpuUsage1: Duration,