[codeface] Re: Is it possible to extract the deleted lines per artifact?

  • From: Wolfgang Mauerer <wolfgang.mauerer@xxxxxxxxxxxxxxxxx>
  • To: <codeface@xxxxxxxxxxxxx>
  • Date: Fri, 23 Jun 2017 14:30:55 +0200

Hi Thomas,

Am 23/06/2017 um 13:51 schrieb Thomas Bock:

Dear everyone,
Hi Wolfgang, Hi Mitchell,

In some of our analyses, we are interested in the number of added and
also in the number of deleted lines per artifact (file, feature, function).

Currently, there is a "size" column in the commit-dependency table of
Codeface, which represents the number of added lines per changed
artifact (within a commit). As far as I know, this is extracted from the
git blame.

However, we cannot extract the number of deleted lines per changed
artifact (within a commit), as git blame does not show deleted lines.

Does anyone have an idea how to extract the deleted lines per artifact?

this is unfortunately not possible with the current state of the
schema. However, in my for-upstream queue, there are some changes
(see dcab014eae6 and some of the following commits) that partially
implement your desired functionality. Currently, we store how the
size of each file changes with each commit that acts on the file, and
also captures the number of added and deleted lines for each
file and commit on the file.

The implementation is (for historical reasons) a bit ugly ATM
because it does not store the results in the DB, but uses temporary CSV
files. As I also said in response to Claus' mail, I'm currently working
on integrating these data into the DB.

Computing the information at function granularity would also be
possible without too much effort, but requires some extensions (ideally
during proximity analysis; this would save the extra git log run
that the current implementation uses). Feature support should work
similar.

Long story short: If you just want deleted lines per file, you can
use branch for-upstream and the data in
<resdir>/<project>/conway/<range>/file_metrics.csv (in two hours or so,
the fixup commits will be gone from the branch; beware that the branch
is rebased frequently). For functions and features, we should discuss
how to add this best to the data model. Especially for features, I
would appreciate some help with the implementation because Passau knows
more about the feature code than I do.

Best regards, Wolfgang


Thank you in advance!

Best,
Thomas



Other related posts: