use super::super::super::diagnostic::DataSource;
use serde::{Deserialize, Serialize};
#[allow(dead_code)] #[derive(Deserialize, Serialize)]
pub struct NodeHotThreads {
hot_threads: HotThreads,
}
#[allow(dead_code)] #[derive(Deserialize, Serialize)]
struct HotThreads {
time: String,
busiest_threads: u32,
threads: Vec<Thread>,
}
#[allow(dead_code)] #[derive(Deserialize, Serialize)]
struct Thread {
name: String,
thread_id: u32,
percent_of_cpu_time: f32,
state: String,
traces: Vec<String>,
}
impl DataSource for NodeHotThreads {
fn name() -> String {
"hot_threads".to_string()
}
fn aliases() -> Vec<&'static str> {
vec!["logstash_nodes_hot_threads"]
}
}