Commit Graph

30 Commits

Author SHA1 Message Date
Yan
b42defb1d8 Keep auto_unit within limits, so columns stay aligned
Occasionally, columns got misaligned, because auto_unit returned too
many decimals when the number was slightly below 10 or 100.
Actually, when (9.995 <= n < 10) and (99.95 < n < 100).

For example,
10*2**20-1 returned 10.00M instead of 10.0M and
100*2**20-1 returned 100.0M instead of 100M.

Tests added to verify correctness.
2026-05-16 21:45:09 +00:00
csvke
a8023b3e4c RV1126BP-70: Add config, docs, and unit tests for MPP plugin
- Add [mpp] section to conf/glances.conf with disable=True
- Add docs/aoa/mpp.rst documentation page and index entry
- Add unit test test_026_mpp with Rockchip MPP test fixtures
2026-04-11 01:34:44 +08:00
nicolargo
45b3164464 Improve docs and also add min/max/mean for CPU and load 2026-03-07 10:09:24 +01:00
Siddharth Doshi
e306ad24b6 feat(plugin): add generic mmm (min/max/mean) support in base plugin model
Introduce a generic Min/Max/Mean (mmm) mechanism at the plugin model level.

When a field in `fields_description` defines `'mmm': True`, the plugin
automatically generates and maintains the following derived fields:

  <field>_min
  <field>_max
  <field>_mean

The computation is handled in the base plugin model to ensure the
feature is reusable across all plugins. Mean is calculated as a
running mean, and min/max are updated on each refresh cycle.

This implementation:
- Keeps the feature opt-in per field
- Avoids hardcoding logic in individual plugins
- Maintains full backward compatibility
- Preserves existing API v4 response structure
- Ensures no regression in existing behavior

Unit tests have been added to validate correct field generation
and update behavior.
2026-03-01 17:34:33 +05:30
Nicolas Hennion
4e34a298f7 Skip NPU test when plugin is disabled
Skip NPU test if plugin is disabled in configuration.
2026-02-09 10:01:45 +01:00
nicolargo
790bb70781 Ignore NPU test on Windows 2026-01-25 16:41:54 +01:00
nicolargo
83da3de1a7 Add freq information about NPU 2026-01-24 15:57:31 +01:00
Fabian Fleischer
7748003d8b Add CPU core number field to processlist 2026-01-22 12:49:10 +01:00
nicolargo
f587b281c0 Catch error on ADM GPU plugin and Python 3.9 2025-12-20 15:33:17 +01:00
nicolargo
59d54b8e2b Correct issue with test on Python 3.9 2025-12-20 10:36:00 +01:00
nicolargo
3de1a25305 Revert some change on hide zero feature (need additional tests 2025-11-16 11:32:21 +01:00
Chris Herrera
c70321c3fb Formatting changes from running make format 2025-11-16 10:43:46 +01:00
Chris Herrera
89c8fc125c Add unit test for split_esc 2025-11-16 10:43:46 +01:00
nicolargo
c0dad78189 Unittest now take into account the default glances.conf file 2025-11-10 10:53:52 +01:00
nicolargo
d9abfca7fb Remove test because it breaks the CI test 2025-11-10 10:27:13 +01:00
nicolargo
cb377055f2 Remove test because it breaks the CI test 2025-11-10 10:26:22 +01:00
nicolargo
b2e3ea283d Remove test because it breaks the CI test 2025-11-10 07:48:03 +01:00
nicolargo
afff3e2ba6 Add a simple unit test for get_alert 2025-11-09 17:27:00 +01:00
nicolargo
f87783689b Docs and requirements for Glances 4.4.0 2025-11-02 17:01:32 +01:00
nicolargo
4361df8f84 Do not call update if a call is done to a specific plugin through the API #3033 2025-10-19 17:19:34 +02:00
nicolargo
9f1eb9496a Add unit test for auto_unit 2025-09-28 17:03:44 +02:00
nicolargo
b26dac4dd5 ZFS ARC/cache not reported as cache memory usage #3279 2025-09-25 13:48:43 -04:00
Boris Okassa
463d0af666 remove .keys() from loops over dicts
By default dict loops use keys.

Signed-off-by: Boris Okassa <borisokassa@yahoo.fr>
2025-07-23 23:16:20 +02:00
nicolargo
c6a48bf424 Update docs and correct an issue with UTC import 2025-07-05 10:32:11 +02:00
nicolargo
bf2c6d1bda Add unit test for time zone in history 2025-07-05 10:32:11 +02:00
nicolargo
c372d35f2c Make the test compliant with Windows 2024-12-29 13:36:04 +01:00
nicolargo
bd35c77437 Disable history test on Windows 2024-12-29 13:26:19 +01:00
nicolargo
797b0d06b1 Add memory leak unitary test 2024-12-29 13:07:54 +01:00
nicolargo
6124da2e59 Move all the Python test files in ./tests/ folder 2024-12-28 18:31:39 +01:00
nicolargo
61edf4daf5 Make main.py comliant with PyTest (concerning args) 2024-12-26 10:49:26 +01:00