aboutsummaryrefslogtreecommitdiff
path: root/crates/whirl_api/src/routes/stats/structures.rs
blob: c441f0f5e6b730f4ac02542581935c2a4b0bc34e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Copyright (C) 2021-2021 The Whirlsplash Collective
// SPDX-License-Identifier: GPL-3.0-only

#[derive(Serialize)]
pub struct Statistics {
  pub system:  StatisticsSystem,
  pub process: StatisticsProcess,
}
#[derive(Serialize)]
pub struct StatisticsSystem {
  #[serde(rename = "type")]
  pub os_type: String,
  pub release: String,
  pub uptime:  String,
}
#[derive(Serialize)]
pub struct StatisticsProcess {
  pub memory_usage: String,
  pub cpu_usage:    String,
  // pub uptime:       String,
}