microsoft / Mobius
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,032 units with 20,059 lines of code in units (66.7% of code).
    • 0 very complex units (0 lines of code)
    • 4 complex units (179 lines of code)
    • 21 medium complex units (1,058 lines of code)
    • 61 simple units (2,120 lines of code)
    • 1,946 very simple units (16,702 lines of code)
0% | <1% | 5% | 10% | 83%
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
cs0% | <1% | 2% | 8% | 88%
scala0% | 1% | 21% | 19% | 57%
cpp0% | 0% | 0% | 52% | 47%
py0% | 0% | 0% | 22% | 77%
h0% | 0% | 0% | 0% | 100%
java0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
csharp/AdapterTest0% | 2% | 2% | 2% | 93%
scala/src0% | 1% | 22% | 20% | 55%
csharp/Adapter0% | 0% | 3% | 8% | 87%
csharp/Worker0% | 0% | 11% | 31% | 56%
cpp/Riosock0% | 0% | 0% | 49% | 50%
csharp/Repl0% | 0% | 0% | 33% | 66%
csharp/WorkerTest0% | 0% | 0% | 11% | 88%
python/perf0% | 0% | 0% | 22% | 77%
csharp/Utils0% | 0% | 0% | 0% | 100%
scala/perf0% | 0% | 0% | 0% | 100%
csharp/Perf0% | 0% | 0% | 0% | 100%
csharp/ReplTest0% | 0% | 0% | 0% | 100%
csharp/Tests.Common0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public void TestDStreamJoin()
in csharp/AdapterTest/DStreamTest.cs
89 47 0
def loadTextFile()
in scala/src/main/org/apache/spark/sql/api/csharp/SQLUtils.scala
45 32 4
public void TestPairRddGroupWith()
in csharp/AdapterTest/PairRDDTest.cs
21 31 0
public void TestPairRddGroupWith2()
in csharp/AdapterTest/PairRDDTest.cs
24 31 0
private def concatCmdOptions()
in scala/src/main/org/apache/spark/launcher/SparkCLRSubmitArguments.scala
39 24 0
def writeObject()
in scala/src/main/org/apache/spark/api/csharp/SerDe.scala
67 21 2
private IEnumerable GetIterator()
in csharp/Worker/Microsoft.Spark.CSharp/UDFCommand.cs
100 17 3
override protected def handle()
in scala/src/main/org/apache/spark/launcher/SparkCLRSubmitArguments.scala
45 17 2
protected def parse()
in scala/src/main/org/apache/spark/launcher/SparkCLRSubmitArguments.scala
46 16 1
private def unzip()
in scala/src/main/org/apache/spark/api/csharp/CSharpRDD.scala
57 15 1
def getSQLDataType()
in scala/src/main/org/apache/spark/sql/api/csharp/SQLUtils.scala
18 15 1
def handleMethodCall()
in scala/src/main/org/apache/spark/api/csharp/CSharpBackendHandler.scala
75 14 6
def matchMethod()
in scala/src/main/org/apache/spark/api/csharp/CSharpBackendHandler.scala
30 14 3
def readTypedObject()
in scala/src/main/org/apache/spark/api/csharp/SerDe.scala
19 14 2
private object ReadCollection()
in csharp/Adapter/Microsoft.Spark.CSharp/Interop/Ipc/JvmBridge.cs
64 13 1
public void TestDStreamTransform()
in csharp/AdapterTest/DStreamTest.cs
42 13 0
public void TestDStreamUpdateStateByKey()
in csharp/AdapterTest/DStreamTest.cs
44 13 0
internal static object ReadTypedObject()
in csharp/AdapterTest/PayloadHelperTest.cs
32 13 2
def handleBackendRequest()
in scala/src/main/org/apache/spark/api/csharp/CSharpBackendHandler.scala
63 13 1
public override int Read()
in csharp/Adapter/Microsoft.Spark.CSharp/Network/SocketStream.cs
38 12 3