microsoft / FASTER
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,182 units with 29,754 lines of code in units (70.7% of code).
    • 1 very complex units (168 lines of code)
    • 10 complex units (1,623 lines of code)
    • 77 medium complex units (5,518 lines of code)
    • 160 simple units (5,596 lines of code)
    • 1,934 very simple units (16,849 lines of code)
<1% | 5% | 18% | 18% | 56%
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
h3% | 7% | 9% | 19% | 60%
cs0% | 5% | 20% | 18% | 55%
cc0% | 0% | 12% | 20% | 66%
js0% | 0% | 30% | 12% | 57%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
cc/src/core4% | 9% | 11% | 21% | 53%
cs/remote/src0% | 17% | 16% | 13% | 52%
cs/src/core0% | 3% | 18% | 18% | 59%
cs/benchmark0% | 0% | 42% | 31% | 26%
cs/playground/AsyncStress0% | 0% | 35% | 6% | 57%
cs/remote/benchmark0% | 0% | 32% | 22% | 44%
cs/playground/ClassRecoveryDurability0% | 0% | 52% | 0% | 48%
cs/playground/SumStore0% | 0% | 29% | 17% | 53%
cs/playground/FasterLogMLSDTest0% | 0% | 86% | 0% | 13%
cc/benchmark-dir0% | 0% | 19% | 38% | 42%
cs/src/devices0% | 0% | 8% | 36% | 55%
cc/playground/sum_store-dir0% | 0% | 58% | 0% | 41%
cc/src/device0% | 0% | 0% | 14% | 85%
cc/src/environment0% | 0% | 0% | 9% | 90%
cs/playground/CacheStoreConcurrent0% | 0% | 0% | 23% | 76%
cc/src/common0% | 0% | 0% | 0% | 100%
cs/playground/TstRunner0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
168 52 0
private unsafe bool ProcessBatch()
in cs/remote/src/FASTER.server/WebsocketServerSession.cs
279 49 2
161 43 2
private static bool GlobMatching()
in cs/remote/src/FASTER.server/PubSub/SpanByteKeySerializer.cs
141 39 5
internal void ProcessReplies()
in cs/remote/src/FASTER.client/ClientSession.cs
230 38 2
internal OperationStatus InternalRead()
in cs/src/core/Index/FASTER/FASTERImpl.cs
168 36 9
130 32 1
internal OperationStatus InternalRMW()
in cs/src/core/Index/FASTER/FASTERImpl.cs
160 32 8
internal OperationStatus InternalDelete()
in cs/src/core/Index/FASTER/FASTERImpl.cs
206 30 6
inline SystemState GetNextState()
in cc/src/core/state_transitions.h
87 29 0
private static void UpdateVarLen()
in cs/src/core/Index/FASTER/FASTER.cs
61 27 1
private static async Task ProfileStore()
in cs/playground/AsyncStress/Program.cs
142 25 3
private void WriteAsync()
in cs/src/core/Allocator/GenericAllocator.cs
142 25 9
101 24 1
private unsafe void LoadDataFromFile()
in cs/benchmark/TestLoader.cs
124 24 5
private void ThreadStateMachineStep()
in cs/src/core/Index/Synchronization/FasterStateMachine.cs
103 24 4
private unsafe void ProcessBatch()
in cs/remote/src/FASTER.server/BinaryServerSession.cs
89 22 2
internal OperationStatus InternalUpsert()
in cs/src/core/Index/FASTER/FASTERImpl.cs
115 22 7
private void SplitChunk()
in cs/src/core/Index/FASTER/FASTERImpl.cs
116 21 4
91 20 1