| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This reduces the noise caused by incompatible attribute definitions between GCC/Clang.
|
| |
|
| |
|
| |
|
|
|
|
| |
This fixes an inconsistency between tests run by ./configure and actual make
|
|
|
|
|
|
| |
Many thanks to @Explorer09 Kang-Che Sung (宋岡哲).
Also add a #error stanza to XUtils.h in case somebody forgets the beautiful mess GNU forces on us.
|
|
|
|
|
| |
Existing layouts with three columns do not match my needs... There is
always a column too narrow. I think this would be a reasonable choice.
|
|
|
|
| |
The bottom line was too short before...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2...v3)
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
|
|\ |
|
| | |
|
|/
|
| |
Addresses https://github.com/htop-dev/htop/issues/1340
|
| |
|
| |
|
| |
|
| |
|
|\ |
|
| | |
|
| |
| |
| | |
Co-authored-by: BenBE <BenBE@geshi.org>
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
| |
Improve precisions when drawing in bar meter mode.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
|
|
|
|
| |
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
|
|
|
|
|
|
|
|
| |
In NetworkIOMeter, the number strings of bytes per second are formatted
with Meter_humanUnit(). As the numbers are only updated every 500 ms,
it is good to cache the formatted strings. This saves code size.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
|
|
|
|
|
|
|
|
| |
In DiskIOMeter, the number strings of bytes per second are formatted
with Meter_humanUnit(). As the numbers are only updated every 500 ms,
it is good to cache the formatted strings. This saves code size.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since Meter_humanUnit() is often called with floating point values in
Meter objects, rewrite the function to let it process `double` type
natively, and save floating point to integer casts.
The rewritten function:
* Allows higher orders of magnitude including 'R' and 'Q', and
addresses infinity. (The previous version has a maximum value of
(2^64 - 1) representing 16 ZiB.)
* Rounds values when they are in intervals (99.9, 100) and (9.99, 10),
and displays them with correct precision (number of fraction digits).
* Produces assertion error on negative and NaN values (undefined
behavior).
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Always update the `values` member during the call of
NetworkIOMeter_updateValues().
This makes the values of every instance of NetworkIOMeter consistent.
The user might see non-zero bars (or graph) during the "stale" status
of the meter after this commit. The side effect is not a bug.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Always update the `values` member during the call of
DiskIOMeter_updateValues().
This makes the values of every instance of DiskIOMeter consistent.
The user might see non-zero bars (or graph) during the "stale" status
of the meter after this commit. The side effect is not a bug.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
|
| |
|
| |
|
|
|
|
|
|
|
| |
When `cached_utilisation_diff` is capped, it would never be greater
than `DiskIOMeter.total`.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
|
|
|
|
|
| |
Quick discussion with Ivan confirmed this was a left-over from
an earlier version of the zswap code and can be safely removed.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Reduce code size a little in GraphMeterMode_draw() when compiled in
`-Os` mode.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
|
|
|
|
|
|
|
|
|
| |
The number of items of a Meter can exceed the length of
BarMeterMode_characters array. (The CPU Meter is an example.)
Item numbers exceeding the length are unplottable in a bar.
Add an assertion to note the fact.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently when the runtime configuration is saved to file the true
configuration file is first truncated and then written to with each
available option.
If for any reason htop dies (e.g. program crash, or system shutdown)
while still performing the output the configuration file might end up
empty or corrupted.
Write to a temporary file and rename at the end on success.
As a side effect new configuration files are now created with a mode of
0600.
|
|\ |
|
|/|
| |
| |
| | |
into Explorer09-print-time-format
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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>
|
|\ \
| |/
|/| |
|
|/
|
|
|
|
|
|
|
|
|
| |
The `Meter.total` value may be 0 on BatteryMeter, SwapMeter,
linux/HugePageMeter, linux/ZramMeter and others. In case of a zero
total value, print an empty bar in bar meter mode.
Also change GraphMeterMode_draw() so that it no longer writes back the
`total` value if it is zero.
Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
|