Game Development Community

Some Stats

by Kyle Carter · in Torque Game Engine · 07/17/2003 (3:01 pm) · 9 replies

I ran a code-counting program over the copy of Torque we're documenting... here's where things stand:

580205 201050?"* total lines/statements

111935	lines had comments        19.3 %
 30649	comments are inline       -5.3 %
105147	lines were blank          18.1 %
 52588	lines for preprocessor     9.1 %
341184	lines containing code     58.8 %
580205	total lines              100.0 %

2449217	comment-chars             12.6 %
1092085	nontext-comment-chars      5.6 %
4796051	whitespace-chars          24.7 %
1659318	preprocessor-chars         8.5 %
9412051	statement-chars           48.5 %
19408722	total characters         100.0 %

1287241	tokens, average length 7.11

  0.22	ratio of comment:code
   655	?:illegal characters found
     2	":lines with unterminated quotes
    23	*:unterminated/nested comments
   513	+:unterminated blocks
  7972	>:too-long identifiers

 23048	top-level blocks/statements
   258	maximum blocklevel
  4.23	ratio of blocklevel:code

3.5 megabytes of comments!

And over a million tokens. Pretty impressive, in my eyes :)

#1
07/18/2003 (2:07 am)
Interesting ben, is that a proprietry program you wrote to do that analysis?
#2
07/18/2003 (9:52 am)
No, actually, it's a little tool called c_count.

dickey.his.com/c_count/c_count.html
#3
07/18/2003 (5:07 pm)
Darn wish I had that program when I was trying to prove to my lecturers how much time I had spent on my crappy 2d engine. How dare they only give me a pass for endless nights of drinking coke, driving to school with no sleep and dozing off in class when it deserve a distinction. I'll show them, one day I will rub my games in their faces and say that's for putting crapping webpages and databases over the game industry.
#4
07/19/2003 (3:00 pm)
Oh, just for comparison, a version of Torque I have which is more similar to HEAD is about 15%... I think the real figure is probably 10-12%.

"Torque: Now with twice the comments!" :P
#5
07/19/2003 (3:26 pm)
Beautiful :-)

Nice work Ben (and the gang), I'm sure this is music to many people's ears!
#6
02/08/2004 (5:46 pm)
How about a comparison of how Torque looks today?
#7
02/08/2004 (6:58 pm)
It would look basically the same. We have not been working on comments in the code. We have been working on external set up, how to, tutorial documentation.

-Jeff Tunnell GG
#8
02/11/2004 (4:40 pm)
How about the complete reference of datablock, function, method, etc.?
#9
02/11/2004 (4:59 pm)
DumpConsoleClasses() and dumpConsoleFunctions() should get you what you need.