Cyclomatic complexity became the first objective measurement for evaluating the quality of software. Since the development of the cyclomatic complexity metric, other metrics have been developed to provide objective measures of software complexity and quality. In addition, you can use these metrics to measure project progress and to manage and control project timeliness. Cyclomatic complexity measures the amount of decision logic in a single software module. It is used during all phases of the software lifecycle, beginning with design, to keep software reliable, testable, and manageable.
Cyclomatic complexity is based entirely on the structure of software's control flowgraph.
Control flowgraphs describe the logic structure of software modules. Each possible execution path of a software module has a corresponding path from the entry to the exit node of the module's control flowgraph. More importantly, it also gives the number of independent paths through strongly connected, directed graphs. In a strongly connected graph each node can be reached from any other node by following directed edges in the graph. Cyclomatic complexity can be characterized as the number of elements of a basis set of control flow paths through the module.