Skip to content

Commit 89be8be

Browse files
committed
fix errors in python benchmarking
1 parent f9664af commit 89be8be

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

mx.graalpython/mx_graalpython_python_benchmarks.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
import json
4545
import math
4646
import os
47+
import re
4748
import shutil
4849
import subprocess
4950
import sys
@@ -352,7 +353,7 @@ def with_host_vm(self, host_vm):
352353
return self.__class__(self.config_name(), self._options, host_vm)
353354

354355
def run(self, cwd, args):
355-
for idx, arg in enumerate(args):
356+
for arg in args:
356357
if "--vm.Xmx" in arg:
357358
mx.log(f"Setting Xmx from {arg}")
358359
break
@@ -440,13 +441,13 @@ def __contains__(self, x):
440441
return True
441442

442443
def __iter__(self):
443-
if not benchmarks:
444+
if not self.benchmarks:
444445
mx.abort(
445446
"Cannot iterate over benchmark names in foreign benchmark suites. "
446447
+ "Leave off the benchmark name part to run all, or name the benchmarks yourself."
447448
)
448449
else:
449-
return iter(benchmarks)
450+
return iter(self.benchmarks)
450451

451452

452453
class PySuite(mx_benchmark.TemporaryWorkdirMixin, mx_benchmark.VmBenchmarkSuite):

0 commit comments

Comments
 (0)