Ticket #261 (new enhancement)

Opened 4 years ago

Last modified 8 months ago

Add lines of code statistics

Reported by: no_spam_f at smega dot com Assigned to: anybody
Priority: normal Component: Request-a-Hack
Severity: normal Keywords:
Cc: lievenswouter@gmail.com, fcorreia@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

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

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!


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




Change Properties
Action