[closed] Calculate Lines of Code from RTC
![]()
Pavithra Kasturirangan (429●5●60●56)
| asked Sep 17 '12, 8:41 a.m.
closed Aug 22 '13, 12:25 p.m. by Millard Ellingsworth (2.5k●1●24●31)
Hi,
My requirement is to capture the Lines of Code and the number of lines added or removed from the source files in the stream for the tracking purpose. I understand that RTC does not offer any direct facility to do this. I would like to know how this is practiced in other companies. Any suggestions are much appreciated.
Regards,
Pavithra
showing 5 of 10
show 5 more comments
|
Comments
Hi Pavithra - at what point in the development cycle do you want to capture this info? I assume it is when you deliver to the stream - but wanted to check my assumption. Once you capture the info - how do you want to access this info later on? I would also be really interested in how you plan to use this info (if you are able to disclose this)
I want to do this once the code is delivered.Say, the source code that is considered for a regression build.
RTC works in terms of change sets - so it must be holding this information somewhere. The trick is to work out how to get at it - and how to make sure you can see it. Let me continue to look around and see if I can find this for you.
Perhaps someone else knows how to do this and can comment.
Hi Anthony,
I tried to compare my local changes with the stream.
You might want to try stack overflow for suggestions as this is beyond the scope of RTC.
http://stackoverflow.com/questions/104756/how-do-you-count-your-lines-of-code
That's one person that has asked the question before. It's ultimately up to you how you want to determine the diff to be a line add/del/mod. You've got the data but you need to process it.
RTC doesn't provide an out of the box mechanism to get this metric. Other tools do,
jenkins, team city and some of the code review tools.
Thank you, Tim
Just for interest's sake, what is your purpose for collecting information about the number of lines of code that were changed? It used to be collected primarily because it was an easy thing to measure, and not because it actually provides much value. In particular, it commonly was used to either measure productivity (which is a really bad idea) or code churn (which can be effectively approximated by "number of changes sets" ... the additional detail of "lines of code" does not usually add significant value).
Thank you, Tim. I had a look at the other options.