Skip to content

Commit

Permalink
Fix another bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars T Hansen committed Jan 13, 2025
1 parent 56e7bd7 commit 990a939
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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(
Expand Down

0 comments on commit 990a939

Please sign in to comment.