Skip to content

the units are now auto for i/o#57

Merged
navidpadid merged 1 commit into
mainfrom
io-size-auto
Apr 9, 2026
Merged

the units are now auto for i/o#57
navidpadid merged 1 commit into
mainfrom
io-size-auto

Conversation

@navidpadid
Copy link
Copy Markdown
Owner

This pull request updates the way I/O statistics are displayed by formatting byte counts with human-readable units (B, KB, MB, GB) rather than raw numbers, and ensures the formatting is tested and reflected in the output. The changes improve clarity for users interpreting I/O data.

Formatting improvements for I/O statistics

  • Updated print_io_stats in proclens_module.c to use the format_size_with_unit helper for all byte-count fields, so values are shown as "KB", "MB", or "GB" where appropriate, instead of just raw numbers.
  • Enhanced the format_size_with_unit function in proclens_module.h to support gigabyte ("GB") formatting in addition to bytes, kilobytes, and megabytes.

Testing and output validation

  • Added new test cases in proclens_module_tests.c to verify correct formatting for gigabyte values.
  • Updated the expected output in proclens_tests.c to reflect the new unit-suffixed formatting, specifically for the io_intensity field.

@navidpadid navidpadid merged commit 1605019 into main Apr 9, 2026
5 checks passed
github-actions Bot added a commit that referenced this pull request Apr 9, 2026
PR #57 updated print_io_stats to format all byte-count fields using
format_size_with_unit (B, KB, MB, GB) and extended that helper to
support the GB range. Update docs to reflect this:

- README.md: note that I/O byte-count fields show human-readable units
- docs/TECHNICAL.md: add note clarifying which fields use unit formatting
  and which (syscr, syscw) remain raw counts
- docs/TESTING.md: document unit-suffixed output expectation for I/O
  fields and add I/O Formatting Helpers subsection covering
  format_size_with_unit, calculate_avg_bytes_per_syscall, and
  calculate_io_intensity

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 9, 2026

Pull request created: #58

Generated by Update ProcLens Docs

navidpadid pushed a commit that referenced this pull request Apr 9, 2026
PR #57 updated print_io_stats to format all byte-count fields using
format_size_with_unit (B, KB, MB, GB) and extended that helper to
support the GB range. Update docs to reflect this:

- README.md: note that I/O byte-count fields show human-readable units
- docs/TECHNICAL.md: add note clarifying which fields use unit formatting
  and which (syscr, syscw) remain raw counts
- docs/TESTING.md: document unit-suffixed output expectation for I/O
  fields and add I/O Formatting Helpers subsection covering
  format_size_with_unit, calculate_avg_bytes_per_syscall, and
  calculate_io_intensity

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@navidpadid navidpadid deleted the io-size-auto branch April 9, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant