1use serde::{Deserialize, Serialize};
3
4use rd_util::*;
5
6const INDEX_DOC: &str = "\
7//
8// rd-agent interface file path index
9//
10// cmd: Launch and stop workloads and benchmarks
11// cmd_ack: Command sequence ack
12// sysreqs: Satisfied and missed system requirements
13// report: Summary report of the current state (per-second)
14// report_d: Per-second report directory
15// report_1min: Summary report of the current state (per-minute)
16// report_1min_d: Per-minute report directory
17// bench: Benchmark results
18// slices: Top-level slice resource control configurations
19// oomd: OOMD on/off and configurations
20// sideloader_stats: Sideloader status
21// hashd[].args: rd-hashd arguments
22// hashd[].params: rd-hashd runtime adjustable parameters
23// hashd[].report: rd-hashd summary report
24// sideload_defs: Side and sys workload definitions
25//
26";
27
28#[derive(Serialize, Deserialize, Clone, Default)]
29pub struct HashdIndex {
30 pub args: String,
31 pub params: String,
32 pub report: String,
33}
34
35#[derive(Serialize, Deserialize, Clone, Default)]
36pub struct Index {
37 pub cmd: String,
38 pub cmd_ack: String,
39 pub sysreqs: String,
40 pub report: String,
41 pub report_d: String,
42 pub report_1min: String,
43 pub report_1min_d: String,
44 pub bench: String,
45 pub slices: String,
46 pub oomd: String,
47 pub sideloader_status: String,
48 pub hashd: [HashdIndex; 2],
49 pub sideload_defs: String,
50}
51
52impl JsonLoad for Index {}
53impl JsonSave for Index {
54 fn preamble() -> Option<String> {
55 Some(INDEX_DOC.to_string())
56 }
57}