Skip to content

Commit 696523c

Browse files
committed
Create benchmark_dir as unique directory in /tmp
1 parent 532373d commit 696523c

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

benchmark/benchmark_helper.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import subprocess
22
import os
3-
import shutil
3+
#import shutil
44
import sys
55
import time
6+
import tempfile
67

78

89
class BenchmarkEnv():
@@ -12,14 +13,9 @@ def __init__(self, repetitions=10):
1213
self.env["SCOREP_ENABLE_TRACING"] = "false"
1314
self.env["SCOREP_PROFILING_MAX_CALLPATH_DEPTH"] = "98"
1415
self.env["SCOREP_TOTAL_MEMORY"] = "3G"
15-
self.exp_dir = "benchmark_dir"
16+
self.exp_dir = tempfile.mkdtemp(prefix="benchmark_dir_")
1617
self.repetitions = repetitions
1718

18-
shutil.rmtree(
19-
self.exp_dir,
20-
ignore_errors=True)
21-
os.mkdir(self.exp_dir)
22-
2319
def __del__(self):
2420
pass
2521
# shutil.rmtree(

0 commit comments

Comments
 (0)