opensearch-project / perftop
Duplication

Places in code with 6 or more lines that are exactly the same.

Intro
  • For duplication, we look at places in code where there are 6 or more lines of code that are exactly the same.
  • Before duplication is calculated, the code is cleaned to remove empty lines, comments, and frequently duplicated constructs such as imports.
  • You should aim at having as little as possible (<5%) of duplicated code as high-level of duplication can lead to maintenance difficulties, poor factoring, and logical contradictions.
Learn more...
Duplication Overall
  • 10% duplication:
    • 820 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 86 duplicated lines
  • 3 duplicates
system10% (86 lines)
Duplication per Extension
js10% (86 lines)
Duplication per Component (primary)
lib/perf-top/metrics/util13% (49 lines)
lib/perf-top/rca/util25% (37 lines)
lib/perf-top/rca/util/temperature-profile0% (0 lines)
lib/perf-top/rca0% (0 lines)
lib/perf-top0% (0 lines)
lib/perf-top/metrics0% (0 lines)
lib0% (0 lines)

Duplication Between Components (50+ lines)

G lib/perf-top/metrics/util lib/perf-top/metrics/util lib/perf-top/rca/util lib/perf-top/rca/util lib/perf-top/metrics/util--lib/perf-top/rca/util 74

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 3 longest duplicates.
See data for all 3 duplicates...
Size#FoldersFilesLinesCode
20 x 2 lib/perf-top/metrics/util
lib/perf-top/rca/util
metric-line.js
metric-line.js
52:114 (24%)
50:111 (33%)
view
17 x 2 lib/perf-top/metrics/util
lib/perf-top/rca/util
metric-table.js
metric-table.js
55:86 (29%)
50:80 (36%)
view
6 x 2 lib/perf-top/metrics/util
lib/perf-top/metrics/util
metric-bar.js
metric-line.js
43:48 (10%)
43:48 (7%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
7 x 2 lib/perf-top/metrics/util
lib/perf-top/metrics/util
validate-query-params.js
validate-query-params.js
32:39 
46:53 
view