Code churn gives context on whether the code written was productive or not.
It is the code that is deleted/rewritten within 21 days of merging.
Code churn is 1 of 4 different types of productivity levels of code:
New Work: Code that is newly added and not replacing/rewriting existing code.
Refactor: Code that is modified after 21 days. This is usually an acceptable change needed for maintenance and is therefore separated out from code churn so as not to raise flags.
Churn: Code that is deleted/rewritten within 21 days of merging is called code churn or rework.
Helping Others: code that is replaced by engineers other than the author of the original code within 21 days of merging. This helps you measure to what extent developers are helping their teammates to improve code quality and delivery.
Code churn breakdown helps you-
Identify where the productive effort of an engineer or a team was spent (refactor vs churn vs misc)
Get an idea of the collaboration and cohesion within the team (using help others)