#!/usr/bin/perl

use warnings;
use strict;

use File::Spec::Functions qw(splitpath);

my %procs;
my %cmds;
my %stats;

do "parse-data.pl";

&parse_data(\%procs, \%cmds);
&accumulate_stats(\%procs, \%stats, 1);

foreach my $pid (sort { $a <=> $b } keys %{$cmds{"start_udev"}}) {
    print "$pid ", ($procs{$pid}->{end} - $procs{$pid}->{start}), " read ", $stats{$pid}->[0], " write ", $stats{$pid}->[1], "\n";
}
