Repository navigation
feat: node dashboard CPU in cores, memory in GiB - #289
Merged
Merged
Conversation
The node sample gains cpu_cores (a cgroup v2 CPU limit on the node's own cgroup path, else the host's online CPUs) and cpu_used_cores. Under a CPU limit cores used come from the limiting cgroup's cpu.stat and the CPU percent is of the limit; under a memory limit memory is that cgroup's working set of its limit. Both ride in the stored sample JSON: no schema change. The web Node view shows the CPU tile as cores in use of the capacity and charts history in cores with a capacity line; the memory tile drops its percent. A sample from an older node falls back to percent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
axe task 2502 (owner msg #6747): the web Node view shows CPU and memory as absolute amounts, not percentages.
Collector (
crates/axe-core/src/node_metrics.rs)Samplegainscpu_cores(capacity: the tightest cgroup v2cpu.maxon the node's own cgroup path, else online host CPUs) andcpu_used_cores.cpu.statusage_usecper wall second, andcpu_percentis of the limit; otherwise cores used = busy share x host cores.memory.max,mem_total_bytesis that limit andmem_used_bytesitsmemory.current - inactive_file.sampleJSON (serde(default)): no DB schema change.recordbounds them (finite, capacity <= 65536, used <= capacity).Web (
web/components/dashboard/node.tsx,web/lib/node.ts)1.9 cores, detailof 8 · load .... CPU chart in cores (avg and peak band) with a dashedcapacity Nline; history (stored as percent of capacity) is drawn against the current capacity.of 16.0 GiB, percent dropped. Disk unchanged.cpu_cores) falls back to percent.docs/user/concepts/architecture.mdupdated.Telegram
/nodeis unchanged.Tests
recordbounds.node.test.tshelpers;node.spec.tschecks cores,of 8, no percent, the capacity line and the cores readout.Local:
cargo fmt --check, clippy-D warnings,cargo test --locked, ts_bindings, doc links, web lint/typecheck/test/build and all 219 browser tests pass.🤖 Generated with Claude Code