golang / benchmarks
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:
    • 14,319 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 523 duplicated lines
  • 42 duplicates
system3% (523 lines)
Duplication per Extension
go3% (495 lines)
toml3% (28 lines)
Duplication per Component (primary)
sweet/benchmarks6% (104 lines)
garbage1% (99 lines)
driver12% (87 lines)
sweet/cmd10% (72 lines)
cmd/bent3% (66 lines)
sweet/generators8% (43 lines)
stats12% (30 lines)
sweet/harnesses7% (22 lines)
cmd/bench0% (0 lines)
http0% (0 lines)
build0% (0 lines)
sweet/source-assets0% (0 lines)
sweet/cli0% (0 lines)
sweet/common0% (0 lines)
json0% (0 lines)
ROOT0% (0 lines)

Duplication Between Components (50+ lines)

G sweet/benchmarks sweet/benchmarks sweet/generators sweet/generators sweet/benchmarks--sweet/generators 86

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
See data for all 42 duplicates...
Size#FoldersFilesLinesCode
24 x 2 sweet/cmd/sweet
sweet/cmd/sweet
gen.go
run.go
46:77 (23%)
70:101 (13%)
view
16 x 2 garbage
garbage
nethttp.go
nethttp.go
7647:7663 (<1%)
7678:7694 (<1%)
view
15 x 2 stats
stats
edm.go
edm.go
127:147 (12%)
162:182 (12%)
view
13 x 2 sweet/benchmarks/tile38
sweet/generators
main.go
tile38.go
268:283 (6%)
116:131 (8%)
view
9 x 2 sweet/benchmarks/tile38
sweet/generators
main.go
tile38.go
235:246 (4%)
227:238 (5%)
view
8 x 2 cmd/bent/configs
cmd/bent/configs
benchmarks-gc.toml
benchmarks-gcplus.toml
13:21 (44%)
13:21 (25%)
view
8 x 2 sweet/benchmarks/gvisor
sweet/benchmarks/tile38
http_server.go
main.go
91:100 (6%)
69:78 (3%)
view
8 x 2 sweet/harnesses
sweet/harnesses
gvisor.go
tile38.go
65:72 (21%)
70:77 (19%)
view
8 x 2 driver
driver
driver_plan9.go
driver_unix.go
58:66 (15%)
51:59 (14%)
view
7 x 2 sweet/benchmarks/bleve-index
sweet/generators
main.go
bleve-query.go
85:94 (11%)
97:106 (14%)
view
7 x 2 driver
driver
driver_unix.go
driver_windows.go
52:59 (12%)
241:248 (3%)
view
7 x 2 garbage
garbage
nethttp.go
nethttp.go
5657:5663 (<1%)
5691:5697 (<1%)
view
7 x 2 cmd/bent
cmd/bent
configuration.go
configuration.go
159:167 (2%)
190:198 (2%)
view
7 x 2 driver
driver
driver_darwin.go
driver_linux.go
33:43 (35%)
96:106 (8%)
view
7 x 2 driver
driver
driver_plan9.go
driver_windows.go
59:66 (13%)
241:248 (3%)
view
7 x 2 garbage
garbage
nethttp.go
nethttp.go
518:524 (<1%)
532:538 (<1%)
view
7 x 2 driver
driver
driver_darwin.go
driver_linux.go
23:31 (35%)
86:94 (8%)
view
7 x 2 garbage
garbage
nethttp.go
nethttp.go
339:345 (<1%)
577:583 (<1%)
view
7 x 2 sweet/benchmarks/bleve-index
sweet/generators
main.go
bleve-query.go
60:67 (11%)
84:91 (14%)
view
7 x 2 sweet/benchmarks/bleve-index
sweet/generators
main.go
bleve-query.go
46:55 (11%)
45:54 (14%)
view
Duplicated Units
The list of top 6 duplicated units.
See data for all 6 unit duplicates...
Size#FoldersFilesLinesCode
16 x 2 driver
driver
driver_linux.go
driver_darwin.go
86:104 
23:41 
view
7 x 2 sweet/benchmarks/tile38
sweet/benchmarks/tile38
main.go
main.go
84:91 
93:100 
view
6 x 2 garbage
garbage
nethttp.go
nethttp.go
378:384 
597:603 
view
6 x 2 stats
stats
edmx.go
edmx.go
20:26 
36:42 
view
6 x 2 sweet/generators
sweet/generators
copy.go
copy.go
45:51 
53:59 
view
6 x 2 sweet/benchmarks/bleve-index
sweet/benchmarks/bleve-query
main.go
main.go
36:42 
21:27 
view