| 1 | //! Memory graph configuration. |
| 2 | |
| 3 | use serde::Deserialize; |
| 4 | |
| 5 | /// Memory-related configuration file options. |
| 6 | #[derive(Clone, Debug, Default, Deserialize)] |
| 7 | #[cfg_attr(feature = "generate_schema", derive(schemars::JsonSchema))] |
| 8 | #[cfg_attr(test, serde(deny_unknown_fields), derive(PartialEq, Eq))] |
| 9 | pub struct MemoryGraphConfig { |
| 10 | // TODO: We probably want to make this an enum...? If we want to also support external legends |
| 11 | // (e.g. table-style, list-style) then we probably need a new system outright. |
| 12 | /// Where to place the legend for the memory chart widget. |
| 13 | pub(crate) legend_position: Option<String>, |
| 14 | |
| 15 | /// Whether to collect and display cache and buffer memory. Not available on Windows. |
| 16 | #[cfg_attr(target_os = "windows", allow(dead_code))] |
| 17 | pub(crate) cache_memory: Option<bool>, |
| 18 | |
| 19 | /// Whether to subtract ARC that can be freed from memory usage. |
| 20 | #[cfg_attr(not(feature = "zfs"), allow(dead_code))] |
| 21 | pub(crate) free_arc: Option<bool>, |
| 22 | |
| 23 | /// Whether to use short GPU names in the memory widget. |
| 24 | #[cfg_attr(not(feature = "gpu"), allow(dead_code))] |
| 25 | pub(crate) short_gpu_names: Option<bool>, |
| 26 | } |