microsoft / mwt-ds
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 2,053 units with 30,887 lines of code in units (66.8% of code).
    • 4 very complex units (847 lines of code)
    • 22 complex units (2,758 lines of code)
    • 108 medium complex units (5,944 lines of code)
    • 206 simple units (5,806 lines of code)
    • 1,713 very simple units (15,532 lines of code)
2% | 8% | 19% | 18% | 50%
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
js3% | 11% | 22% | 22% | 40%
py7% | 5% | 28% | 7% | 50%
cs0% | 5% | 9% | 15% | 70%
ts0% | 0% | 12% | 33% | 54%
cpp0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
mc3% | 10% | 22% | 21% | 42%
DataScience9% | 7% | 32% | 6% | 44%
AzureDataLake0% | 45% | 0% | 5% | 48%
Experimentation0% | 14% | 19% | 22% | 43%
client0% | 1% | 5% | 14% | 78%
Crawl0% | 3% | 21% | 22% | 51%
ContextExplorer0% | 0% | 17% | 13% | 69%
hosted.js0% | 0% | 12% | 33% | 54%
ExperimentationConsole0% | 0% | 0% | 61% | 38%
JavascriptClient0% | 0% | 0% | 62% | 37%
HostedExamples0% | 0% | 0% | 6% | 93%
provisioning0% | 0% | 0% | 0% | 100%
ExperimentationTest0% | 0% | 0% | 0% | 100%
LogCookig0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def download_container()
in DataScience/LogDownloader.py
236 94 20
function sl__processRelativeTime()
in mc/Scripts/moment-with-locales.js
70 72 4
function chart()
in mc/Scripts/nv.d3.js
263 67 1
function chart()
in mc/Scripts/nv.d3.js
278 61 1
function chart()
in mc/Scripts/nv.d3.js
272 47 1
function is__translate()
in mc/Scripts/moment-with-locales.js
58 42 4
def create_stats()
in DataScience/dashboard_utils.py
79 41 6
function chart()
in mc/Scripts/nv.d3.js
223 41 1
function chart()
in mc/Scripts/nv.d3.js
146 40 1
function cs__translate()
in mc/Scripts/moment-with-locales.js
52 39 4
function sk__translate()
in mc/Scripts/moment-with-locales.js
52 39 4
function chart()
in mc/Scripts/nv.d3.js
237 38 1
protected static int NextToken()
in Crawl/VideoIndexer/Ooyala/JSON.cs
60 36 2
public override object ReadJson()
in client/ClientDecisionServiceTest/RawStringConverter.cs
80 35 4
function chart()
in mc/Scripts/nv.d3.js
196 35 1
function hu__translate()
in mc/Scripts/moment-with-locales.js
29 34 4
def main()
in DataScience/Experimentation.py
107 33 1
function chart()
in mc/Scripts/nv.d3.js
196 32 1
function chart()
in mc/Scripts/nv.d3.js
165 32 1
public IRow ParseEvent()
in AzureDataLake/DecisionServiceExtractor/CbParser.cs
129 30 2