Skip to content

Commit

Permalink
Keep the aggregated CPU fields as well
Browse files Browse the repository at this point in the history
  • Loading branch information
mmynk committed Oct 3, 2023
1 parent 9a4d6f4 commit 4436736
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions below/dump/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,11 @@ impl AggField<SystemModelFieldId> for SystemAggField {

if detail {
match self {
// If detail is set, per cpu fields are added in `System::dump_model()`.
Self::Cpu => vec![],
Self::Cpu => enum_iterator::all::<Cpu>()
// The Idx field is always -1 (we aggregate all CPUs)
.filter(|v| v != &Cpu::Idx)
.map(FieldId::Cpu)
.collect(),
Self::Mem => enum_iterator::all::<Mem>().map(FieldId::Mem).collect(),
Self::Vm => enum_iterator::all::<Vm>().map(FieldId::Vm).collect(),
Self::Stat => enum_iterator::all::<Stat>().map(FieldId::Stat).collect(),
Expand Down

0 comments on commit 4436736

Please sign in to comment.