tensorflow / profiler
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 419 units with 5,930 lines of code in units (33.1% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (68 lines of code)
    • 30 medium complex units (1,442 lines of code)
    • 62 simple units (1,490 lines of code)
    • 326 very simple units (2,930 lines of code)
0% | 1% | 24% | 25% | 49%
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% | 1% | 26% | 27% | 44%
py0% | 0% | 16% | 17% | 65%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
frontend/app/components0% | 1% | 27% | 28% | 41%
plugin/tensorboard_plugin_profile0% | 0% | 35% | 12% | 51%
frontend/app/common0% | 0% | 29% | 11% | 59%
plugin/tensorboard_plugin_profile/convert0% | 0% | 7% | 21% | 70%
frontend/app/services0% | 0% | 0% | 25% | 74%
ROOT0% | 0% | 0% | 0% | 100%
plugin/trace_viewer/tf_trace_viewer0% | 0% | 0% | 0% | 100%
frontend/app0% | 0% | 0% | 0% | 100%
frontend/app/store0% | 0% | 0% | 0% | 100%
plugin/tensorboard_plugin_profile/static0% | 0% | 0% | 0% | 100%
plugin0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
setIdleOption()
in frontend/app/components/tensorflow_stats/tensorflow_stats.ts
68 30 1
memoryProfileSummary()
in frontend/app/components/memory_profile/memory_profile_summary/memory_profile_summary.ts
48 21 0
private findPeakMemoryUsage()
in frontend/app/components/memory_viewer/memory_usage/memory_usage.ts
99 19 2
function mergeSortTables()
in frontend/app/components/chart/table_utils.ts
79 19 7
def xspace_to_tool_data()
in plugin/tensorboard_plugin_profile/convert/raw_to_tool_data.py
59 19 4
enumerateColumns()
in frontend/app/components/kernel_stats/kernel_stats_table/kernel_stats_table.ts
56 18 0
drawTable()
in frontend/app/components/overview/top_ops_table/top_ops_table.ts
79 18 0
drawChart()
in frontend/app/components/memory_profile/memory_timeline_graph/memory_timeline_graph.ts
102 17 0
private createMaxHeapIndex()
in frontend/app/components/memory_viewer/memory_usage/memory_usage.ts
33 17 0
override parseData()
in frontend/app/components/chart/default_data_provider.ts
34 17 1
function consumeNumber()
in frontend/app/common/classes/sorting.ts
32 17 2
getMetadataTooltip()
in frontend/app/components/memory_profile/memory_timeline_graph/memory_timeline_graph.ts
45 15 1
showTooltip()
in frontend/app/components/pod_viewer/topology_graph/topology_graph.ts
52 15 1
def data_impl()
in plugin/tensorboard_plugin_profile/profile_plugin.py
54 15 2
set deviceAnalysis()
in frontend/app/components/input_pipeline/device_side_analysis_detail/device_side_analysis_detail.ts
19 14 1
override parseTips()
in frontend/app/components/overview/recommendation_result_view/recommendation_result_view.ts
55 14 0
export function compareTagNames()
in frontend/app/common/classes/sorting.ts
40 14 2
private initMemoryUsageFromPrecomputed()
in frontend/app/components/memory_viewer/memory_usage/memory_usage.ts
31 13 1
parseTpuData()
in frontend/app/components/overview/performance_summary/performance_summary.ts
40 13 0
parseGenericData()
in frontend/app/components/overview/performance_summary/performance_summary.ts
41 13 0