Skip to content

Instantly share code, notes, and snippets.

@masak
Created February 3, 2015 20:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save masak/ae7677e5c2ccc7f37f97 to your computer and use it in GitHub Desktop.
Save masak/ae7677e5c2ccc7f37f97 to your computer and use it in GitHub Desktop.
Stats for commits, monthly activity of Rakudo
my %last-day-of-month = <
01 31 02 28 03 31 04 30 05 31 06 30
07 31 08 31 09 30 10 31 11 30 12 31
>;
YEAR:
for 2006 .. 2015 -> $year {
say "";
MONTH:
for "01" .. "12" -> $month {
next MONTH if $year == 2006 && $month < 4;
last YEAR if $year == 2015 && $month eq "02";
my $ldom = %last-day-of-month{$month};
$ldom++ if $year %% 4 && $month eq "02";
my $commits = +qqx[git log --oneline --after $year-$month-01 --before $year-$month-$ldom | wc -l].trim;
say "$year-$month: ", $commits.fmt("%3d"), " ", "#" x ($commits div 10);
}
}
$ perl6 monthly-activity
2006-04: 76 #######
2006-05: 79 #######
2006-06: 3
2006-07: 11 #
2006-08: 4
2006-09: 2
2006-10: 1
2006-11: 35 ###
2006-12: 12 #
2007-01: 6
2007-02: 2
2007-03: 3
2007-04: 3
2007-05: 2
2007-06: 50 #####
2007-07: 10 #
2007-08: 3
2007-09: 5
2007-10: 6
2007-11: 4
2007-12: 94 #########
2008-01: 108 ##########
2008-02: 55 #####
2008-03: 33 ###
2008-04: 46 ####
2008-05: 147 ##############
2008-06: 185 ##################
2008-07: 142 ##############
2008-08: 89 ########
2008-09: 155 ###############
2008-10: 78 #######
2008-11: 152 ###############
2008-12: 244 ########################
2009-01: 168 ################
2009-02: 218 #####################
2009-03: 165 ################
2009-04: 263 ##########################
2009-05: 216 #####################
2009-06: 114 ###########
2009-07: 162 ################
2009-08: 180 ##################
2009-09: 137 #############
2009-10: 169 ################
2009-11: 432 ###########################################
2009-12: 128 ############
2010-01: 130 #############
2010-02: 469 ##############################################
2010-03: 314 ###############################
2010-04: 225 ######################
2010-05: 216 #####################
2010-06: 378 #####################################
2010-07: 293 #############################
2010-08: 121 ############
2010-09: 128 ############
2010-10: 42 ####
2010-11: 64 ######
2010-12: 29 ##
2011-01: 56 #####
2011-02: 70 #######
2011-03: 39 ###
2011-04: 16 #
2011-05: 161 ################
2011-06: 656 #################################################################
2011-07: 598 ###########################################################
2011-08: 346 ##################################
2011-09: 351 ###################################
2011-10: 184 ##################
2011-11: 169 ################
2011-12: 164 ################
2012-01: 201 ####################
2012-02: 188 ##################
2012-03: 147 ##############
2012-04: 169 ################
2012-05: 253 #########################
2012-06: 191 ###################
2012-07: 290 #############################
2012-08: 179 #################
2012-09: 97 #########
2012-10: 132 #############
2012-11: 104 ##########
2012-12: 112 ###########
2013-01: 144 ##############
2013-02: 64 ######
2013-03: 184 ##################
2013-04: 149 ##############
2013-05: 215 #####################
2013-06: 223 ######################
2013-07: 253 #########################
2013-08: 223 ######################
2013-09: 158 ###############
2013-10: 221 ######################
2013-11: 234 #######################
2013-12: 116 ###########
2014-01: 211 #####################
2014-02: 151 ###############
2014-03: 125 ############
2014-04: 263 ##########################
2014-05: 262 ##########################
2014-06: 147 ##############
2014-07: 167 ################
2014-08: 341 ##################################
2014-09: 298 #############################
2014-10: 227 ######################
2014-11: 150 ###############
2014-12: 134 #############
2015-01: 261 ##########################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment