Skip to content
Snippets Groups Projects
Commit 645332578a9d authored by Raphaël Gomès's avatar Raphaël Gomès
Browse files

Use the asv `cpu-affinity` option instead of `taskset`

`taskset` is linux-only, while this supports unix, mac and windows.

As a side-effect, the build phases will *not* be set to only CPUs 2 and 3, but
will take advantage of the full power of the machine.
parent 490eecd2d7eb
No related branches found
No related tags found
No related merge requests found
...@@ -56,6 +56,12 @@ ...@@ -56,6 +56,12 @@
# still be running while other tests started # still be running while other tests started
run_command.extend(["--launch-method", "spawn"]) run_command.extend(["--launch-method", "spawn"])
# Run ASV on specific cores for stability
# Examples, `2,3`, `0-4`, `0`
cpu_affinity = os.environ.get("ASV_CPU_AFFINITY")
if cpu_affinity:
run_command.extend(["--cpu-affinity", cpu_affinity])
if not args.quiet: if not args.quiet:
asv_flags = ["--verbose", "--show-stderr"] asv_flags = ["--verbose", "--show-stderr"]
else: else:
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
./lib/before-check.sh ./lib/before-check.sh
time HGRCPATH= taskset -c 2,3 asv find --save_results $@ ASV_CPU_AFFINITY=2,3
time HGRCPATH= asv find --save_results --cpu-affinity=$ASV_CPU_AFFINITY $@
# Sync results over to deploy server # Sync results over to deploy server
"${ROOT}/sync_results.sh" "${ROOT}/sync_results.sh"
\ No newline at end of file
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
shift shift
fi fi
taskset -c 2,3 "${ROOT}"/launch.py "$target" -s 10 "$@" ASV_CPU_AFFINITY=2,3 "${ROOT}"/launch.py "$target" -s 10 "$@"
# Sync results over to deploy server # Sync results over to deploy server
"${ROOT}/sync_results.sh" "${ROOT}/sync_results.sh"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment