Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 2818d84d authored by GUILLEMOT Alexandre's avatar GUILLEMOT Alexandre
Browse files

add core option to runtest

parent c9e2b757
Branches
No related tags found
No related merge requests found
......@@ -20,6 +20,8 @@ parser.add_argument("-m", "--mem", nargs="?", const="8G",
help="Maximum amount of memory used. Should be written as <number><unit> where <unit> may be nothing, K, M or G, e.g. 100M")
parser.add_argument("-n", "--norun", action='store_true',
default=False, help="To only generate script and command")
parser.add_argument("-c", "--core", nargs="?", const="1",
help="Core on which the job should be ran")
args = parser.parse_args()
pkg_path = Path(args.pkg)
......@@ -131,7 +133,7 @@ if not args.norun:
print("Running script...")
cmd = ["systemd-run", "--scope", "--user", "-p", f"MemoryMax={memory_b}", "-p", "MemorySwapMax=0"]*(
memory_b != None) + ["perf", "stat", "-o", "perflog.txt"]*args.perf + ["taskset", "1", "./command.sh"]
memory_b != None) + ["perf", "stat", "-o", "perflog.txt"]*args.perf + ["taskset", args.core, "./command.sh"]
p = subprocess.Popen(cmd, start_new_session=True,
stdout=out_file, stderr=log_file)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment