add averages
This commit is contained in:
parent
b7938c3931
commit
b6242ac20e
|
@ -152,7 +152,7 @@ foreach my $day ( @days ){
|
||||||
|
|
||||||
$table->load( @data );
|
$table->load( @data );
|
||||||
|
|
||||||
print $table."\nTotal: ".$card->{total}."\nHourly Max=".$card->{max}."\n";
|
print $table."\nTotal: ".$card->{total}."\nHourly Max=".$card->{max}."\nAverage=".$card->{average}."\n";
|
||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
|
||||||
|
|
|
@ -12,11 +12,11 @@ Git::PunchCard - Gathers info for making punchcard style graphs for git.
|
||||||
|
|
||||||
=head1 VERSION
|
=head1 VERSION
|
||||||
|
|
||||||
Version 0.0.1
|
Version 0.1.0
|
||||||
|
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
our $VERSION = '0.0.1';
|
our $VERSION = '0.1.0';
|
||||||
|
|
||||||
|
|
||||||
=head1 SYNOPSIS
|
=head1 SYNOPSIS
|
||||||
|
@ -361,8 +361,12 @@ sub dir {
|
||||||
$self->{card}{$day}{max}=$self->{card}{$day}{$hour};
|
$self->{card}{$day}{max}=$self->{card}{$day}{$hour};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$self->{card}{$day}{average}= $self->{card}{$day}{total} / 24;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$self->{card}{average}= $self->{card}{total} / 168 ;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue