| Total Complexity | 2 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | #!/usr/bin/env python |
||
| 2 | # |
||
| 3 | # Glances - An eye on your system |
||
| 4 | # |
||
| 5 | # SPDX-FileCopyrightText: 2024 Nicolas Hennion <[email protected]> |
||
| 6 | # |
||
| 7 | # SPDX-License-Identifier: LGPL-3.0-only |
||
| 8 | # |
||
| 9 | |||
| 10 | """Glances unitary tests suite for Glances perf.""" |
||
| 11 | |||
| 12 | from glances.timer import Timer |
||
| 13 | |||
| 14 | |||
| 15 | def test_perf_update(glances_stats): |
||
| 16 | """ |
||
| 17 | Test Glances perf. |
||
| 18 | """ |
||
| 19 | perf_timer = Timer(6) |
||
| 20 | counter = 0 |
||
| 21 | while not perf_timer.finished(): |
||
| 22 | glances_stats.update() |
||
| 23 | counter += 1 |
||
| 24 | assert counter > 6 |
||
| 25 |