golang / perf
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
  • 3% duplication:
    • 4,030 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 157 duplicated lines
  • 11 duplicates
system3% (157 lines)
Duplication per Extension
html27% (82 lines)
go1% (61 lines)
yaml53% (14 lines)
Duplication per Component (primary)
analysis/appengine31% (89 lines)
benchstat4% (28 lines)
analysis/app2% (14 lines)
storage/db2% (12 lines)
storage/appengine5% (7 lines)
cmd/benchstat7% (7 lines)
cmd/benchsave0% (0 lines)
storage/cmd0% (0 lines)
storage/app0% (0 lines)
storage0% (0 lines)
storage/query0% (0 lines)
storage/fs0% (0 lines)
storage/benchfmt0% (0 lines)
storage/localperfdata0% (0 lines)
analysis/localperf0% (0 lines)
internal/stats0% (0 lines)
internal/diff0% (0 lines)
internal/basedir0% (0 lines)
Longest Duplicates
The list of 11 longest duplicates.
See data for all 11 duplicates...
Size#FoldersFilesLinesCode
19 x 2 analysis/appengine/template
analysis/appengine/template
index.html
trend.html
6:27 (38%)
7:28 (29%)
view
14 x 2 analysis/appengine/template
analysis/appengine/template
compare.html
index.html
6:19 (10%)
6:19 (28%)
view
14 x 2 analysis/appengine/template
analysis/appengine/template
compare.html
trend.html
6:19 (10%)
7:20 (21%)
view
8 x 2 benchstat
benchstat
text.go
text.go
212:223 (4%)
259:270 (4%)
view
8 x 2 analysis/appengine/template
analysis/appengine/template
compare.html
index.html
94:101 (5%)
34:41 (16%)
view
7 x 2 analysis/appengine/template
cmd/benchstat
compare.html
main.go
71:77 (5%)
206:212 (7%)
view
7 x 2 analysis/appengine
storage/appengine
app.yaml
app.yaml
4:10 (70%)
5:11 (43%)
view
7 x 2 analysis/app
analysis/app
index.go
trend.go
21:29 (33%)
43:51 (2%)
view
6 x 2 benchstat
benchstat
text.go
text.go
231:239 (3%)
284:292 (3%)
view
6 x 2 storage/db
storage/db
db.go
db.go
414:420 (1%)
617:623 (1%)
view
6 x 2 analysis/appengine/template
analysis/appengine/template
compare.html
index.html
81:87 (4%)
22:28 (12%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
6 x 2 storage/appengine
analysis/appengine
app.go
app.go
46:52 
20:26 
view