Skip to content

Commit b0167da

Browse files
committed
Update benchmarks for a little more stability.
1 parent 964d7da commit b0167da

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

benchmark/inventory.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
hosts = (
2-
["10.0.2.242"],
3-
{"ssh_user": "pi"},
2+
["10.0.2.212"],
3+
{"ssh_user": "jgeerling"},
44
)

benchmark/main.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,28 @@
33
from pyinfra import host, local, logger
44
from pyinfra.operations import python
55

6-
# See: https://github.com/geerlingguy/sbc-reviews/issues/67
7-
sys.setrecursionlimit(2000)
6+
# Minimum Python version: 3.10.
7+
assert sys.version_info >= (3, 10)
88

99
pause_seconds = 60
1010
tasks = [
1111
'tinymembench.py',
1212
'geekbench.py',
1313
'disk-benchmark.py',
1414
'top500.py',
15-
'ollama-benchmark.py',
1615
'sbc-general-benchmark.py',
16+
'ollama-benchmark.py',
1717
]
1818

1919
local.include("tasks/setup.py")
2020
local.include("tasks/basics.py")
2121

2222

2323
def task_callback():
24-
for task in tasks:
25-
logger.info("\n\nPausing {} seconds for cooldown...\n".format(pause_seconds))
26-
time.sleep(pause_seconds)
24+
for i, task in enumerate(tasks):
25+
if i != 0:
26+
logger.info("\n\nPausing {} seconds for cooldown...\n".format(pause_seconds))
27+
time.sleep(pause_seconds)
2728
local.include("tasks/{}".format(task))
2829

2930

benchmark/tasks/sbc-general-benchmark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from pyinfra.operations import files, python, server
33
from pyinfra.facts.server import Home
44

5-
php_version="8.2"
5+
php_version="8.4" # TODO Maybe map 8.x for different Ubuntu / Debian versions.
66
working_dir=host.get_fact(Home) + "/Downloads"
77

88
files.download(

benchmark/tasks/top500.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
_sudo=True,
2222
)
2323

24-
for python_version in ["3.11", "3.12"]:
24+
for python_version in ["3.11", "3.12", "3.13"]:
2525
files.file(
2626
name="Remove Python {} EXTERNALLY-MANAGED file".format(python_version),
2727
path="/usr/lib/python{}/EXTERNALLY-MANAGED".format(python_version),

0 commit comments

Comments
 (0)