Skip to content

Instantly share code, notes, and snippets.

@ology
Created April 2, 2020 20:02
Show Gist options
  • Save ology/77228bb267d6122e2763b201f3c7660e to your computer and use it in GitHub Desktop.
Save ology/77228bb267d6122e2763b201f3c7660e to your computer and use it in GitHub Desktop.
A cool metric
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