oxidecomputer / oxidecomputer/humility

ringbuf: consider renaming `GEN` column to something less confusable

Open
#478 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
584
Forks
63
Avg merge
3h
Merged PRs (30d)
2

Description

Currently, humility ringbuf's output has the following column names:

 NDX LINE      GEN    COUNT PAYLOAD

The GEN column the generation number of the ringbuf slot. However, this is confuse-able with the task's generation, which may give the user the incorrect impression that a task has been restarted a bunch of times.

We may want to consider changing the name of this column to something that doesn't introduce the possibility for such confusion. I suggested LAP (as in "lap around the ring buffer"), which is also three characters. @lzrd suggested CYCLE (and note that the column is always at least 8 characters long, so we definitely have space for CYCLE).

Alternatively, we could maybe have the humility ringbuf command also show the actual generation of the task in the header? This way, although we would refer to "gen" twice, it would be clearer which is the task generation versus the ringbuf entry, like this:

humility: ring buffer ksz8463::__RINGBUF in net (gen 0):
 NDX LINE      GEN    COUNT PAYLOAD
   3  140     6544        1 Read(IADR4, 0x2a5e)
   4  140     6544        1 Read(P2MBSR, 0x7808)
   5  140     6544        1 Read(P2MBCR, 0x3120)
...

That would require humility ringbuf to inspect the task table, which wouldn't work in single-task dumps (but we could just not display it in single task dumps).

I'm very open to any other naming suggestions or other thoughts for how to make this clearer, as well.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the humility ringbuf command and locate where its column header and task-generation context are formatted. Review the proposed LAP, CYCLE, and task-generation alternatives, then confirm the chosen wording works for both multi-task and single-task dumps; done means the output is unambiguous.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.