use crate::common;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ResourceStats {
#[serde(rename = "average")]
pub average: common::ResourceStat,
#[serde(rename = "thread_info")]
pub thread_info: common::ThreadInfo,
#[serde(rename = "min")]
pub min: common::ResourceStat,
#[serde(rename = "total")]
pub total: common::ResourceStat,
#[serde(rename = "max")]
pub max: common::ResourceStat,
}
impl ResourceStats {
pub fn new(average: common::ResourceStat, thread_info: common::ThreadInfo, min: common::ResourceStat, total: common::ResourceStat, max: common::ResourceStat) -> ResourceStats {
ResourceStats {
average,
thread_info,
min,
total,
max,
}
}
}