Created
April 2, 2020 20:02
-
-
Save ology/77228bb267d6122e2763b201f3c7660e to your computer and use it in GitHub Desktop.
A cool metric
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log --author="Your Name" --date=iso | perl -nalE 'if (/^Date:\s+[\d-]{10}\s(\d{2})/) { say $1+0 }' | sort | uniq -c|perl -MList::Util=max,sum0 -nalE '$h{$F[1]} = $F[0]; }{ $m = max values %h; for (0..23) { $h{$_} = 0 if not exists $h{$_} } for (sort {$a <=> $b } keys %h) { say sprintf "%02d - %4d %s", $_, $h{$_}, "*" x ($h{$_} / $m * 50); } say sum0(values %h), " commits"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment