smontanari / code-forensics

A toolset for code analysis and report visualisation
383 stars 45 forks source link

system evolution cumulative churn #45

Closed jdevoo closed 4 years ago

jdevoo commented 4 years ago

I ran code-forensics against a repo of mine with a single Python script. I developed this over a few years with minor work every now and then. The profile over the years is shown below. Shouldn't cumulative churn keep increasing with the additions?

image

smontanari commented 4 years ago

Please ignore my previous comment (I'm going to delete it). You are 100% right, the cumulative lines represent the absolute number of lines changed (added or deleted) and it should always increase

smontanari commented 4 years ago

I've run the report and it seems fine to me. (I used a timeSplit value of 6m) sea-ss

smontanari commented 4 years ago

Moreover, while investigating the report logic, I discovered a potential issue caused by commit logs that don't carry file churn data (typically merge commits from other branches). In such case the system evolution report can present holes because it fails to aggregate metrics correctly. This could or could not happen depending on the fragmentation of the log files (influenced by the timeSplit parameter). I'll create quick patch to fix this behaviour

smontanari commented 4 years ago

I just released 2.3.1. See if it helps with your report

jdevoo commented 4 years ago

thank you very much!!! I also checked with 6m and 1m intervals