Minor formatting

This commit is contained in:
Patrick Lühne 2019-03-02 04:22:30 +01:00
parent 6c54f2d013
commit 47953d3797
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF
1 changed files with 7 additions and 3 deletions

View File

@ -11,7 +11,9 @@ fn main()
pretty_env_logger::init();
// Initialize a new benchmark repository
let mut benchmark_repository = BenchmarkRepository::new("gitea@git.luehne.de:patrick/benchmark-template.git", Path::new("cache").to_path_buf(), "gitea");
let mut benchmark_repository = BenchmarkRepository::new(
"gitea@git.luehne.de:patrick/benchmark-template.git",
Path::new("cache").to_path_buf(), "gitea");
// Load the instances.yml file from the config branch
let content = benchmark_repository.read_file(Path::new("instances.yml"), "config").unwrap();
@ -42,11 +44,13 @@ fn main()
// options are passed to the script as environment variable. The script then passes them to
// the actual command we want to benchmark
Command::new("sbatch")
.args(&["/home/pluehne/test-job.sh", "--nodes", "1", "--ntasks-per-node", "1", "-p", "kr"])
.args(&["/home/pluehne/test-job.sh",
"--nodes", "1", "--ntasks-per-node", "1", "-p", "kr"])
// This is the URL the computation node needs to write the results to. All it needs to
// do is clone this repository, and create and push a commit to the “master” branch once
// its done with the benchmark job
.env("JOB_RESULT_REPOSITORY_URL", &format!("file://{}", fs::canonicalize(&job.result_repository_path).unwrap().display()))
.env("JOB_RESULT_REPOSITORY_URL", &format!("file://{}",
fs::canonicalize(&job.result_repository_path).unwrap().display()))
// The job ID provides a quick way to create temporary files without conflicts between
// the jobs
.env("JOB_ID", format!("{}", job.id))