microsoft / checkedc-lnt
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 915 units with 12,087 lines of code in units (68.2% of code).
    • 2 very complex units (742 lines of code)
    • 5 complex units (562 lines of code)
    • 37 medium complex units (2,023 lines of code)
    • 79 simple units (2,464 lines of code)
    • 792 very simple units (6,296 lines of code)
6% | 4% | 16% | 20% | 52%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
py10% | 6% | 19% | 21% | 42%
js0% | 1% | 11% | 18% | 68%
cpp0% | 0% | 27% | 31% | 40%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lnt/server/db25% | 0% | 25% | 6% | 43%
lnt/server/ui5% | 3% | 13% | 19% | 58%
lnt/server/reporting0% | 22% | 35% | 10% | 30%
lnt/util0% | 18% | 7% | 31% | 41%
lnt/lnttool0% | 0% | 24% | 46% | 29%
lnt/testing/profile0% | 0% | 10% | 14% | 75%
lnt/testing/util0% | 0% | 17% | 47% | 35%
lnt/server0% | 0% | 0% | 33% | 66%
lnt/formats0% | 0% | 0% | 62% | 37%
lnt/testing0% | 0% | 0% | 10% | 89%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def v4_graph()
in lnt/server/ui/views.py
343 100 0
def __init__()
in lnt/server/db/testsuitedb.py
399 60 4
def _build_data_table()
in lnt/server/reporting/summaryreport.py
102 38 1
def v4_matrix()
in lnt/server/ui/views.py
170 35 0
def print_report_result()
in lnt/util/ImportData.py
95 30 4
function str()
in lnt/server/ui/static/json2.js
68 29 2
def build()
in lnt/server/reporting/dailyreport.py
127 26 1
def regenerate_fieldchanges_for_run()
in lnt/server/db/fieldchange.py
65 24 2
def update_testsuite()
in lnt/server/db/migrations/upgrade_1_to_2.py
83 24 3
def build()
in lnt/server/reporting/summaryreport.py
42 23 1
def v4_regression_list()
in lnt/server/ui/regression_views.py
81 22 0
def get_value_status()
in lnt/server/reporting/analysis.py
37 21 4
def _build_indexed_data_table()
in lnt/server/reporting/summaryreport.py
57 21 1
contextPrototype.stroke = function()
in lnt/server/ui/static/flot/excanvas.js
77 21 1
def fromfile()
in lnt/testing/util/valgrind.py
57 21 2
Graph2D_Axis.prototype.draw = function()
in lnt/server/ui/static/View2D.js
123 20 5
contextPrototype.drawText_ = function()
in lnt/server/ui/static/flot/excanvas.js
75 18 5
def action_updatedb()
in lnt/lnttool/updatedb.py
69 17 2
makeSortable: function()
in lnt/server/ui/static/sorttable.js
49 17 2
def _load_migrations()
in lnt/server/db/migrate.py
37 16 0