Skip to content

Commit 8cbb02c

Browse files
committed
Do not use f-strings in mx scripts
1 parent 4c55947 commit 8cbb02c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

mx.graalpython/mx_graalpython_benchmark.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ def checkup(self, out):
764764
if benchmark_name is None and benchmark_info:
765765
benchmark_name = benchmark_info.group(1)
766766
iterations_count = int(benchmark_info.group(2))
767-
mx.log(f"Checking benchmark {benchmark_name} with {iterations_count} iterations")
767+
mx.log("Checking benchmark %s with %d iterations" % (benchmark_name, iterations_count))
768768
continue
769769

770770
if benchmark_name is None:
@@ -776,13 +776,11 @@ def checkup(self, out):
776776
warmup = int(warmup_match.group(1))
777777
for i in range(warmup, len(iteration_times)):
778778
if gc_times[i] > iteration_times[i] / 10:
779-
mx.warn(
780-
f"Benchmark checkup: {benchmark_name}: excessive GC pause of {gc_times[i]} (on {i} iteration)")
779+
mx.warn("Benchmark checkup: %s: excessive GC pause of %.8f (on %d iteration)" % (benchmark_name, gc_times[i], i))
781780
if warmup > iterations_count / 2:
782-
mx.warn(f"Benchmark checkup: {benchmark_name}: warmup detected too late (on {warmup} iteration)")
781+
mx.warn("Benchmark checkup: %s: warmup detected too late (on %d iteration)" % (benchmark_name, warmup))
783782
if late_compilation:
784-
mx.warn(
785-
f"Benchmark checkup: {benchmark_name}: compilation detected too late (on {late_compilation} iteration)")
783+
mx.warn("Benchmark checkup: %s: compilation detected too late (on %d iteration)" % (benchmark_name, late_compilation))
786784
iteration_times = []
787785
gc_times = []
788786
current_iteration = -1

0 commit comments

Comments
 (0)