How to evaluate the impact of change for a single line of code or a variable?

48 Views Asked by At

During unit testing it is possible to estimate the code coverage to see which share of the code base is covered by the tests.

For one part (the simple calculatable one) of a risk estimation we need to estimate the impact when a single line or a variable changes on the code base.

E.g. if a variable changes and a pointer to that variable is passed around or used in several places that would result in a rather "impactful" change.

The approach I am looking for is some mixture of introspection and code coverage, but I could not find anything useful so far.

Sure, small changes can completely break the code while large changes might not have an important impact. But this is only supposed to be one part of the impact analysis, the other one is done by a reviewer.

If such a software or approach does not exist, how is this handled in rather large projects? Is is useful at all or would you recommend a different approach?

1

There are 1 best solutions below

0
Suraj.Shau On

You can probably use console.time function to track the time of execution.