microsoft / botbuilder-python
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,168 units with 7,259 lines of code in units (25.9% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (72 lines of code)
    • 9 medium complex units (282 lines of code)
    • 40 simple units (774 lines of code)
    • 1,118 very simple units (6,131 lines of code)
0% | <1% | 3% | 10% | 84%
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
py0% | <1% | 3% | 10% | 84%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
libraries/botbuilder-ai0% | 10% | 5% | 15% | 67%
libraries/botframework-connector0% | 0% | 7% | 8% | 83%
libraries/botbuilder-dialogs0% | 0% | 4% | 20% | 75%
libraries/botbuilder-adapters-slack0% | 0% | 15% | 19% | 65%
libraries/botbuilder-core0% | 0% | 2% | 3% | 93%
libraries/botbuilder-applicationinsights0% | 0% | 3% | 11% | 85%
libraries/botbuilder-azure0% | 0% | 0% | 28% | 71%
libraries/botbuilder-schema0% | 0% | 0% | 3% | 96%
libraries/botframework-streaming0% | 0% | 0% | 2% | 97%
generators/app0% | 0% | 0% | 0% | 100%
libraries/botbuilder-integration-aiohttp0% | 0% | 0% | 0% | 100%
libraries/botbuilder-testing0% | 0% | 0% | 0% | 100%
libraries/botbuilder-integration-applicationinsights-aiohttp0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _map_properties()
in libraries/botbuilder-ai/botbuilder/ai/luis/luis_recognizer_v3.py
72 37 3
def activity_to_slack()
in libraries/botbuilder-adapters-slack/botbuilder/adapters/slack/slack_helper.py
37 15 1
def assign()
in libraries/botbuilder-dialogs/botbuilder/dialogs/object_path.py
35 15 4
def egg2dist()
in libraries/botframework-connector/azure_bdist_wheel.py
59 15 3
def extract_entity_value()
in libraries/botbuilder-ai/botbuilder/ai/luis/luis_util.py
39 13 1
def __call__()
in libraries/botbuilder-applicationinsights/botbuilder/applicationinsights/processor/telemetry_processor.py
25 13 3
def get_tag()
in libraries/botframework-connector/azure_bdist_wheel.py
29 13 1
def _update_attachment_streams()
in libraries/botbuilder-core/botbuilder/core/streaming/streaming_request_handler.py
26 11 2
def get_memory()
in libraries/botbuilder-dialogs/botbuilder/dialogs/memory/scopes/dialog_class_memory_scope.py
16 11 2
def get_memory()
in libraries/botbuilder-dialogs/botbuilder/dialogs/memory/scopes/dialog_memory_scope.py
16 11 2
def payload_to_activity()
in libraries/botbuilder-adapters-slack/botbuilder/adapters/slack/slack_helper.py
31 10 1
def process_view()
in libraries/botbuilder-applicationinsights/botbuilder/applicationinsights/django/middleware.py
27 10 5
def _hydrate_options()
in libraries/botbuilder-ai/botbuilder/ai/qna/utils/generate_answer_utils.py
25 9 2
def get_storage_key()
in libraries/botbuilder-core/botbuilder/core/private_conversation_state.py
18 9 2
def _track_change()
in libraries/botbuilder-dialogs/botbuilder/dialogs/memory/dialog_state_manager.py
32 9 3
def get_memory()
in libraries/botbuilder-dialogs/botbuilder/dialogs/memory/scopes/dialog_context_memory_scope.py
23 9 2
def set_path_value()
in libraries/botbuilder-dialogs/botbuilder/dialogs/object_path.py
25 9 3
def try_resolve_path()
in libraries/botbuilder-dialogs/botbuilder/dialogs/object_path.py
55 9 3
def is_skill_claim()
in libraries/botframework-connector/botframework/connector/auth/skill_validation.py
19 9 2
def extract_normalized_entity_name()
in libraries/botbuilder-ai/botbuilder/ai/luis/luis_util.py
17 8 1