Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove metrics from new scheduler #1116

Merged
merged 1 commit into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions nativelink-scheduler/src/scheduler_state/awaited_action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ use nativelink_util::action_messages::{
ActionInfo, ActionInfoHashKey, ActionStage, ActionState, OperationId, WorkerId,
};
use nativelink_util::evicting_map::InstantWrapper;
use nativelink_util::metrics_utils::{CollectorState, MetricsComponent};
use parking_lot::{RwLock, RwLockReadGuard, RwLockUpgradableReadGuard, RwLockWriteGuard};
use static_assertions::{assert_eq_size, const_assert, const_assert_eq};
use tokio::sync::watch;
Expand Down Expand Up @@ -347,30 +346,3 @@ const_assert!(
AwaitedActionSortKey::new(0, 0, [0xff, 0xff, 0xff, 0xff]).0
> AwaitedActionSortKey::new(0, 0, [0; 4]).0
);

impl MetricsComponent for AwaitedAction {
fn gather_metrics(&self, c: &mut CollectorState) {
c.publish(
"action_digest",
&self.action_info.unique_qualifier.action_name(),
"The digest of the action.",
);
c.publish(
"current_state",
self.get_current_state().as_ref(),
"The current stage of the action.",
);
c.publish(
"attempts",
&self.get_attempts(),
"The number of attempts this action has tried.",
);
c.publish(
"worker_id",
&self
.get_worker_id()
.map_or(String::new(), |v| v.to_string()),
"The current worker processing the action (if any).",
);
}
}
19 changes: 2 additions & 17 deletions nativelink-scheduler/src/scheduler_state/completed_action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ use std::sync::Arc;
use std::time::SystemTime;

use nativelink_util::action_messages::{ActionInfoHashKey, ActionState, OperationId};
use nativelink_util::metrics_utils::{CollectorState, MetricsComponent};

/// A completed action that has no listeners.
pub struct CompletedAction {
/// The time the action was completed.
pub(crate) completed_time: SystemTime,
/// TODO!(unused?!)
pub(crate) _completed_time: SystemTime,
/// The current state of the action when it was completed.
pub(crate) state: Arc<ActionState>,
}
Expand Down Expand Up @@ -55,18 +55,3 @@ impl Borrow<ActionInfoHashKey> for CompletedAction {
&self.state.id.unique_qualifier
}
}

impl MetricsComponent for CompletedAction {
fn gather_metrics(&self, c: &mut CollectorState) {
c.publish(
"completed_timestamp",
&self.completed_time,
"The timestamp this action was completed",
);
c.publish(
"current_state",
self.state.as_ref(),
"The current stage of the action.",
);
}
}
147 changes: 0 additions & 147 deletions nativelink-scheduler/src/scheduler_state/metrics.rs

This file was deleted.

1 change: 0 additions & 1 deletion nativelink-scheduler/src/scheduler_state/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ pub(crate) mod awaited_action;
pub(crate) mod client_action_state_result;
pub(crate) mod completed_action;
pub(crate) mod matching_engine_action_state_result;
pub(crate) mod metrics;
pub mod state_manager;
pub mod workers;