tensorflow / tensorboard
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 4,442 units with 59,911 lines of code in units (48.6% of code).
    • 0 very complex units (0 lines of code)
    • 7 complex units (1,706 lines of code)
    • 94 medium complex units (5,844 lines of code)
    • 289 simple units (9,196 lines of code)
    • 4,052 very simple units (43,165 lines of code)
0% | 2% | 9% | 15% | 72%
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
ts0% | 3% | 9% | 14% | 72%
py0% | 1% | 12% | 18% | 68%
java0% | 0% | 9% | 41% | 49%
rs0% | 0% | 0% | 4% | 95%
js0% | 0% | 0% | 62% | 37%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tensorboard/plugins0% | 4% | 8% | 13% | 73%
tensorboard/components0% | 2% | 8% | 15% | 73%
tensorboard/backend0% | 7% | 8% | 28% | 55%
tensorboard/webapp0% | 0% | 13% | 17% | 68%
tensorboard0% | 0% | 21% | 21% | 57%
tensorboard/uploader0% | 0% | 13% | 14% | 72%
tensorboard/util0% | 0% | 37% | 11% | 50%
tensorboard/compat0% | 0% | 11% | 24% | 64%
tensorboard/data0% | 0% | 2% | 8% | 89%
tensorboard/tools0% | 0% | 8% | 44% | 46%
tensorboard/java0% | 0% | 9% | 41% | 49%
tensorboard/summary0% | 0% | 11% | 0% | 88%
tensorboard/scripts0% | 0% | 0% | 22% | 77%
tensorboard/defs0% | 0% | 0% | 40% | 60%
tensorboard/pip_package0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
export function addHealthPill()
in tensorboard/plugins/graph/tf_graph_common/scene.ts
172 34 8
class TfGraphControls extends LegacyElementMixin()
in tensorboard/plugins/graph/tf_graph_controls/tf-graph-controls.ts
1092 32 1
def _ProcessEvent()
in tensorboard/backend/event_processing/event_accumulator.py
87 29 2
export function getFillForNode()
in tensorboard/plugins/graph/tf_graph_common/node.ts
77 29 1
def _ProcessEvent()
in tensorboard/backend/event_processing/plugin_event_accumulator.py
85 27 2
private async renderValues()
in tensorboard/components/tensor_widget/tensor-widget-impl.ts
120 27 0
public move()
in tensorboard/components/tensor_widget/selection.ts
73 27 2
def make_ndarray()
in tensorboard/util/tensor_util.py
105 25 1
def run()
in tensorboard/plugins/hparams/download_data.py
83 25 1
export function pointToRectangleDist()
in tensorboard/plugins/hparams/tf_hparams_utils/tf-hparams-utils.ts
23 25 6
export function parseDebugTensorValue()
in tensorboard/plugins/debugger_v2/tf_debugger_v2_plugin/store/debug_tensor_value.ts
107 24 1
export function build()
in tensorboard/plugins/graph/tf_graph_common/graph.ts
195 23 3
function addNodes()
in tensorboard/plugins/graph/tf_graph_common/hierarchy.ts
89 22 2
_draw()
in tensorboard/plugins/hparams/tf_hparams_scatter_plot_matrix_plot/tf-hparams-scatter-plot-matrix-plot.ts
285 22 0
def make_tensor_proto()
in tensorboard/util/tensor_util.py
110 21 4
function extractPinnedCardsFromURLText()
in tensorboard/webapp/routes/dashboard_deeplink_provider.ts
63 21 1
function dagreLayout()
in tensorboard/plugins/graph/tf_graph_common/layout.ts
102 20 2
def fix_flags()
in tensorboard/plugins/core/core_plugin.py
46 20 2
def _augment_configs_with_checkpoint_info()
in tensorboard/plugins/projector/projector_plugin.py
57 20 1
ngAfterViewInit()
in tensorboard/webapp/widgets/line_chart_v2/sub_view/line_chart_interactive_view.ts
190 20 0