Search This Blog

Thursday, October 29, 2009


Recently I was browsing some open source project's(as usual I forgot the name) web site and the author has put SLOC report for his project. It was pretty cool. I wanted to try it on some of my projects and tried sloccount( in my office but since my office PC doesnt have my personal project sources I was not able to get SLOC report for my projects.

Today I suddenly, I remembered about SLOC and tried it on my Ace project. And here is the output
Sam@samxp /cygdrive/e/Projects
$ sloccount ace_test/src
Creating filelist for app
Creating filelist for drivers
Creating filelist for include
Creating filelist for kernel
Creating filelist for lib
Have a non-directory at the top, so creating directory top_dir
Adding /cygdrive/e/Projects/ace_test/src/wscript to top_dir
Categorizing files.
Finding a working MD5 command....
Found a working MD5 command.
Computing results.

SLOC Directory SLOC-by-Language (Sorted)
13716 include ansic=13699,sh=17
9045 kernel ansic=8810,asm=221,python=14
3712 lib ansic=3691,sh=11,python=10
1062 drivers ansic=1051,python=11
41 top_dir python=41
10 app ansic=6,python=4

Totals grouped by language (dominant language first):
ansic: 27257 (98.81%)
asm: 221 (0.80%)
python: 80 (0.29%)
sh: 28 (0.10%)

Total Physical Source Lines of Code (SLOC) = 27,586
Development Effort Estimate, Person-Years (Person-Months) = 6.51 (78.15)
(Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05))
Schedule Estimate, Years (Months) = 1.09 (13.10)
(Basic COCOMO model, Months = 2.5 * (person-months**0.38))
Estimated Average Number of Developers (Effort/Schedule) = 5.97
Total Estimated Cost to Develop = $ 879,761
(average salary = $56,286/year, overhead = 2.40).
SLOCCount, Copyright (C) 2001-2004 David A. Wheeler
SLOCCount is Open Source Software/Free Software, licensed under the GNU GPL.
SLOCCount comes with ABSOLUTELY NO WARRANTY, and you are welcome to
redistribute it under certain conditions as specified by the GNU GPL license;
see the documentation for details.
Please credit this data as "generated using David A. Wheeler's 'SLOCCount'."
Pretty cool isnt it? :)


simha said...

u owe me lots of money!!!
wow.. i started counting. :)

tony said...

Hi, it's a very great blog.
I could tell how much efforts you've taken on it.
Keep doing!
Music Mp3