firebase / boringSSL-SwiftPM
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 5,482 units with 140,994 lines of code in units (29.4% of code).
    • 21 very complex units (11,050 lines of code)
    • 98 complex units (10,906 lines of code)
    • 428 medium complex units (24,055 lines of code)
    • 741 simple units (26,766 lines of code)
    • 4,194 very simple units (68,217 lines of code)
7% | 7% | 17% | 18% | 48%
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
go46% | 9% | 16% | 12% | 14%
c3% | 9% | 22% | 20% | 44%
cc4% | 14% | 24% | 25% | 30%
pl<1% | <1% | 6% | 20% | 71%
py0% | 0% | 5% | 33% | 60%
h0% | 0% | 0% | <1% | 99%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src7% | 7% | 17% | 18% | 48%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in src/util/fipstools/delocate/delocate.peg.go
6001 757 1
func()
in src/util/fipstools/acvp/acvptool/parser.peg.go
1036 134 1
bool SSL_apply_handback()
in src/ssl/handoff.cc
247 98 2
199 88 3
func main()
in src/util/fipstools/acvp/acvptool/acvp.go
319 76 0
UniquePtr SSL_SESSION_parse()
in src/ssl/ssl_asn1.cc
221 76 3
bool SSL_serialize_handback()
in src/ssl/handoff.cc
147 72 2
sub re()
in src/crypto/perlasm/x86_64-xlate.pl
213 70 0
const STACK_OF()
in src/crypto/pkcs8/pkcs8_x509.c
150 69 1
func()
in src/util/fipstools/delocate/delocate.go
255 64 1
int DSA_generate_parameters_ex()
in src/crypto/dsa/dsa.c
197 62 7
static int asn1_item_ex_d2i()
in src/crypto/asn1/tasn_dec.c
219 61 9
int X509_verify_cert()
in src/crypto/x509/x509_vfy.c
226 59 1
int boringssl_fips_self_test()
in src/crypto/fipsmodule/self_check/self_check.c
503 58 2
int BN_mod_exp_mont_consttime()
in src/crypto/fipsmodule/bn/exponentiation.c
236 57 6
int X509_print_ex()
in src/crypto/x509/t_x509.c
139 56 4
bool tls13_add_certificate()
in src/ssl/tls13_both.cc
145 55 1
int x509v3_cache_extensions()
in src/crypto/x509v3/v3_purp.c
160 53 1
152 52 4
bool Speed()
in src/tool/speed.cc
111 51 1