mirror of https://github.com/nicolargo/glances.git
Disable Renovate for Lock file
This commit is contained in:
parent
3b67eb1c79
commit
825b9879c8
|
|
@ -238,7 +238,8 @@ build-backend = "setuptools.build_meta"
|
|||
requires = ["setuptools>=68"]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
log_cli = true
|
||||
# Set to true to display live message during tests
|
||||
log_cli = false
|
||||
log_level = "INFO"
|
||||
#log_cli_format = "%(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)"
|
||||
#log_cli_date_format = "%Y-%m-%d %H:%M:%S"
|
||||
|
|
|
|||
|
|
@ -3,5 +3,6 @@
|
|||
"extends": [
|
||||
"config:recommended"
|
||||
],
|
||||
"prHourlyLimit": 3
|
||||
"prHourlyLimit": 3,
|
||||
"updateLockFiles": false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,21 +13,21 @@ import time
|
|||
import tracemalloc
|
||||
|
||||
|
||||
def test_memoryleak(glances_stats_no_history, logger):
|
||||
def test_memoryleak_no_history(glances_stats_no_history, logger):
|
||||
"""
|
||||
Test Glances memory leak.
|
||||
"""
|
||||
tracemalloc.start()
|
||||
# First iterations just to init the stats and fill the memory
|
||||
logger.info('Please wait test is filling memory with stats')
|
||||
iteration = 10
|
||||
logger.info('Please wait during memory leak test initialisation')
|
||||
iteration = 3
|
||||
for _ in range(iteration):
|
||||
glances_stats_no_history.update()
|
||||
time.sleep(1)
|
||||
|
||||
# Then iteration to measure memory leak
|
||||
logger.info('Please wait test if a memory leak is detected')
|
||||
iteration = 20
|
||||
logger.info('Please wait during memory leak test')
|
||||
iteration = 10
|
||||
snapshot_begin = tracemalloc.take_snapshot()
|
||||
for _ in range(iteration):
|
||||
glances_stats_no_history.update()
|
||||
|
|
@ -36,4 +36,4 @@ def test_memoryleak(glances_stats_no_history, logger):
|
|||
snapshot_diff = snapshot_end.compare_to(snapshot_begin, 'filename')
|
||||
memory_leak = sum([s.size_diff for s in snapshot_diff]) // iteration
|
||||
logger.info(f'Memory consume per iteration: {memory_leak} bytes')
|
||||
assert memory_leak < 1000, f'Memory leak: {memory_leak} bytes'
|
||||
assert memory_leak < 15000, f'Memory leak: {memory_leak} bytes'
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ def test_perf_update(glances_stats):
|
|||
"""
|
||||
Test Glances perf.
|
||||
"""
|
||||
perf_timer = Timer(3)
|
||||
perf_timer = Timer(6)
|
||||
counter = 0
|
||||
while not perf_timer.finished():
|
||||
glances_stats.update()
|
||||
counter += 1
|
||||
assert counter > 3
|
||||
assert counter > 6
|
||||
|
|
|
|||
Loading…
Reference in New Issue