Browse Source

add averages

tags/0.1.0
Zane C. B-H 4 months ago
parent
commit
b6242ac20e
2 changed files with 7 additions and 3 deletions
  1. +1
    -1
      Git-PunchCard/bin/punchcard-git
  2. +6
    -2
      Git-PunchCard/lib/Git/PunchCard.pm

+ 1
- 1
Git-PunchCard/bin/punchcard-git View File

@@ -152,7 +152,7 @@ foreach my $day ( @days ){

$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


+ 6
- 2
Git-PunchCard/lib/Git/PunchCard.pm View File

@@ -12,11 +12,11 @@ Git::PunchCard - Gathers info for making punchcard style graphs for git.

=head1 VERSION

Version 0.0.1
Version 0.1.0

=cut

our $VERSION = '0.0.1';
our $VERSION = '0.1.0';


=head1 SYNOPSIS
@@ -361,8 +361,12 @@ sub dir {
$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;
}


Loading…
Cancel
Save