awslabs / amazon-kinesis-agent
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 1,261 units with 11,583 lines of code in units (72.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 13 medium complex units (601 lines of code)
    • 38 simple units (956 lines of code)
    • 1,210 very simple units (10,026 lines of code)
0% | 0% | 5% | 8% | 86%
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
java0% | 0% | 5% | 8% | 86%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/com/amazon/kinesis/streaming/agent/tailing0% | 0% | 13% | 14% | 72%
src/com/amazon/kinesis/streaming/agent0% | 0% | 14% | 16% | 69%
tst/com/amazon/kinesis/streaming/agent/tailing0% | 0% | 1% | 1% | 97%
src/com/amazon/kinesis/streaming/agent/config0% | 0% | 5% | 9% | 85%
src/com/amazon/kinesis/streaming/agent/metrics0% | 0% | 0% | 22% | 77%
src/com/amazon/kinesis/streaming/agent/processing0% | 0% | 0% | 16% | 83%
tst/com/amazon/kinesis/streaming/agent/testing0% | 0% | 0% | 10% | 89%
src/com/amazon/kinesis/streaming/agent/providers0% | 0% | 0% | 29% | 70%
tst/com/amazon/kinesis/streaming/agent0% | 0% | 0% | 0% | 100%
tst/com/amazon/kinesis/streaming/agent/metrics0% | 0% | 0% | 0% | 100%
tst/com/amazon/kinesis/streaming/agent/config0% | 0% | 0% | 0% | 100%
tst/com/amazon/kinesis/streaming/agent/processing0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public boolean checkNoRotation()
in src/com/amazon/kinesis/streaming/agent/tailing/TrackedFileRotationAnalyzer.java
35 19 0
protected synchronized boolean updateRecordParser()
in src/com/amazon/kinesis/streaming/agent/tailing/FileTailer.java
40 16 1
protected BufferSendResult attemptSend()
in src/com/amazon/kinesis/streaming/agent/tailing/FirehoseSender.java
95 14 1
protected BufferSendResult attemptSend()
in src/com/amazon/kinesis/streaming/agent/tailing/KinesisSender.java
96 14 1
public Boolean apply()
in src/com/amazon/kinesis/streaming/agent/config/BooleanConverter.java
23 13 1
protected void updateSnapshot()
in src/com/amazon/kinesis/streaming/agent/tailing/SourceFileTracker.java
17 12 2
protected synchronized BufferSendResult attemptSend()
in tst/com/amazon/kinesis/streaming/agent/tailing/testing/FileSender.java
58 12 1
protected void shutDown()
in src/com/amazon/kinesis/streaming/agent/Agent.java
70 11 0
private void emitStatus()
in src/com/amazon/kinesis/streaming/agent/Agent.java
37 11 0
public int findCurrentOpenFileAfterTruncate()
in src/com/amazon/kinesis/streaming/agent/tailing/TrackedFileRotationAnalyzer.java
35 11 0
private boolean setCurrentFile()
in src/com/amazon/kinesis/streaming/agent/tailing/AbstractParser.java
33 11 2
public boolean waitNotEmpty()
in src/com/amazon/kinesis/streaming/agent/tailing/PublishingQueue.java
28 11 0
private boolean queueCurrentBuffer()
in src/com/amazon/kinesis/streaming/agent/tailing/PublishingQueue.java
34 11 1
public Map getIncomingAnomalies()
in src/com/amazon/kinesis/streaming/agent/tailing/TrackedFileRotationAnalyzer.java
32 10 0
boolean updateCurrentFile()
in src/com/amazon/kinesis/streaming/agent/tailing/SourceFileTracker.java
41 10 1
protected boolean isRetriableSendException()
in src/com/amazon/kinesis/streaming/agent/tailing/SimplePublisher.java
11 10 1
public void runOnce()
in src/com/amazon/kinesis/streaming/agent/metrics/CWPublisherRunnable.java
36 10 0
private int advanceBufferToNextPattern()
in src/com/amazon/kinesis/streaming/agent/tailing/RegexSplitter.java
25 9 1
private void emitStatus()
in src/com/amazon/kinesis/streaming/agent/tailing/FileTailer.java
37 9 0
public static void main()
in src/com/amazon/kinesis/streaming/agent/Agent.java
54 8 1