microsoft / SEAL
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,606 units with 23,540 lines of code in units (67.3% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (528 lines of code)
    • 42 medium complex units (2,727 lines of code)
    • 160 simple units (5,430 lines of code)
    • 1,401 very simple units (14,855 lines of code)
0% | 2% | 11% | 23% | 63%
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
cpp0% | 2% | 15% | 24% | 57%
h0% | 2% | 8% | 29% | 59%
c0% | 0% | 16% | 19% | 63%
cs0% | 0% | 0% | 4% | 95%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
native/src/seal0% | 8% | 12% | 28% | 50%
native/src/seal/util0% | 0% | 21% | 36% | 42%
dotnet/src0% | 0% | 0% | 4% | 95%
native/bench0% | 0% | 0% | 14% | 85%
native/src/seal/c0% | 0% | 0% | <1% | 99%
dotnet/src/tools0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
202 31 1
void encode_internal()
in native/src/seal/ckks.h
146 27 6
void Evaluator::switch_key_inplace()
in native/src/seal/evaluator.cpp
180 27 5
bool is_prime()
in native/src/seal/util/numth.cpp
89 23 2
void divide_uint_inplace()
in native/src/seal/util/uintarith.cpp
86 21 5
bool try_invert_uint_mod()
in native/src/seal/util/uintarithmod.cpp
137 20 5
void CKKSEncoder::encode_internal()
in native/src/seal/ckks.cpp
113 18 5
void decode_internal()
in native/src/seal/ckks.h
83 18 3
void RNSTool::initialize()
in native/src/seal/util/rns.cpp
134 18 3
void multiply_uint()
in native/src/seal/util/uintarith.cpp
73 18 6
uint64_t dot_product_mod()
in native/src/seal/util/uintarithsmallmod.cpp
64 18 4
void Evaluator::add_plain_inplace()
in native/src/seal/evaluator.cpp
63 17 2
void Evaluator::sub_plain_inplace()
in native/src/seal/evaluator.cpp
63 17 2
int zlib_deflate_array_inplace()
in native/src/seal/util/ztools.cpp
109 17 2
int main()
in native/src/seal/util/blake2xb.c
56 14 1
void transform_from_rev()
in native/src/seal/util/dwthandler.h
140 14 4
void encrypt_zero_symmetric()
in native/src/seal/util/rlwe.cpp
82 14 6
int main()
in native/src/seal/util/blake2b.c
52 13 1
SEAL_NODISCARD inline constexpr T mul_safe()
in native/src/seal/util/common.h
37 13 2
void divide_uint192_inplace()
in native/src/seal/util/uintarith.cpp
80 13 3