diff options
author | Brian Chen <brianc118@meta.com> | 2024-01-29 20:49:54 -0800 |
---|---|---|
committer | Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> | 2024-01-29 20:49:54 -0800 |
commit | 56d06f48ba845fb3672aae75967709c6081601b0 (patch) | |
tree | 24516b51701e8345ac38bc175d745c26f7d98e09 | |
parent | 3f5934b0d5428d1482bf7182aef3ecaf3cc22c96 (diff) |
Fix reading old samples missing slabinfo
Summary:
Slabinfo was added as non-optional. When it's missing (e.g. from past
samples) below will fail reading the samples.
Instead if it's missing make it deserialize to default empty map.
Reviewed By: lnyng
Differential Revision: D53205190
fbshipit-source-id: 5d55c9faf5b90e7834c13f60f9b5b758fef7883e
-rw-r--r-- | below/model/src/sample.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/below/model/src/sample.rs b/below/model/src/sample.rs index a5cbfff5..ae5f80ad 100644 --- a/below/model/src/sample.rs +++ b/below/model/src/sample.rs @@ -62,6 +62,7 @@ pub struct SystemSample { pub stat: procfs::Stat, pub meminfo: procfs::MemInfo, pub vmstat: procfs::VmStat, + #[serde(default)] pub slabinfo: procfs::SlabInfoMap, pub hostname: String, pub disks: procfs::DiskMap, |