tucny Posted August 21, 2018 Report Share Posted August 21, 2018 In my team, I would like to introduce two metrics based on the volume of lines of code change. I need two reports: Developer leaderboard — see who did what amount of code changes in the past day / week / month, across all repos Project leaderboard — see how many new / changed lines of code we have across all branches in a particular repo You may think that measuring progress by the volume of lines of code is kind of stupid but in certain situations it's a useful metric. For example, we have a project which is basically a huge refactoring endeavor, where the volume of code refactored over time indicates the overall velocity of the team. To make the numbers realistic, I would need to omit certain types of changes, e.g.: branch merges changes to auto-generated code, i.e. files with a certain mask ("*.designer.cs" in my case) changes to binaries Is it possible to use Plastic's query system to collect data that would allow for computing such reports? At first sight, I'd need a list of changesets, list of files (filtered) per changeset, and statistics of changes on a per-file basis from the merge engine (i.e. number of lines added / changed / deleted). Link to comment Share on other sites More sharing options...
calbzam Posted August 28, 2018 Report Share Posted August 28, 2018 Hi, The best way to get reports is using the "cm find" command. We have a complete guide with some examples: https://www.plasticscm.com/documentation/cmfind/plastic-scm-version-control-query-system-guide.shtml I think you can get all the information, regarding new changesets "cm find changeset", merge links "cm find merge", new revisions "cm find revision"... But there is not a specific command to get a report regarding added/changed lines in the repo files. There are some GUI features where you can get this information: "Analyze differences", "Analyze refactor", but I'm afraid you cannot get this information via command line https://www.plasticscm.com/documentation/gui/plastic-scm-version-control-gui-guide.shtml#ColumnsintheItemsTable Regards, Carlos. Link to comment Share on other sites More sharing options...
tucny Posted August 28, 2018 Author Report Share Posted August 28, 2018 Carlos, "cm find" is what I looked at and agree that I can resolve half of the task with it. Is there any way to dump a changes set like a diff that I could postprocess, counting added, changed, deleted lines? Something like the "svn diff" command in Subversion, IIRC. Btw. I'm fine with using any .NET API. It would be easier to develop this in C# anyway. Ondrej Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.