Ticket #261 (new enhancement)

Opened 7 years ago

Last modified 1 year ago

Add lines of code statistics

Reported by: no_spam_f at smega dot com Assigned to: anybody
Priority: highest Component: Request-a-Hack
Severity: normal Keywords:
Cc: lievenswouter@gmail.com, fcorreia@gmail.com, aidinabedi@gmail.com Trac Release: 0.11

Description

Show lines of code (LOC) for components and plot their change over time, maybe including LOC for changesets grouped by commiting user.

Attachments

Change History

06/27/06 11:28:44 changed by anonymous

  • release set to 0.8.
  • cc set to lievenswouter@gmail.com.

04/30/07 15:08:36 changed by anonymous

I need this hack. Thanks.

(follow-up: ↓ 4 ) 07/13/07 23:40:28 changed by khundeen

Plan to work on this if more people want it.

(in reply to: ↑ 3 ) 07/24/07 06:40:25 changed by anonymous

Replying to khundeen:

Plan to work on this if more people want it.

Trac definately needs this. :)

08/17/07 10:34:49 changed by tedbundyjr

+ vote. will be usefull for all the dev. team member to evaluate their performance. :)

08/28/07 17:03:15 changed by johnzhang

  • release changed from 0.8 to 0.11.

a must-have feature for trac

12/27/07 23:16:46 changed by anonymous

+1

A must-have feature also. But must also work with other VCS systems not just SubVersion?! --JamesMills

03/10/08 12:24:14 changed by anonymous

That would be a really great addition to Trac.

03/10/08 12:28:43 changed by anonymous

I see this feature like this: When you "browse source" in trac there's an additional button "LOC stats" displayed next to the directory or file.

  • If you press it next to the file, you'll see a plot of LOC over time for that file.
  • If you press it next to some directory, you'll see a plot of LOC over time for the whole directory (sum of LOC of all files).
  • It might be useful to jump there from the changeset entries in the timeline

04/18/08 01:17:10 changed by anonymous

me too :)

05/12/08 12:33:58 changed by anonymous

I vote for this

06/06/08 15:16:31 changed by anonymous

Needs it we do, yeees...

06/11/08 17:18:12 changed by Toby

Why does Lines of code == coder performance?

byte[] buffer;
buffer = byte[]{48, 65, 6C, 6C, 6F, 20, 57, 6F, 72, 6C, 64};
String s = new String(buffer);
OutputStream out = System.out;
out.print(s);
out.print("\n");

vs

System.out.println("Hello World");

Top version = 6x as performing than the bottom one, and thats not even with comments.

08/23/08 20:11:59 changed by anonymous

  • cc changed from lievenswouter@gmail.com to lievenswouter@gmail.com, fcorreia@gmail.com.

01/02/09 01:54:36 changed by anonymous

would also love this

01/09/09 19:15:28 changed by anonymous

LOC alone is a pretty useless stat. I wouldn't mind some "code statistics" not just LOC, but %Lines comments, largest file. file with largest "scoped object" i.e. function, method, whatever your language offers. complexity...all that.

anyway, if my idea of the plugin is the idea, then the plugin should just read/display, and define a format for the data to adhere too, and let external tools, or other plugins (or sub parts) do the work. (i.e., I don't want the # of classes in Java crap, it has bazillions, and my c code has none.).

Well, that's my take, maybe it's a different plugin.

02/09/09 16:55:20 changed by anonymous

+1

I agree that LOC in no very meaningful, but at least it gives some insight if a developer changed 1 or 100 lines of code over a certain time period.

05/04/09 13:55:24 changed by anonymous

LOC stats would be very very useful. All coders should know how efficient code they write so the "Hello World" example above is pretty irrelevant. Even if you're a team leader you should have guidelines and control over your team. And if not you would be able to monitor the lines of code are written by each member of your team over time, so would be able to pick up on coders with LOC above the average (either they work too hard (yeah right) or they write inefficient code).

When can we have this hack then? :)

07/21/09 23:21:25 changed by anonymous

Have a look at statSVN, this does most of this already, but it would be good to have it integrated into trac.

I would be careful with LOC metrics as a productiviy measure, as others have highlighted. I would also suggest that for simplicity a simple physical lines of code count is done (i.e. none comment, none blank lines) as that can be made to work for a large number of languages. More detailed lines of code, such as a logical LOC are difficult to develop and are language specific. My company has Ada, Java, C, C++, C.NET, ASP and assembler in use as a mimimum!

06/11/10 06:18:08 changed by aidinabedi@gmail.com

  • priority changed from normal to highest.
  • cc changed from lievenswouter@gmail.com, fcorreia@gmail.com to lievenswouter@gmail.com, fcorreia@gmail.com, aidinabedi@gmail.com.

I would give my left arm for this feature!

unfortunately statSVN needs a local checkout of the repository. If this can be achieved by the plugin a integration with statSVN would be perfect!

03/24/11 16:17:30 changed by yoheeb@gmail.com

LOC, generally, is a useless statistic as shown in the println example above. however, in macro view, and depending on the industry/application, it has some value. However, making use of some external stats tool is ideal, then if you find loc useful, great, have it. If you find complexity calculation useful, add it.

The key, that was lost a bit in the follow on comments, was having it organized/summed by Component, rather than just per file. Other associations might be useful also, like by severity, or Date range? This would require some kind of association between file and component, and a little discipline in coding standards to maintain that, and might requiring configuration/use of the external tools properly to make good use of it.

I like metrics, I find them useful when taken together. I need them to be configurable/adjustable to my needs however, so the external tool idea is the way to go, IMHO.

03/28/12 16:04:38 changed by anonymous

+1, nice feature


Add/Change #261 (Add lines of code statistics)




Change Properties
Action