aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/serd_bench.py
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2025-03-24 17:38:41 -0400
committerDavid Robillard <d@drobilla.net>2025-03-24 17:40:50 -0400
commit64dba9134520547180d2e9404f5a7b592e560ae5 (patch)
tree5b458af0091423caff52b1ddbe1c0f44635d7eb8 /scripts/serd_bench.py
parent8785ef4b74e6a54cdd7c83e69c01a72d8e200314 (diff)
downloadserd-64dba9134520547180d2e9404f5a7b592e560ae5.tar.gz
serd-64dba9134520547180d2e9404f5a7b592e560ae5.tar.bz2
serd-64dba9134520547180d2e9404f5a7b592e560ae5.zip
Always specify encoding to subprocess run functions
Diffstat (limited to 'scripts/serd_bench.py')
-rwxr-xr-xscripts/serd_bench.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/serd_bench.py b/scripts/serd_bench.py
index d964984f..8e176322 100755
--- a/scripts/serd_bench.py
+++ b/scripts/serd_bench.py
@@ -192,10 +192,13 @@ def run(progs, n_min, n_max, step):
with open(filename(n) + ".out", "w") as out:
sys.stderr.write(cmd + "\n")
proc = subprocess.Popen(
- cmd.split(), stdout=out, stderr=subprocess.PIPE
+ cmd.split(),
+ encoding="utf-8",
+ stdout=out,
+ stderr=subprocess.PIPE,
)
- time, memory = parse_time(proc.communicate()[1].decode())
+ time, memory = parse_time(proc.communicate()[1])
rows["time"] += ["%.07f" % time]
rows["throughput"] += ["%d" % (n / time)]
rows["memory"] += [str(memory)]