Skip to content

Commit 0b81fde

Browse files
committed
fixup: more chnages
1 parent 9297b35 commit 0b81fde

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

.github/workflows/codspeed.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ on:
99

1010
jobs:
1111
benchmarks:
12-
runs-on: ubuntu-latest
13-
# runs-on: codspeed-macro
12+
runs-on: codspeed-macro
1413
timeout-minutes: 20
1514
strategy:
1615
matrix:
@@ -19,7 +18,7 @@ jobs:
1918
- testdata/take_strings-x86_64
2019
- echo Hello, World!
2120
- ls fib.py
22-
- tar --zstd -cf /tmp/fib.tar.gz fib.py && rm /tmp/fib.tar.gz
21+
- tar czf /dev/null fib.py
2322
- python3 fib.py
2423
valgrind:
2524
- "3.26.0"

bench/bench.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,21 @@ def run_valgrind(self, *args: str) -> None:
5656
cmd = [
5757
self.valgrind_path,
5858
"--tool=callgrind",
59+
"--log-file=/dev/null",
5960
*args,
6061
*shlex.split(self.cmd),
6162
]
6263

6364
result = subprocess.run(
6465
cmd,
65-
stdout=subprocess.DEVNULL,
66-
stderr=subprocess.DEVNULL,
66+
capture_output=True,
67+
text=True,
6768
)
6869
if result.returncode != 0:
6970
raise RuntimeError(
70-
f"Valgrind execution failed with code {result.returncode}"
71+
f"Valgrind execution failed with code {result.returncode}\n"
72+
f"Stdout:\n{result.stdout}\n"
73+
f"Stderr:\n{result.stderr}"
7174
)
7275

7376

bench/fib.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,4 @@ def fib(n):
99
return fib(n - 1) + fib(n - 2)
1010

1111

12-
if __name__ == "__main__":
13-
result = fib(5)
14-
print(f"fib(5) = {result}")
12+
fib(3)

0 commit comments

Comments
 (0)