SlideShare una empresa de Scribd logo
1 de 4
Code Metrics
Current
5 Worst Modules by Cyclomatic Complexity
     Title                  Module                                               Complexity
     Gms-Ci                 Credit.CTWB.DocumentsSetup.Control.dll                      157
     Gms-Ci                 Credit.CommonControls.LookUp.Common.dll                     143
     Gms-Ci                 Credit.ApplicationManager.EditQuickTab.Control.dll          133
     Gms-Ci                 Credit.CTWB.CovenantsSetup.Control.dll                      121
     Gms-Ci                 Credit.CTWB.CovenantsSetup.Service.dll                      111
     Gus-Init1              GUS.WinApplication.Metrics.dll                              262
     Gus-Init1              GUS.WinApplication.Common.dll                               104
     Gus-Init1              GUS.WinApplication.ServiceAgent.dll                           82
     Gus-Init1              ICSharpCode.SharpZipLib.dll                                   67
     Gus-Init1              GUS.WinApplication.Approvals.dll                              59
     TechnicalDebtTaskLib   TechnicalDebtTaskLib.dll                                      22
     TechnicalDebtTaskLib   TechnicalDebtTaskLib_Accessor.dll                              5
     TechnicalDebtTaskLib   BuildProcessTemplate.dll                                       5
     TechnicalDebtTaskLib   TechnicalDebtTaskLib.Tests.dll                                 3




    Cyclomatic Complexity – Measures the structural
    complexity of the code. It is created by calculating the
    number of different code paths in the flow of the program.
    A program that has complex control flow will require more
    tests to achieve good code coverage and will be less
    maintainable.
McCabe Cyclomatic Complexity: the proof in
the pudding




     The results show that the files having a CC
     value of 11 had the lowest probability of
     being fault-prone (28%). Files with a CC
     value of 38 had a probability of 50% of
     being fault-prone. Files containing CC
     values of 74 and up were determined to
     have a 98% plus probability of being fault-
     prone.
5 Worst Modules by Maintainability

   title                  modulename                                            maintainability
   Gms-Ci                 Credit.CommonControls.CADDDialog.Service.dll                          48
   Gms-Ci                 Credit.Metrics.Preference.Control.dll                                 49
   Gms-Ci                 Credit.CTWB.DocumentsReceipt.Control.dll                              50
   Gms-Ci                 Credit.CTWB.DocumentsHistory.Control.dll                              53
   Gms-Ci                 Credit.CommonControls.ConflictInformation.Control.dll                 53
   Gus-Init1              Halos.Xml.DocGen.Generator.dll                                        56
   Gus-Init1              Halos.Xml.DocGen.DocumentFactory.dll                                  71
   Gus-Init1              Halos.Configuration.DynamicConfigurationManager.dll                   74
   Gus-Init1              GUS.WinApplication.Metrics.dll                                        75
   Gus-Init1              GUS.WinApplication.ServiceAgent.dll                                   78
   Gus-Init1              GUS.WinApplication.BulletinBoard.dll                                  78
   TechnicalDebtTaskLib   TechnicalDebtTaskLib.Tests.dll                                        66
   TechnicalDebtTaskLib   BuildProcessTemplate.dll                                              75
   TechnicalDebtTaskLib   TechnicalDebtTaskLib_Accessor.dll                                     78
   TechnicalDebtTaskLib   TechnicalDebtTaskLib.dll                                              79




            The maintainability index is a synthesis of
            three metrics: cyclomatic complexity, lines
            of code, and computational complexity. Its
            values are not expressed in units.

              MAX(0,(171 - 5.2 * ln(Halstead Volume) -
              0.23 * (Cyclomatic Complexity) - 16.2 *
              ln(Lines of Code))*100 / 171)

Más contenido relacionado

Similar a Metrics

Microservices:
 The phantom menace
. Istio Service Mesh: 
the new hope
Microservices:
 The phantom menace
. Istio Service Mesh: 
the new hopeMicroservices:
 The phantom menace
. Istio Service Mesh: 
the new hope
Microservices:
 The phantom menace
. Istio Service Mesh: 
the new hopeSergii Bishyr
 
Microservice & Service Mesh Workshop
Microservice & Service Mesh WorkshopMicroservice & Service Mesh Workshop
Microservice & Service Mesh WorkshopClaudio Acquaviva
 
Code Quality - Security
Code Quality - SecurityCode Quality - Security
Code Quality - Securitysedukull
 
Advanced System Security and Digital Forensics
Advanced System Security and Digital ForensicsAdvanced System Security and Digital Forensics
Advanced System Security and Digital ForensicsDr. Ramchandra Mangrulkar
 
Semi-Automatic Code Cleanup with Clang-Tidy
Semi-Automatic Code Cleanup with Clang-TidySemi-Automatic Code Cleanup with Clang-Tidy
Semi-Automatic Code Cleanup with Clang-TidyMarkus Werle
 
WWCode Dallas - Kubernetes: Learning from Zero to Production
WWCode Dallas - Kubernetes: Learning from Zero to ProductionWWCode Dallas - Kubernetes: Learning from Zero to Production
WWCode Dallas - Kubernetes: Learning from Zero to ProductionRosemary Wang
 
Pre-Compliance Accreditation Tool for Python
Pre-Compliance Accreditation Tool for PythonPre-Compliance Accreditation Tool for Python
Pre-Compliance Accreditation Tool for PythonJustin Dierking
 
Security-by-Design and -Default
 Security-by-Design and -Default Security-by-Design and -Default
Security-by-Design and -DefaultMehdi Mirakhorli
 
Secure GitOps pipelines for Kubernetes with Snyk & Weaveworks
Secure GitOps pipelines for Kubernetes with Snyk & WeaveworksSecure GitOps pipelines for Kubernetes with Snyk & Weaveworks
Secure GitOps pipelines for Kubernetes with Snyk & WeaveworksWeaveworks
 
Service mesh from linkerd to conduit (cloud native taiwan meetup)
Service mesh from linkerd to conduit (cloud native taiwan meetup)Service mesh from linkerd to conduit (cloud native taiwan meetup)
Service mesh from linkerd to conduit (cloud native taiwan meetup)Chia-Chun Shih
 
Introduction to Codeigniter
Introduction to Codeigniter Introduction to Codeigniter
Introduction to Codeigniter Zero Huang
 
Тестирование спецификаций
Тестирование спецификацийТестирование спецификаций
Тестирование спецификацийSQALab
 
(automatic) Testing: from business to university and back
(automatic) Testing: from business to university and back(automatic) Testing: from business to university and back
(automatic) Testing: from business to university and backDavid Rodenas
 
Delivering Quality at Speed with GitOps
Delivering Quality at Speed with GitOpsDelivering Quality at Speed with GitOps
Delivering Quality at Speed with GitOpsWeaveworks
 
UVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER CORE
UVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER COREUVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER CORE
UVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER COREVLSICS Design
 
UVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER CORE
UVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER COREUVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER CORE
UVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER COREVLSICS Design
 
UVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER CORE
UVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER COREUVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER CORE
UVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER COREVLSICS Design
 
SAST, CWE, SEI CERT and other smart words from the information security world
SAST, CWE, SEI CERT and other smart words from the information security worldSAST, CWE, SEI CERT and other smart words from the information security world
SAST, CWE, SEI CERT and other smart words from the information security worldAndrey Karpov
 
Your cde tells a tale - Using behavioural code analysis to identify technical...
Your cde tells a tale - Using behavioural code analysis to identify technical...Your cde tells a tale - Using behavioural code analysis to identify technical...
Your cde tells a tale - Using behavioural code analysis to identify technical...Francieli Viane
 

Similar a Metrics (20)

Microservices:
 The phantom menace
. Istio Service Mesh: 
the new hope
Microservices:
 The phantom menace
. Istio Service Mesh: 
the new hopeMicroservices:
 The phantom menace
. Istio Service Mesh: 
the new hope
Microservices:
 The phantom menace
. Istio Service Mesh: 
the new hope
 
Microservice & Service Mesh Workshop
Microservice & Service Mesh WorkshopMicroservice & Service Mesh Workshop
Microservice & Service Mesh Workshop
 
Code Quality - Security
Code Quality - SecurityCode Quality - Security
Code Quality - Security
 
Advanced System Security and Digital Forensics
Advanced System Security and Digital ForensicsAdvanced System Security and Digital Forensics
Advanced System Security and Digital Forensics
 
Semi-Automatic Code Cleanup with Clang-Tidy
Semi-Automatic Code Cleanup with Clang-TidySemi-Automatic Code Cleanup with Clang-Tidy
Semi-Automatic Code Cleanup with Clang-Tidy
 
WWCode Dallas - Kubernetes: Learning from Zero to Production
WWCode Dallas - Kubernetes: Learning from Zero to ProductionWWCode Dallas - Kubernetes: Learning from Zero to Production
WWCode Dallas - Kubernetes: Learning from Zero to Production
 
1506.08725v1
1506.08725v11506.08725v1
1506.08725v1
 
Pre-Compliance Accreditation Tool for Python
Pre-Compliance Accreditation Tool for PythonPre-Compliance Accreditation Tool for Python
Pre-Compliance Accreditation Tool for Python
 
Security-by-Design and -Default
 Security-by-Design and -Default Security-by-Design and -Default
Security-by-Design and -Default
 
Secure GitOps pipelines for Kubernetes with Snyk & Weaveworks
Secure GitOps pipelines for Kubernetes with Snyk & WeaveworksSecure GitOps pipelines for Kubernetes with Snyk & Weaveworks
Secure GitOps pipelines for Kubernetes with Snyk & Weaveworks
 
Service mesh from linkerd to conduit (cloud native taiwan meetup)
Service mesh from linkerd to conduit (cloud native taiwan meetup)Service mesh from linkerd to conduit (cloud native taiwan meetup)
Service mesh from linkerd to conduit (cloud native taiwan meetup)
 
Introduction to Codeigniter
Introduction to Codeigniter Introduction to Codeigniter
Introduction to Codeigniter
 
Тестирование спецификаций
Тестирование спецификацийТестирование спецификаций
Тестирование спецификаций
 
(automatic) Testing: from business to university and back
(automatic) Testing: from business to university and back(automatic) Testing: from business to university and back
(automatic) Testing: from business to university and back
 
Delivering Quality at Speed with GitOps
Delivering Quality at Speed with GitOpsDelivering Quality at Speed with GitOps
Delivering Quality at Speed with GitOps
 
UVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER CORE
UVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER COREUVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER CORE
UVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER CORE
 
UVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER CORE
UVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER COREUVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER CORE
UVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER CORE
 
UVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER CORE
UVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER COREUVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER CORE
UVM BASED REUSABLE VERIFICATION IP FOR WISHBONE COMPLIANT SPI MASTER CORE
 
SAST, CWE, SEI CERT and other smart words from the information security world
SAST, CWE, SEI CERT and other smart words from the information security worldSAST, CWE, SEI CERT and other smart words from the information security world
SAST, CWE, SEI CERT and other smart words from the information security world
 
Your cde tells a tale - Using behavioural code analysis to identify technical...
Your cde tells a tale - Using behavioural code analysis to identify technical...Your cde tells a tale - Using behavioural code analysis to identify technical...
Your cde tells a tale - Using behavioural code analysis to identify technical...
 

Más de MaslowB

F# for BLOBA, by brandon d'imperio
F# for BLOBA, by brandon d'imperioF# for BLOBA, by brandon d'imperio
F# for BLOBA, by brandon d'imperioMaslowB
 
Knockout vs. angular
Knockout vs. angularKnockout vs. angular
Knockout vs. angularMaslowB
 
Js testing
Js testingJs testing
Js testingMaslowB
 
Type mock isolator
Type mock isolatorType mock isolator
Type mock isolatorMaslowB
 
What’s new mvc 4
What’s new mvc 4What’s new mvc 4
What’s new mvc 4MaslowB
 
A clean repository pattern in ef
A clean repository pattern in efA clean repository pattern in ef
A clean repository pattern in efMaslowB
 
Type mock isolator
Type mock isolatorType mock isolator
Type mock isolatorMaslowB
 
Mvc presentation
Mvc presentationMvc presentation
Mvc presentationMaslowB
 
Metaprogramming by brandon
Metaprogramming by brandonMetaprogramming by brandon
Metaprogramming by brandonMaslowB
 

Más de MaslowB (9)

F# for BLOBA, by brandon d'imperio
F# for BLOBA, by brandon d'imperioF# for BLOBA, by brandon d'imperio
F# for BLOBA, by brandon d'imperio
 
Knockout vs. angular
Knockout vs. angularKnockout vs. angular
Knockout vs. angular
 
Js testing
Js testingJs testing
Js testing
 
Type mock isolator
Type mock isolatorType mock isolator
Type mock isolator
 
What’s new mvc 4
What’s new mvc 4What’s new mvc 4
What’s new mvc 4
 
A clean repository pattern in ef
A clean repository pattern in efA clean repository pattern in ef
A clean repository pattern in ef
 
Type mock isolator
Type mock isolatorType mock isolator
Type mock isolator
 
Mvc presentation
Mvc presentationMvc presentation
Mvc presentation
 
Metaprogramming by brandon
Metaprogramming by brandonMetaprogramming by brandon
Metaprogramming by brandon
 

Metrics

  • 2. 5 Worst Modules by Cyclomatic Complexity Title Module Complexity Gms-Ci Credit.CTWB.DocumentsSetup.Control.dll 157 Gms-Ci Credit.CommonControls.LookUp.Common.dll 143 Gms-Ci Credit.ApplicationManager.EditQuickTab.Control.dll 133 Gms-Ci Credit.CTWB.CovenantsSetup.Control.dll 121 Gms-Ci Credit.CTWB.CovenantsSetup.Service.dll 111 Gus-Init1 GUS.WinApplication.Metrics.dll 262 Gus-Init1 GUS.WinApplication.Common.dll 104 Gus-Init1 GUS.WinApplication.ServiceAgent.dll 82 Gus-Init1 ICSharpCode.SharpZipLib.dll 67 Gus-Init1 GUS.WinApplication.Approvals.dll 59 TechnicalDebtTaskLib TechnicalDebtTaskLib.dll 22 TechnicalDebtTaskLib TechnicalDebtTaskLib_Accessor.dll 5 TechnicalDebtTaskLib BuildProcessTemplate.dll 5 TechnicalDebtTaskLib TechnicalDebtTaskLib.Tests.dll 3 Cyclomatic Complexity – Measures the structural complexity of the code. It is created by calculating the number of different code paths in the flow of the program. A program that has complex control flow will require more tests to achieve good code coverage and will be less maintainable.
  • 3. McCabe Cyclomatic Complexity: the proof in the pudding The results show that the files having a CC value of 11 had the lowest probability of being fault-prone (28%). Files with a CC value of 38 had a probability of 50% of being fault-prone. Files containing CC values of 74 and up were determined to have a 98% plus probability of being fault- prone.
  • 4. 5 Worst Modules by Maintainability title modulename maintainability Gms-Ci Credit.CommonControls.CADDDialog.Service.dll 48 Gms-Ci Credit.Metrics.Preference.Control.dll 49 Gms-Ci Credit.CTWB.DocumentsReceipt.Control.dll 50 Gms-Ci Credit.CTWB.DocumentsHistory.Control.dll 53 Gms-Ci Credit.CommonControls.ConflictInformation.Control.dll 53 Gus-Init1 Halos.Xml.DocGen.Generator.dll 56 Gus-Init1 Halos.Xml.DocGen.DocumentFactory.dll 71 Gus-Init1 Halos.Configuration.DynamicConfigurationManager.dll 74 Gus-Init1 GUS.WinApplication.Metrics.dll 75 Gus-Init1 GUS.WinApplication.ServiceAgent.dll 78 Gus-Init1 GUS.WinApplication.BulletinBoard.dll 78 TechnicalDebtTaskLib TechnicalDebtTaskLib.Tests.dll 66 TechnicalDebtTaskLib BuildProcessTemplate.dll 75 TechnicalDebtTaskLib TechnicalDebtTaskLib_Accessor.dll 78 TechnicalDebtTaskLib TechnicalDebtTaskLib.dll 79 The maintainability index is a synthesis of three metrics: cyclomatic complexity, lines of code, and computational complexity. Its values are not expressed in units. MAX(0,(171 - 5.2 * ln(Halstead Volume) - 0.23 * (Cyclomatic Complexity) - 16.2 * ln(Lines of Code))*100 / 171)

Notas del editor

  1. From http://www.enerjy.com/blog/?p=198
  2. Remediation information at http://www.codinghorror.com/blog/2006/01/flattening-arrow-code.html