| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
Don't print twice for 0.9s.
Don't truncate on 1.2s, leading to an abort.
|
|
|
|
|
|
|
|
|
| |
It prints the time in one of these formats: nanoseconds, "fraction of
seconds", "minutes + seconds + milliseconds". If the total time is
greater than 10 minutes, it uses Row_printTime() to print higher time
units.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
|
|
|
|
|
|
|
| |
Just call RichString_appendAscii() with the fixed string and avoid an
superfluous snprintf() formatting.
Suggested-by: Explorer09
|
|
|
|
| |
Bail out early if the passed time is 0 and shadow the result.
|
|
|
|
|
|
| |
Instead of handling PERCENT_CPU as a special case for whether to align
the title of a dynamically sized column to the right or the left
introduce a new flag, which can be reused by other columns.
|
| |
|
|
|
|
| |
The clamping itself has a sanity check when debug mode is active.
|
|
|
|
|
|
|
|
|
|
| |
The passed width should always be at least 4, otherwise printing will
always truncate and lead to an abort().
The passed should not be greater or equal to the available buffer size,
otherwise printing will always truncate and lead to an abort().
Add fallback for non debug builds.
|
|
|
|
| |
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
* Allow the maximum value of "15.9Z" ((2^64 - 2) KiB) to be printed.
(The previous version supports the maximum of "99.9P" (99.9 PiB)
before the printing format goes weird.)
* Print up to 2 fraction digits for values between "9.76G" (10000 MiB)
and "9.99G" (< 10 GiB), "9.76T" and "9.99T", and so on.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Change variable types of time values from signed to unsigned.
* Change variable naming for consistency: `totalMinutes`, `totalHours`,
`totalDays` for total values and `minutes`, `hours`, `days`, etc. for
remainder values. (`years` remains an exception as there is no larger
unit than years)
* Use `unsigned long long` type for `years` value to prevent a
potential overflow.
* The time units are now evaluated from small to large, in the hopes
that small values would print faster. (There is no performance test
for this claim.)
* The days unit is now printed when `totalHours` is at least 24.
(Issue htop-dev#1317) There is room in the new code to revert to the
old threshold (totalHours < 2400).
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements our concept of 'dynamic screens' in htop, with a
first use-case of pcp-htop displaying things like top-filesystem
and top-cgroups under new screen tabs. However the idea is more
general than use in pcp-htop and we've paved the way here for us
to collectively build mroe general tabular screens in core htop,
as well.
From the pcp-htop side of things, dynamic screens are configured
using text-based configuration files that define the mapping for
PCP metrics to columns (and metric instances to rows). Metrics
are defined either directly (via metric names) or indirectly via
PCP derived metric specifications. Value scaling and the units
displayed is automatic based on PCP metric units and data types.
This commit represents a collaborative effort of several months,
primarily between myself, Nathan and BenBE.
Signed-off-by: Sohaib Mohamed <sohaib.amhmd@gmail.com>
Signed-off-by: Nathan Scott <nathans@redhat.com>
|
|
This commit refactors the Process and ProcessList structures such
they each have a new parent - Row and Table, respectively. These
new classes handle screen updates relating to anything that could
be represented in tabular format, e.g. cgroups, filesystems, etc,
without us having to reimplement the display logic repeatedly for
each new entity.
|