Skip to content

Instantly share code, notes, and snippets.

@bessarabov
Created February 6, 2017 21:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bessarabov/f2221eb29ec8ce3fa76fc1ba568d965d to your computer and use it in GitHub Desktop.
Save bessarabov/f2221eb29ec8ce3fa76fc1ba568d965d to your computer and use it in GitHub Desktop.
bessarabov@air:~/tmp/delete_after_2017-02-03/memcached$ git log --author="brad@danga.co" --date=iso | perl -nalE 'if (/^Date:\s+[\d-]{10}\s(\d{2})/) { say $1+0 }' | sort | uniq -c|perl -MList::Util=max -nalE '$h{$F[1]} = $F[0]; }{ $m = max values %h; say $m; foreach (0..23) { $h{$_} = 0 if not exists $h{$_} } foreach (sort {$a <=> $b } keys %h) { say sprintf "%02d - %4d %s", $_, $h{$_}, "*"x ($h{$_} / $m * 50); }'
17
00 - 11 ********************************
01 - 10 *****************************
02 - 17 **************************************************
03 - 7 ********************
04 - 7 ********************
05 - 13 **************************************
06 - 8 ***********************
07 - 8 ***********************
08 - 2 *****
09 - 0
10 - 3 ********
11 - 1 **
12 - 0
13 - 0
14 - 0
15 - 0
16 - 4 ***********
17 - 8 ***********************
18 - 9 **************************
19 - 9 **************************
20 - 12 ***********************************
21 - 10 *****************************
22 - 11 ********************************
23 - 14 *****************************************
bessarabov@air:~/tmp/delete_after_2017-02-03/memcached$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment