aws-samples / amazon-cloudwatch-prometheus-metrics-sample
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
  • 12% duplication:
    • 1,064 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 137 duplicated lines
  • 7 duplicates
system12% (137 lines)
Duplication per Extension
yaml17% (98 lines)
yml12% (39 lines)
Duplication per Component (primary)
PrometheusDemo/kubernetes17% (98 lines)
PrometheusDemo/ecs12% (39 lines)
PrometheusDemo/wwwroot/js0% (0 lines)
PrometheusDemo/wwwroot/css0% (0 lines)
PrometheusDemo/Views0% (0 lines)
PrometheusDemo/Views/Shared0% (0 lines)
PrometheusDemo/Views/Home0% (0 lines)
PrometheusDemo/Views/Products0% (0 lines)
PrometheusDemo/Controllers0% (0 lines)
PrometheusDemo/Models0% (0 lines)
PrometheusDemo0% (0 lines)
Longest Duplicates
The list of 7 longest duplicates.
See data for all 7 duplicates...
Size#FoldersFilesLinesCode
25 x 2 PrometheusDemo/kubernetes
PrometheusDemo/kubernetes
prometheus-eks.yaml
prometheus-eks.yaml
374:398 (4%)
409:433 (4%)
view
25 x 2 PrometheusDemo/kubernetes
PrometheusDemo/kubernetes
prometheus-eks.yaml
prometheus-eks.yaml
290:314 (4%)
409:433 (4%)
view
25 x 2 PrometheusDemo/kubernetes
PrometheusDemo/kubernetes
prometheus-eks.yaml
prometheus-eks.yaml
290:314 (4%)
374:398 (4%)
view
9 x 2 PrometheusDemo/ecs
PrometheusDemo/kubernetes
ecs-cwagent-config.yml
prometheus-eks.yaml
188:196 (2%)
251:259 (1%)
view
8 x 2 PrometheusDemo/ecs
PrometheusDemo/ecs
ecs-cwagent-config.yml
ecs-cwagent-config.yml
203:210 (2%)
229:236 (2%)
view
7 x 2 PrometheusDemo/kubernetes
PrometheusDemo/kubernetes
prometheus-eks.yaml
prometheus-eks.yaml
366:372 (1%)
401:407 (1%)
view
7 x 2 PrometheusDemo/ecs
PrometheusDemo/ecs
ecs-cwagent-config.yml
ecs-cwagent-config.yml
149:155 (2%)
163:169 (2%)
view