-
-
Notifications
You must be signed in to change notification settings - Fork 326
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kind of horrible test impl - creates a mutex struct and threads it into the controller - forks off substructs into relevant bits which self-update no change - used in scheduler to update queue length Signed-off-by: clux <[email protected]>
- Loading branch information
Showing
8 changed files
with
86 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
//! Optional metrics exposed by the runtime | ||
use parking_lot::RwLock; | ||
use std::sync::Arc; | ||
|
||
/// Metrics relating to the `Scheduler` | ||
#[derive(Default, Debug)] | ||
pub struct SchedulerMetrics { | ||
Check failure on line 7 in kube-runtime/src/metrics.rs
|
||
/// Current size of the scheduler queue | ||
pub queue_depth: usize, | ||
} | ||
|
||
/// All metrics | ||
#[derive(Default, Debug)] | ||
pub struct Metrics { | ||
/// kube build info | ||
pub build_info: String, | ||
/// Metrics from the scheduler | ||
pub scheduler: Arc<RwLock<SchedulerMetrics>>, | ||
} | ||
|
||
impl Metrics { | ||
fn new() -> Self { | ||
Check warning on line 22 in kube-runtime/src/metrics.rs
|
||
Self { | ||
build_info: env!("CARGO_PKG_VERSION").to_string(), | ||
..Default::default() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters