diff --git a/src/ps.rs b/src/ps.rs index ef66092..a328822 100644 --- a/src/ps.rs +++ b/src/ps.rs @@ -593,10 +593,12 @@ fn do_create_snapshot( } } + // Historically, these three fields were always first, and we have test cases that depend on + // "v=" being the very first field. for r in &mut records { r.prepend_s("host", print_params.hostname.to_string()); r.prepend_s("time", print_params.timestamp.to_string()); - r.prepend_s("version", print_params.version.to_string()); + r.prepend_s("v", print_params.version.to_string()); } for v in records { @@ -606,7 +608,7 @@ fn do_create_snapshot( let mut datum = output::Object::new(); datum.push_s("host", print_params.hostname.to_string()); datum.push_s("time", print_params.timestamp.to_string()); - datum.push_s("version", print_params.version.to_string()); + datum.push_s("v", print_params.version.to_string()); if print_params.opts.load { if !per_cpu_secs.is_empty() { let a = output::Array::from_vec(