Rewrite attribute parsing logic
This commit is contained in:
parent
1bdbaaf082
commit
4c4fb1cf36
4 changed files with 141 additions and 92 deletions
|
@ -11,10 +11,7 @@
|
|||
"type": "string"
|
||||
},
|
||||
"system_cpu_time": {
|
||||
"default": {
|
||||
"nanos": 0,
|
||||
"secs": 0
|
||||
},
|
||||
"default": "0.000000000s",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/DurationDef"
|
||||
|
|
|
@ -34,7 +34,6 @@ struct Process {
|
|||
wall_time: Duration,
|
||||
#[serde(default, with = "DurationDef")]
|
||||
user_cpu_time: Duration,
|
||||
// FIXME this should serialize the default as "0.000000000s"
|
||||
#[serde(default, serialize_with = "custom_serialize")]
|
||||
#[schemars(with = "DurationDef")]
|
||||
system_cpu_time: Duration,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue