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

test_perf   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 25
rs 10
c 0
b 0
f 0
wmc 2

1 Function

Rating   Name   Duplication   Size   Complexity  
A test_perf_update() 0 10 2
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