diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-08-08 21:31:39 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-08-08 21:31:39 -0400 |
commit | 5eb1a590404fd9c8437a30ab364d1638c1dae26d (patch) | |
tree | a8df3fde8231c981750f4f38f170d43c18a6e715 | |
parent | 3e3d91f988d4fab26782b268a9d968f0e0df04cb (diff) |
ci: priority -> nice
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r-- | src/bin/gen-job-list.rs | 10 | ||||
-rw-r--r-- | src/users.rs | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/bin/gen-job-list.rs b/src/bin/gen-job-list.rs index 7fe7921..b75bea5 100644 --- a/src/bin/gen-job-list.rs +++ b/src/bin/gen-job-list.rs @@ -35,13 +35,13 @@ pub struct TestJob { branch: String, commit: String, age: u64, - priority: u64, + nice: u64, test: String, subtest: String, } fn testjob_weight(j: &TestJob) -> u64 { - j.age + j.priority + j.age + j.nice } use std::cmp::Ordering; @@ -134,14 +134,14 @@ fn branch_test_jobs(rc: &CiConfig, &mut commits_updated) }) .map(|i| i.clone()) { - let mut priority = test_group.priority; + let mut nice = test_group.nice; let stats = test_stats(durations, test_name, &subtest); if let Some(stats) = stats { // Deprioritize tests that only pass or only fail // XXX: make this configurable if !stats.passed != !stats.failed && stats.passed + stats.failed > 10 { - priority += 10; + nice += 10; } } @@ -149,7 +149,7 @@ fn branch_test_jobs(rc: &CiConfig, branch: branch.to_string(), commit: commit.clone(), age: age as u64, - priority, + nice, test: test_name.to_string(), subtest, }); diff --git a/src/users.rs b/src/users.rs index b7c11bd..7f1cffa 100644 --- a/src/users.rs +++ b/src/users.rs @@ -8,7 +8,7 @@ use anyhow; #[derive(Deserialize)] pub struct RcTestGroup { pub max_commits: u64, - pub priority: u64, + pub nice: u64, pub tests: Vec<PathBuf>, } |