Pulse/internal/dockeragent
rcourtman a68e0050f8 fix(docker): use manual CPU delta tracking instead of stale PreCPUStats (#1229)
Docker's one-shot stats API (stream=false) returns PreCPUStats from the
daemon's internal cache, which many Docker versions don't update between
non-streaming reads. This causes every call to return the same stale
PreCPUStats from container start, producing a constant lifetime-average
CPU% (e.g. 3.4%) instead of current usage.

Switch to always using manual delta tracking, which stores the previous
sample from our own reads and computes accurate deltas between collection
cycles. The first cycle returns 0 while establishing a baseline; all
subsequent cycles produce correct current CPU percentages.
2026-02-10 20:49:29 +00:00
..
agent.go fix(docker): use manual CPU delta tracking instead of stale PreCPUStats (#1229) 2026-02-10 20:49:29 +00:00
agent_collect_test.go test: Improve discovery and Docker agent test coverage 2025-12-29 23:37:10 +00:00
agent_cpu_test.go fix(docker): use manual CPU delta tracking instead of stale PreCPUStats (#1229) 2026-02-10 20:49:29 +00:00
agent_flow_test.go feat(dockeragent): improve test coverage and refactor registry dependencies 2025-12-29 09:57:45 +00:00
agent_flushbuffer_test.go feat(dockeragent): improve test coverage and refactor registry dependencies 2025-12-29 09:57:45 +00:00
agent_http_test.go feat(dockeragent): improve test coverage and refactor registry dependencies 2025-12-29 09:57:45 +00:00
agent_image_digest_test.go fix: Resolve manifest lists for correct update detection. Related to #955 2025-12-29 17:36:16 +00:00
agent_integration_test.go chore: snapshot current changes 2025-11-02 22:47:55 +00:00
agent_internal_test.go fix: Podman sockets not prioritized when --docker-runtime=podman 2026-01-06 10:56:37 +00:00
agent_log_test.go Improve agent update logging and installer warnings (related to #737) 2025-11-23 22:07:37 +00:00
agent_report_coverage_test.go feat(dockeragent): improve test coverage and refactor registry dependencies 2025-12-29 09:57:45 +00:00
cleanup.go Enhance devcontainer and CI workflows 2026-01-01 22:29:15 +00:00
collect.go fix(docker): use manual CPU delta tracking instead of stale PreCPUStats (#1229) 2026-02-10 20:49:29 +00:00
container_update.go Enhance devcontainer and CI workflows 2026-01-01 22:29:15 +00:00
container_update_test.go test: Improve discovery and Docker agent test coverage 2025-12-29 23:37:10 +00:00
deps.go Refactor Docker agent: metrics collection, security checks, and batch updates 2025-12-29 17:20:18 +00:00
deps_coverage_test.go feat(dockeragent): improve test coverage and refactor registry dependencies 2025-12-29 09:57:45 +00:00
docker_client.go fix: Docker container update detection showing false positives 2025-12-29 13:49:04 +00:00
env_mask_test.go feat: Display environment variables for Docker containers 2025-12-25 23:52:57 +00:00
image_ref_test.go fix: Docker container update detection showing false positives 2025-12-29 13:49:04 +00:00
registry.go feat(agent): add option to disable Docker update checks 2026-01-01 00:20:49 +00:00
registry_coverage_test.go test: Improve discovery and Docker agent test coverage 2025-12-29 23:37:10 +00:00
registry_http_test.go Enhance devcontainer and CI workflows 2026-01-01 22:29:15 +00:00
registry_manifest_test.go Enhance devcontainer and CI workflows 2026-01-01 22:29:15 +00:00
registry_test.go test: Improve discovery and Docker agent test coverage 2025-12-29 23:37:10 +00:00
runtime_coverage_test.go feat(dockeragent): improve test coverage and refactor registry dependencies 2025-12-29 09:57:45 +00:00
self_update.go feat: Add manual Docker update check button. Related to #955 2025-12-29 23:37:05 +00:00
self_update_test.go fix: env overrides and OS-aware test improvements 2026-01-22 13:49:05 +00:00
signature.go Refactor Docker agent: metrics collection, security checks, and batch updates 2025-12-29 17:20:18 +00:00
signature_test.go test: Add comprehensive test coverage across packages 2026-01-19 19:26:18 +00:00
swarm.go Fix flaky tests and improve coverage across alerts, api, and config packages 2026-01-03 18:36:17 +00:00
swarm_coverage_test.go Fix flaky tests and improve coverage across alerts, api, and config packages 2026-01-03 18:36:17 +00:00
swarm_test.go Add unit tests for Docker swarm utility functions (dockeragent) 2025-11-30 05:32:52 +00:00
system.go fix: AI Patrol now respects exact user-configured thresholds 2025-12-29 08:40:34 +00:00
system_coverage_test.go feat: Add --report-ip flag for multi-NIC systems (issue #945) 2025-12-29 09:28:28 +00:00
systemd_test.go feat: Add Docker container update capability 2025-12-29 09:00:40 +00:00
test_helpers_test.go fix: Docker container update detection showing false positives 2025-12-29 13:49:04 +00:00
version.go Fix critical version embedding issues for 4.26 release 2025-11-06 11:42:52 +00:00