Test Failed
Push — master ( ae3125...7a2ee5 )
by Nicolas
02:38
created

test_perf.test_perf_update()   A

Complexity

Conditions 2

Size

Total Lines 10
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 7
nop 1
dl 0
loc 10
rs 10
c 0
b 0
f 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