chore: run extract_machine_info.py before running the benchmark target, fix missing MACHINE_NAME variable exception

This commit is contained in:
Umut
2021-09-27 13:28:35 +03:00
parent 3408bba1ed
commit ad95aba053
3 changed files with 7 additions and 3 deletions

View File

@@ -144,6 +144,8 @@ docker_bas: docker_build_and_start
docker_publish_measurements: docker_build
mkdir -p .benchmarks
@# Poetry is not installed on the benchmark servers
@# Thus, we ran `extract_machine_info.py` script using native python
python script/progress_tracker_utils/extract_machine_info.py
docker run --rm --volume /"$$(pwd)":/src $(DEV_DOCKER_IMG) \
/bin/bash ./script/progress_tracker_utils/benchmark_and_publish_findings_in_docker.sh
@@ -185,6 +187,7 @@ pytest_nb:
.PHONY: pytest_nb
benchmark:
poetry run python script/progress_tracker_utils/extract_machine_info.py
poetry run python script/progress_tracker_utils/measure.py benchmarks
.PHONY: benchmark

View File

@@ -17,7 +17,7 @@ export LD_PRELOAD=/compiler/build/lib/Runtime/libZamalangRuntime.so
initial_log=logs/$(date -u --iso-8601=seconds).log
mkdir -p logs
make -s benchmark > "$initial_log"
poetry run python script/progress_tracker_utils/measure.py benchmarks > "$initial_log"
final_log=logs/$(date -u --iso-8601=seconds).log

View File

@@ -30,9 +30,10 @@ def main():
os_value = f"{platform.system()} {platform.release()}"
properties.append(["OS", os_value])
name = os.getenv("MACHINE_NAME").strip()
name = os.getenv("MACHINE_NAME")
if name is None:
name = platform.node().strip()
name = platform.node()
name = name.strip()
id_ = name.lower()
id_ = id_.replace(" ", "-")