Patch for bugs in json.pm

Michael Burk <[email protected]>
Newsgroups gmane.comp.archivers.amanda.devel
Message-ID <CAJ-WpnrZyirsMD32Tw65Aqku3EFBGOM0rED0o9UqM0Q9tkG+YA@mail.gmail.com>
Hello,

I found 3 bugs in the json.pm module:

- dump_duration shows minutes only (no seconds)
- tape_duration shows minutes only (no seconds)
- Avg Compressed Size shows incr. value for every value

Here is diff fixing all 3:

--- json.pm.orig 2016-02-22 09:49:51.000000000 -0700
+++ json.pm 2016-02-25 20:45:17.119683669 -0700
@@ -256,8 +256,8 @@
     };

     $self->{'sections'}{'statistic'}{'avg_compression'} = {
- total => $comp_size->($incr_stats),
- full  => $comp_size->($incr_stats),
+ total => $comp_size->($total_stats),
+ full  => $comp_size->($full_stats),
  incr  => $comp_size->($incr_stats)
     };

@@ -535,9 +535,9 @@
  'dump_orig_kb' => $$record[4],
  'dump_out_kb' => $$record[5],
  'dump_comp' => $$record[6],
- 'dump_duration' => int($$record[7]),
+ 'dump_duration' => $$record[7],
  'dump_rate' => $$record[8],
- 'tape_duration' => int($$record[9]),
+ 'tape_duration' => $$record[9],
  'tape_rate' => $$record[10],
  'dump_partial' => $$record[11],
  'last_tape_label' => $$record[12]


Thanks,
Michael
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.