Useless Koha statistics – What files have been changed the most

So for no real reason, other than to see if I could, I figured out how to get the top 10 changed (well it could be any number) files in the Koha code base

git rev-list --objects --all | awk '$2' | sort -k2 | uniq -cf1 | sort -rn |
while read frequency sample path
do
    [ "blob" == "$(git cat-file -t $sample)" ] && echo -e "$frequencyt$path";
done | head

This told me (where the number is the number of commits)

  1. 3006 installer/data/mysql/updatedatabase.pl
  2. 1220 C4/Biblio.pm
  3. 1141 C4/Search.pm
  4. 1137 kohaversion.pl
  5. 997 C4/Circulation.pm
  6. 996 installer/data/mysql/kohastructure.sql
  7. 914 C4/Auth.pm
  8. 796 opac/opac-search.pl
  9. 752 circ/circulation.pl
  10. 710 opac/opac-detail.pl

You could of course leave the head off to get all or do head -20 to get the top twenty etc.

Like I said, useless statistic, but kinda interesting nonetheless

One thought on “Useless Koha statistics – What files have been changed the most”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s