Skip to content

Commit

Permalink
Disable Renovate for Lock file
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolargo committed Dec 30, 2024
1 parent 3b67eb1 commit 825b987
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 2 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"extends": [
"config:recommended"
],
"prHourlyLimit": 3
"prHourlyLimit": 3,
"updateLockFiles": false
}
12 changes: 6 additions & 6 deletions tests/test_memoryleak.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@
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()
Expand All @@ -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'
4 changes: 2 additions & 2 deletions tests/test_perf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 825b987

Please sign in to comment.