swarm-builder: log each archetype eval's elapsed time, wait 5 minutes
This commit is contained in:
parent
b79896c237
commit
cce00a6592
7 changed files with 195 additions and 24 deletions
|
|
@ -56,9 +56,12 @@ pub enum Reply {
|
|||
/// hyperhive source and answers on the request's reply subject.
|
||||
pub const ARCHETYPES_SUBJECT: &str = "$SWARM.builder.archetypes";
|
||||
|
||||
/// The longest one archetype evaluation may take, and how long the controller
|
||||
/// waits for its reply.
|
||||
pub const ARCHETYPES_DEADLINE: Duration = Duration::from_mins(2);
|
||||
/// The longest one archetype evaluation may take.
|
||||
pub const ARCHETYPES_DEADLINE: Duration = Duration::from_mins(5);
|
||||
|
||||
/// How long the controller waits for an evaluation's reply: the evaluation at
|
||||
/// its deadline, plus a minute for its timeout reply's trip back.
|
||||
pub const ARCHETYPES_REPLY_DEADLINE: Duration = Duration::from_mins(6);
|
||||
|
||||
/// One archetype evaluation. No field yet: the builder evaluates the hyperhive
|
||||
/// source it was deployed with.
|
||||
|
|
@ -209,6 +212,16 @@ mod tests {
|
|||
assert!(REPLY_DEADLINE > BUILD_DEADLINE);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_archetypes_deadline_is_five_minutes() {
|
||||
assert_eq!(ARCHETYPES_DEADLINE, Duration::from_mins(5));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_archetypes_reply_deadline_outlasts_the_evaluation() {
|
||||
assert!(ARCHETYPES_REPLY_DEADLINE > ARCHETYPES_DEADLINE);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn the_lock_reply_deadline_outlasts_the_lock() {
|
||||
assert!(LOCK_REPLY_DEADLINE > LOCK_DEADLINE);
|
||||
|
|
|
|||
Loading…
Reference in a new issue