Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-11

Code Metrics and Project Analysis

12 messages · 8 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Can Lazarus IDE report on a Project or Package any statistics?

eg: % code lines, % comment lines, total no of lines of code, number of units etc..?

If not, anybody know of such a tool I can use on Object Pascal code?

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Alexsander Rosa
to Graeme Geldenhuys

Have you tried command-line utility SLOC Count?
http://www.dwheeler.com/sloccount/

2009/11/17 Graeme Geldenhuys

Show quoted text 21 lines
Can Lazarus IDE report on a Project or Package any statistics? eg: % code lines, % comment lines, total no of lines of code, number of units etc..? If not, anybody know of such a tool I can use on Object Pascal code? Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/ -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Atenciosamente, Alexsander da Rosa Linux User #113925 "Extremismo na defesa da liberdade n?o ? defeito. Modera??o na busca por justi?a n?o ? virtude." -- Barry Goldwater -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20091117/516ff101/attachment.html>

Reply by email

Mattias Gärtner
to Alexsander Rosa

Zitat von Alexsander Rosa :

Have you tried command-line utility SLOC Count? http://www.dwheeler.com/sloccount/

Funny tool.
I ran it on a single unit (ide/codebrowser.pas) and got:

Total Physical Source Lines of Code (SLOC) = 2,849 Development Effort Estimate, Person-Years (Person-Months) = 0.60 (7.21) (Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05)) Schedule Estimate, Years (Months) = 0.44 (5.29) (Basic COCOMO model, Months = 2.5 * (person-months**0.38)) Estimated Average Number of Developers (Effort/Schedule) = 1.36 Total Estimated Cost to Develop = $ 81,109 (average salary = $56,286/year, overhead = 2.40).

81,109 dollar - not too bad for 6 days work, ehm I mean 7.21 months.

Lazarus in total is worth 45mio dollar and requires 68 developers.

Mattias

Show quoted text 36 lines
2009/11/17 Graeme Geldenhuys > Can Lazarus IDE report on a Project or Package any statistics? > > eg: % code lines, % comment lines, total no of lines of code, number of > units etc..? > > If not, anybody know of such a tool I can use on Object Pascal code? > > Regards, > - Graeme - > > -- > fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal > http://opensoft.homeip.net/fpgui/ > > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus > -- Atenciosamente, Alexsander da Rosa Linux User #113925 "Extremismo na defesa da liberdade n?o ? defeito. Modera??o na busca por justi?a n?o ? virtude." -- Barry Goldwater
------------------ Powered by NetMail

Reply by email

Graeme Geldenhuys
to Mattias Gärtner
Mattias G?rtner wrote
81,109 dollar - not too bad for 6 days work, ehm I mean 7.21 months.

fpGUI Toolkit is worth $2.5 million US Dollars, requires 12 developers and will take 19 years to implement. I wasn't paid anything near that; implemented it in 3 years (part time) and I was the only developer!

First thing tomorrow morning I'm calling a meeting with upper management. ;-)

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Mattias Gärtner: Zitat von Alexsander Rosa : Funny tool. I ran it on a single unit (ide/codebrowser.pas)…
Mattias G?rtner wrote
Lazarus in total is worth 45mio dollar and requires 68 developers.

I think your hidden '.svn' directories are causing the program to give incorrect results - counting duplicate pas files or something.

I ran it against my git mirror of Lazarus (which contains no .svn directories) and is up to date with latest SubVersion revision.

----------------------
Total Physical Source Lines of Code (SLOC) = 964,104 Development Effort Estimate, Person-Years (Person-Months) = 271.87 (3,262.43)
(Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05)) Schedule Estimate, Years (Months) = 4.51 (54.09) (Basic COCOMO model, Months = 2.5 * (person-months**0.38)) Estimated Average Number of Developers (Effort/Schedule) = 60.32 Total Estimated Cost to Develop = $ 36,725,837 ----------------------

Still not bad! Almost a million lines of code. :) You guys deserve a pat on the back.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Alexsander Rosa: Have you tried command-line utility SLOC Count? http://www.dwheeler.com/sloccount/…
Alexsander Rosa wrote
Have you tried command-line utility SLOC Count? http://www.dwheeler.com/sloccount/

Wow! Stats for Free Pascal Compiler 2.4.0-rc1 project. That's a lot of lines of code.

-------------------------------
Total Physical Source Lines of Code (SLOC) = 1,776,887 Development Effort Estimate, Person-Years (Person-Months) = 516.62 (6,199.46)
(Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05)) Schedule Estimate, Years (Months) = 5.75 (69.03) (Basic COCOMO model, Months = 2.5 * (person-months**0.38)) Estimated Average Number of Developers (Effort/Schedule) = 89.81 Total Estimated Cost to Develop = $ 69,788,590 -------------------------------

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://opensoft.homeip.net/fpgui/

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys
Graeme Geldenhuys wrote 19 lines
Alexsander Rosa wrote: > Have you tried command-line utility SLOC Count? > http://www.dwheeler.com/sloccount/ > Wow! Stats for Free Pascal Compiler 2.4.0-rc1 project. That's a lot of lines of code. ------------------------------- Total Physical Source Lines of Code (SLOC) = 1,776,887 Development Effort Estimate, Person-Years (Person-Months) = 516.62 (6,199.46) (Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05)) Schedule Estimate, Years (Months) = 5.75 (69.03) (Basic COCOMO model, Months = 2.5 * (person-months**0.38)) Estimated Average Number of Developers (Effort/Schedule) = 89.81 Total Estimated Cost to Develop = $ 69,788,590 -------------------------------

Oh, well, I'll settle for 1 % of this :)

Michael.

Reply by email

Mattias Gärtner
to Graeme Geldenhuys: I think your hidden '.svn' directories are causing the program to give incorrect results…

Zitat von Graeme Geldenhuys :

Show quoted text 6 lines
Mattias G?rtner wrote: > > Lazarus in total is worth 45mio dollar and requires 68 developers. I think your hidden '.svn' directories are causing the program to give incorrect results - counting duplicate pas files or something.

No. It's clever enough to skip them.
But my dir contains a lot of auto created fpdoc xml files and some more junk from endless experiments.
OTOH it did not count the lfm files - 90kloc.

Show quoted text 16 lines
I ran it against my git mirror of Lazarus (which contains no .svn directories) and is up to date with latest SubVersion revision. ---------------------- Total Physical Source Lines of Code (SLOC) = 964,104 Development Effort Estimate, Person-Years (Person-Months) = 271.87 (3,262.43) (Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05)) Schedule Estimate, Years (Months) = 4.51 (54.09) (Basic COCOMO model, Months = 2.5 * (person-months**0.38)) Estimated Average Number of Developers (Effort/Schedule) = 60.32 Total Estimated Cost to Develop = $ 36,725,837 ---------------------- Still not bad! Almost a million lines of code. :) You guys deserve a pat on the back.

And here are the results for the mighty Free Pascal compiler:

Total Physical Source Lines of Code (SLOC) = 198,187 Development Effort Estimate, Person-Years (Person-Months) = 51.64 (619.64) (Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05)) Schedule Estimate, Years (Months) = 2.40 (28.77) (Basic COCOMO model, Months = 2.5 * (person-months**0.38)) Estimated Average Number of Developers (Effort/Schedule) = 21.54 Total Estimated Cost to Develop = $ 6,975,423 (average salary = $56,286/year, overhead = 2.40).

And here the results for fpc (excluding install):

Total Physical Source Lines of Code (SLOC) = 1,789,257 Development Effort Estimate, Person-Years (Person-Months) = 520.40 (6,244.79) (Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05)) Schedule Estimate, Years (Months) = 5.77 (69.22) (Basic COCOMO model, Months = 2.5 * (person-months**0.38)) Estimated Average Number of Developers (Effort/Schedule) = 90.22 Total Estimated Cost to Develop = $ 70,298,812 (average salary = $56,286/year, overhead = 2.40).

Mattias

Reply by email

Reimar Grabowski
to Mattias Gärtner

On Tue, 17 Nov 2009 15:35:06 +0100
Mattias G?rtner wrote:

Yeah, great tool, all have so much fun.
Here are the missing results for 'Hello World':

Total Physical Source Lines of Code (SLOC) = 4 Development Effort Estimate, Person-Years (Person-Months) = 0.00 (0.01) (Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05)) Schedule Estimate, Years (Months) = 0.03 (0.39) (Basic COCOMO model, Months = 2.5 * (person-months**0.38)) Estimated Average Number of Developers (Effort/Schedule) = 0.02 Total Estimated Cost to Develop = $ 82 (average salary = $56,286/year, overhead = 2.40).

Are we finally done with this tool?

R.

A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail?

Reply by email

Henry Vermaak
to Reimar Grabowski

2009/11/17 Reimar Grabowski :

Show quoted text 13 lines
On Tue, 17 Nov 2009 15:35:06 +0100 Mattias G?rtner wrote: Yeah, great tool, all have so much fun. Here are the missing results for 'Hello World': Total Physical Source Lines of Code (SLOC) ? ? ? ? ? ? ? ?= 4 Development Effort Estimate, Person-Years (Person-Months) = 0.00 (0.01) ?(Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05)) Schedule Estimate, Years (Months) ? ? ? ? ? ? ? ? ? ? ? ? = 0.03 (0.39) ?(Basic COCOMO model, Months = 2.5 * (person-months**0.38)) Estimated Average Number of Developers (Effort/Schedule) ?= 0.02 Total Estimated Cost to Develop ? ? ? ? ? ? ? ? ? ? ? ? ? = $ 82

I'm in the wrong line of work :( I need to be writing hello world apps for a living.

Henry

Reply by email

Thierry Coq
to Graeme Geldenhuys: Can Lazarus IDE report on a Project or Package any statistics? eg: % code lines, %…

Hello,

Have you tried Pascal Analyzer from Peganza here : http://www.peganza.com/#PAL?

Best regards,
Thierry

Graeme Geldenhuys wrote 11 lines
Can Lazarus IDE report on a Project or Package any statistics? eg: % code lines, % comment lines, total no of lines of code, number of units etc..? If not, anybody know of such a tool I can use on Object Pascal code? Regards, - Graeme -

Reply by email