Created
October 27, 2011 04:29
-
-
Save stephenmcd/1318777 to your computer and use it in GitHub Desktop.
Estimated project cost of a Mercurial repository
This file contains hidden or 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
# A one-liner for calculating the cost of a project using a Mercurial repo. | |
# Replace: | |
# ignore|paths - pipe separated strings in paths to ignore | |
# eg: embedded libraries and generated code. | |
# mins_per_loc - estimated minutes per line of code. | |
# hourly_rate - hourly dollar rate being charged. | |
$ hg log --stat | egrep -v 'ignore|paths' | grep '|' | awk '{s+=$3} END {print "$" s / 60 * mins_per_loc * hourly_rate}' |
Yeah the comment is wrong. Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Minutes per line of code (which seems the right metric to me) or lines of code per minute?