mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
remove an unused queue_created in the Queue, might be added in the future again for more metrics. Also use core than std in one place
This commit is contained in:
parent
7d93d907f6
commit
baf19b4d60
@ -77,7 +77,6 @@ struct Config {
|
|||||||
struct Queue {
|
struct Queue {
|
||||||
id: u64,
|
id: u64,
|
||||||
name: String,
|
name: String,
|
||||||
_queue_created: Instant,
|
|
||||||
task: Box<dyn FnOnce() + Send + Sync + 'static>,
|
task: Box<dyn FnOnce() + Send + Sync + 'static>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,7 +97,6 @@ impl Queue {
|
|||||||
Self {
|
Self {
|
||||||
id,
|
id,
|
||||||
name: name.to_owned(),
|
name: name.to_owned(),
|
||||||
_queue_created: queue_created,
|
|
||||||
task: Box::new(move || {
|
task: Box::new(move || {
|
||||||
common_base::prof_span!(_guard, &name_cloned);
|
common_base::prof_span!(_guard, &name_cloned);
|
||||||
let execution_start = Instant::now();
|
let execution_start = Instant::now();
|
||||||
@ -325,7 +323,7 @@ impl InternalSlowJobPool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn take_metrics(&mut self) -> HashMap<String, Vec<JobMetrics>> {
|
pub fn take_metrics(&mut self) -> HashMap<String, Vec<JobMetrics>> {
|
||||||
std::mem::replace(&mut self.jobs_metrics, HashMap::new())
|
core::mem::take(&mut self.jobs_metrics)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user