facebookresearch / fbpcf
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 73 units with 565 lines of code in units (46.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (40 lines of code)
    • 0 simple units (0 lines of code)
    • 72 very simple units (525 lines of code)
0% | 0% | 7% | 0% | 92%
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% | 0% | 12% | 0% | 87%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
fbpcf/aws0% | 0% | 51% | 0% | 48%
fbpcf/io0% | 0% | 0% | 0% | 100%
fbpcf/mpc0% | 0% | 0% | 0% | 100%
example/millionaire0% | 0% | 0% | 0% | 100%
fbpcf/common0% | 0% | 0% | 0% | 100%
fbpcf/gcp0% | 0% | 0% | 0% | 100%
fbpcf/system0% | 0% | 0% | 0% | 100%
fbpcf/perf0% | 0% | 0% | 0% | 100%
fbpcf/exception0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
std::unique_ptr createS3Client()
in fbpcf/aws/S3Util.cpp
40 15 1
29 5 1
bool isDrngSupported()
in fbpcf/system/CpuUtil.cpp
15 5 0
34 5 1
std::string LocalFileManager::readBytes()
in fbpcf/io/LocalFileManager.cpp
30 4 3
int main()
in example/millionaire/main.cpp
20 3 2
bool isIntelCpu()
in fbpcf/system/CpuUtil.cpp
7 3 0
std::vector apply()
in fbpcf/common/VectorUtil.h
14 3 3
void QueueIO::recv_data_internal()
in fbpcf/mpc/QueueIO.cpp
8 3 2
std::pair test()
in fbpcf/mpc/EmpTestUtil.h
23 3 2
void wrapTestWithParty()
in fbpcf/mpc/EmpTestUtil.h
20 3 1
bool play()
in example/millionaire/MillionaireGame.h
12 2 1
9 2 1
std::string GCSFileManager::readBytes()
in fbpcf/io/GCSFileManager.h
14 2 3
void GCSFileManager::write()
in fbpcf/io/GCSFileManager.h
11 2 2
8 2 1
void LocalFileManager::write()
in fbpcf/io/LocalFileManager.cpp
11 2 2
FileType getFileType()
in fbpcf/io/FileManagerUtil.cpp
3 2 1
std::unique_ptr getFileManager()
in fbpcf/io/FileManagerUtil.cpp
11 2 1
explicit GCSInputStream()
in fbpcf/io/GCSInputStream.h
1 2 1