SlideShare a Scribd company logo
Software Metrics Ehsan hessamiIslamic Azad University OF Qazvin
What ? Software measurement is the mapping of symbols to objects
What ? Software measurement is the mapping of symbols to objects Why ?!!!!!! quantify some attribute of  the objects
Criteria
Criteria A metric must allow differententities to be distinguished. A metric must obey a representation condition
Criteria… Each unit of the attribute must contribute an equivalent amount to the metric Different entities can have the sameattributevalue
Many times the attribute of interest is not directly measurable .  An indirect measure involves a measure and a prediction formula
Example density mass volume
Software Measurement Theory 2 Kinds : numerical relation system empirical relation system
The empirical relation system two parts: A set of entities, E A set of relationships, R
The numerical relation system two parts: A set of entities, N EXP : Integers , Real A set of relationships, P EXP : Less , Equal
Mapping M, maps (E, R) to (N, P) related in the empirical system related in the numberical system
Mapping M, maps (E, R) to (N, P) related in the empirical system related in the numberical system EXP :  x rel y if M(x) rel M(y)
EXP . Mapping measure, BIG X height=< Y height and X weight =< Y weight
MONOTONICITY IF increase the value of attribute ,  the object Will not Reverse.
MONOTONICITY IF increase the value of attribute ,  The object  will not Reverse.  Exp :  2 y = X Monotonicity X>0 And X<5 2 y = 5x - x Increaes X>=5 And X<10 Decrease Not Monotonicity
MEASUREMENT SCALES There are five different scale types : nominal ordinal interval ratio absolute
Normal This type basically assigns  numbers or symbols without  regard to any quantity
Normal This type basically assigns  numbers or symbols without  regard to any quantity EXP:
Ordinal there is an implied ordering of  the entities by the numbers  assigned to the entity
Ordinal there is an implied ordering of  the entities by the numbers  assigned to the entity EXP:  First  – Second Not Equal 1 Second - third 2 3
Interval the amount of the difference  is constant
Interval the amount of the difference  is constant EXP:  converting from a Celsius to  a Fahrenheit Formule :   9.5 x +32
Ratio the amount of the difference  is constant and Well Zero
absolute The absolute is a counting scale measure EXP:
Product Metrics Product metrics are metrics that can be calculated from the   document independent of how    it was produced .  The most basic metric for size is  thelinesof code metric .
McCABE’S CYCLOMATIC NUMBER introduced in 1976 .  Use the Gragh Theory :  C  = E – N + 2 C = Cyclomatic number . E = number of Edges . N = number of Eodes .
McCABE’S CYCLOMATIC NUMBER EXP :  5 1 4 3 2 E = 11  N = 8 C = 11 – 8 + 2  C = 5
McCABE’S CYCLOMATIC NUMBER Calculating the cyclomatic number from control flow graphs is time-consuming .  McCabe found a more direct Method of calculating his measure .
McCABE’S CYCLOMATIC NUMBER Restriction  :  IN source Code :  1 decision    IF , For , While   Case or multiple Branch    1 less decision
McCABE’S CYCLOMATIC NUMBER Restriction … :  Control flow graphs are required to have a distinct starting node and a distinct stoppingnode Formula :  C = D + 1 D = Sum of Decisions
Example E = 2 D = 1 E = 2 D = 1 E = 3 D = 2 D  = 4  C = 5 Complexity
Threshold Value If the Complexity is greater than 10 , efforts should be made to reduce the value or to split the module
HALSTEAD’S SOFTWARE SCIENCE He did his work in the late  1960s and 1970s. He empirically looked for measures of intrinsic size
HALSTEAD’S SOFTWARE SCIENCE variables Operands constants commas parentheses Operator arithmetic operators brackets
Basic Measures—η1 and η2 η = η1 + η2   η = total count of unique tokens Count of unique Operator η1 = Count of unique Operands  η2 =
Basic Measures—η1 and η2 Exp : z = 0; While x> 0    z = z + y ;    x = x + 1; End –while ; Print(z) ; Operator  = ; > + - Print () While-endwhile Operand  z x y 0 1 η1 =8 η2 = 5 η = 13
Length(N) N = N1 + N2   N = total count of tokens Count of Operator N1 = Count of Operands N2 =
Length EXP :  Operators =       3 ;        5 While  1 >        1 +        1 -        1 Print   1 ()        1 Operands Z        4 X        3 Y        2 0        2 1        1 z = 0; While x> 0    z = z + y ;    x = x + 1; End –while ; Print(z) ; N = N1 + N2 = 14+12 = 26
Estimate of the Length(est N) η1 η2 est N = η1*log    + η2*log 2 2
Estimate of the Length(est N) η1 η2 est N = η1*log    + η2*log 2 2 Exp : η1=8  , η2=5 est N = 8*3 +5*2.32 = 35.6
Volume ( V ) Volume =  number of bits (η1+ η2) V = N * Log 2
Volume ( V ) Volume =  number of bits (η1+ η2) V = N * Log 2 Exp:  N = 26 , η1=8  , η2=5 13 V = 26 * Log   = 96.2 2
Potential Volume, V* Potential Volume =  Min number of bits V* = (2 + η2*)log (2+ η2*) 2 η2* = The Minimal number of Operands
Other Parameter Implementation Level :  L =  V* / V
Other Parameter Implementation Level :  L =  V* / V Effort :  E = V / L  unit of Effors is emd
Other Parameter Implementation Level :  L =  V* / V Effort :  E = V / L  unit of Effors is emd Time : T =  E / S 18 emd / sec
HENRY–KAFURA INFORMATION FLOW measure the intermodule complexity of source code .  HK = Weight *(out * in ) i i i i In = into the module i Out = out the module  i Weight = weight the module  i
HENRY–KAFURA INFORMATION FLOW Exp  :  Weight = 1  HK = 1110

More Related Content

What's hot

Types of functions, domain, range
Types of functions, domain, rangeTypes of functions, domain, range
Types of functions, domain, range
Richard Coleman
 
Maps&hash tables
Maps&hash tablesMaps&hash tables
Maps&hash tables
Priyanka Rana
 
Data Structure: Algorithm and analysis
Data Structure: Algorithm and analysisData Structure: Algorithm and analysis
Data Structure: Algorithm and analysis
Dr. Rajdeep Chatterjee
 
Slide2
Slide2Slide2
01 Analysis of Algorithms: Introduction
01 Analysis of Algorithms: Introduction01 Analysis of Algorithms: Introduction
01 Analysis of Algorithms: Introduction
Andres Mendez-Vazquez
 
Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)
swapnac12
 
3.3 Logarithmic Functions
3.3 Logarithmic Functions3.3 Logarithmic Functions
3.3 Logarithmic Functions
Victoria Ryburn
 
Fundamentals of the Analysis of Algorithm Efficiency
Fundamentals of the Analysis of Algorithm EfficiencyFundamentals of the Analysis of Algorithm Efficiency
Fundamentals of the Analysis of Algorithm Efficiency
Saranya Natarajan
 
Unit 3
Unit 3Unit 3
Unit 3
guna287176
 
01. design & analysis of agorithm intro & complexity analysis
01. design & analysis of agorithm intro & complexity analysis01. design & analysis of agorithm intro & complexity analysis
01. design & analysis of agorithm intro & complexity analysis
Onkar Nath Sharma
 
Divide and conquer
Divide and conquerDivide and conquer
Divide and conquer
Dr Shashikant Athawale
 
Data Structures- Hashing
Data Structures- Hashing Data Structures- Hashing
Data Structures- Hashing
hemalatha athinarayanan
 
Week7
Week7Week7
Unit 2
Unit 2Unit 2
Unit 2
guna287176
 
Algorithm analysis and efficiency
Algorithm analysis and efficiencyAlgorithm analysis and efficiency
Algorithm analysis and efficiency
ppts123456
 
Algorithm Development
Algorithm DevelopmentAlgorithm Development
Algorithm Development
ALI RAZA
 
Cis435 week01
Cis435 week01Cis435 week01
Cis435 week01
ashish bansal
 
C# p2
C# p2C# p2
chapter 1
chapter 1chapter 1
chapter 1
yatheesha
 
8th pre alg -l41
8th pre alg -l418th pre alg -l41
8th pre alg -l41
jdurst65
 

What's hot (20)

Types of functions, domain, range
Types of functions, domain, rangeTypes of functions, domain, range
Types of functions, domain, range
 
Maps&hash tables
Maps&hash tablesMaps&hash tables
Maps&hash tables
 
Data Structure: Algorithm and analysis
Data Structure: Algorithm and analysisData Structure: Algorithm and analysis
Data Structure: Algorithm and analysis
 
Slide2
Slide2Slide2
Slide2
 
01 Analysis of Algorithms: Introduction
01 Analysis of Algorithms: Introduction01 Analysis of Algorithms: Introduction
01 Analysis of Algorithms: Introduction
 
Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)
 
3.3 Logarithmic Functions
3.3 Logarithmic Functions3.3 Logarithmic Functions
3.3 Logarithmic Functions
 
Fundamentals of the Analysis of Algorithm Efficiency
Fundamentals of the Analysis of Algorithm EfficiencyFundamentals of the Analysis of Algorithm Efficiency
Fundamentals of the Analysis of Algorithm Efficiency
 
Unit 3
Unit 3Unit 3
Unit 3
 
01. design & analysis of agorithm intro & complexity analysis
01. design & analysis of agorithm intro & complexity analysis01. design & analysis of agorithm intro & complexity analysis
01. design & analysis of agorithm intro & complexity analysis
 
Divide and conquer
Divide and conquerDivide and conquer
Divide and conquer
 
Data Structures- Hashing
Data Structures- Hashing Data Structures- Hashing
Data Structures- Hashing
 
Week7
Week7Week7
Week7
 
Unit 2
Unit 2Unit 2
Unit 2
 
Algorithm analysis and efficiency
Algorithm analysis and efficiencyAlgorithm analysis and efficiency
Algorithm analysis and efficiency
 
Algorithm Development
Algorithm DevelopmentAlgorithm Development
Algorithm Development
 
Cis435 week01
Cis435 week01Cis435 week01
Cis435 week01
 
C# p2
C# p2C# p2
C# p2
 
chapter 1
chapter 1chapter 1
chapter 1
 
8th pre alg -l41
8th pre alg -l418th pre alg -l41
8th pre alg -l41
 

Similar to Software Metrics

01 - DAA - PPT.pptx
01 - DAA - PPT.pptx01 - DAA - PPT.pptx
01 - DAA - PPT.pptx
KokilaK25
 
Cs6402 daa-2 marks set 1
Cs6402 daa-2 marks set 1Cs6402 daa-2 marks set 1
Cs6402 daa-2 marks set 1
Vai Jayanthi
 
Asymptotic Notation and Complexity
Asymptotic Notation and ComplexityAsymptotic Notation and Complexity
Asymptotic Notation and Complexity
Rajandeep Gill
 
Time complexity.ppt
Time complexity.pptTime complexity.ppt
Time complexity.ppt
YekoyeTigabuYeko
 
how to calclute time complexity of algortihm
how to calclute time complexity of algortihmhow to calclute time complexity of algortihm
how to calclute time complexity of algortihm
Sajid Marwat
 
Lec03 04-time complexity
Lec03 04-time complexityLec03 04-time complexity
Lec03 04-time complexity
Abbas Ali
 
Algorithm And analysis Lecture 03& 04-time complexity.
 Algorithm And analysis Lecture 03& 04-time complexity. Algorithm And analysis Lecture 03& 04-time complexity.
Algorithm And analysis Lecture 03& 04-time complexity.
Tariq Khan
 
Annotations.pdf
Annotations.pdfAnnotations.pdf
Annotations.pdf
GauravKumar295392
 
chapter1.pdf ......................................
chapter1.pdf ......................................chapter1.pdf ......................................
chapter1.pdf ......................................
nourhandardeer3
 
Cs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer keyCs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer key
appasami
 
DAA-Unit1.pptx
DAA-Unit1.pptxDAA-Unit1.pptx
DAA-Unit1.pptx
NishaS88
 
3 analysis.gtm
3 analysis.gtm3 analysis.gtm
3 analysis.gtm
Natarajan Angappan
 
analysis.ppt
analysis.pptanalysis.ppt
analysis.ppt
AarushSharma69
 
lecture 1
lecture 1lecture 1
lecture 1
sajinsc
 
Size Measurement and Estimation
Size Measurement and EstimationSize Measurement and Estimation
Size Measurement and Estimation
Louis A. Poulin
 
Big Oh.ppt
Big Oh.pptBig Oh.ppt
Big Oh.ppt
Senthil Vit
 
Csci101 lect02 selection_andlooping
Csci101 lect02 selection_andloopingCsci101 lect02 selection_andlooping
Csci101 lect02 selection_andlooping
Elsayed Hemayed
 
Alg1
Alg1Alg1
Matlab1
Matlab1Matlab1
Matlab1
guest8ba004
 
Algorithms
Algorithms Algorithms
Algorithms
yashodhaHR2
 

Similar to Software Metrics (20)

01 - DAA - PPT.pptx
01 - DAA - PPT.pptx01 - DAA - PPT.pptx
01 - DAA - PPT.pptx
 
Cs6402 daa-2 marks set 1
Cs6402 daa-2 marks set 1Cs6402 daa-2 marks set 1
Cs6402 daa-2 marks set 1
 
Asymptotic Notation and Complexity
Asymptotic Notation and ComplexityAsymptotic Notation and Complexity
Asymptotic Notation and Complexity
 
Time complexity.ppt
Time complexity.pptTime complexity.ppt
Time complexity.ppt
 
how to calclute time complexity of algortihm
how to calclute time complexity of algortihmhow to calclute time complexity of algortihm
how to calclute time complexity of algortihm
 
Lec03 04-time complexity
Lec03 04-time complexityLec03 04-time complexity
Lec03 04-time complexity
 
Algorithm And analysis Lecture 03& 04-time complexity.
 Algorithm And analysis Lecture 03& 04-time complexity. Algorithm And analysis Lecture 03& 04-time complexity.
Algorithm And analysis Lecture 03& 04-time complexity.
 
Annotations.pdf
Annotations.pdfAnnotations.pdf
Annotations.pdf
 
chapter1.pdf ......................................
chapter1.pdf ......................................chapter1.pdf ......................................
chapter1.pdf ......................................
 
Cs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer keyCs6402 design and analysis of algorithms may june 2016 answer key
Cs6402 design and analysis of algorithms may june 2016 answer key
 
DAA-Unit1.pptx
DAA-Unit1.pptxDAA-Unit1.pptx
DAA-Unit1.pptx
 
3 analysis.gtm
3 analysis.gtm3 analysis.gtm
3 analysis.gtm
 
analysis.ppt
analysis.pptanalysis.ppt
analysis.ppt
 
lecture 1
lecture 1lecture 1
lecture 1
 
Size Measurement and Estimation
Size Measurement and EstimationSize Measurement and Estimation
Size Measurement and Estimation
 
Big Oh.ppt
Big Oh.pptBig Oh.ppt
Big Oh.ppt
 
Csci101 lect02 selection_andlooping
Csci101 lect02 selection_andloopingCsci101 lect02 selection_andlooping
Csci101 lect02 selection_andlooping
 
Alg1
Alg1Alg1
Alg1
 
Matlab1
Matlab1Matlab1
Matlab1
 
Algorithms
Algorithms Algorithms
Algorithms
 

Recently uploaded

Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
Ajin Abraham
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
Alex Pruden
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
DianaGray10
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
Neo4j
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
Neo4j
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Pitangent Analytics & Technology Solutions Pvt. Ltd
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
akankshawande
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Neo4j
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
operationspcvita
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
ScyllaDB
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Precisely
 

Recently uploaded (20)

Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
 
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
zkStudyClub - LatticeFold: A Lattice-based Folding Scheme and its Application...
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
 
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge GraphGraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
GraphRAG for LifeSciences Hands-On with the Clinical Knowledge Graph
 
Leveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and StandardsLeveraging the Graph for Clinical Trials and Standards
Leveraging the Graph for Clinical Trials and Standards
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
Crafting Excellence: A Comprehensive Guide to iOS Mobile App Development Serv...
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development ProvidersYour One-Stop Shop for Python Success: Top 10 US Python Development Providers
Your One-Stop Shop for Python Success: Top 10 US Python Development Providers
 
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and BioinformaticiansBiomedical Knowledge Graphs for Data Scientists and Bioinformaticians
Biomedical Knowledge Graphs for Data Scientists and Bioinformaticians
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-EfficiencyFreshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
Freshworks Rethinks NoSQL for Rapid Scaling & Cost-Efficiency
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
 

Software Metrics

  • 1. Software Metrics Ehsan hessamiIslamic Azad University OF Qazvin
  • 2. What ? Software measurement is the mapping of symbols to objects
  • 3. What ? Software measurement is the mapping of symbols to objects Why ?!!!!!! quantify some attribute of the objects
  • 5. Criteria A metric must allow differententities to be distinguished. A metric must obey a representation condition
  • 6. Criteria… Each unit of the attribute must contribute an equivalent amount to the metric Different entities can have the sameattributevalue
  • 7. Many times the attribute of interest is not directly measurable . An indirect measure involves a measure and a prediction formula
  • 9. Software Measurement Theory 2 Kinds : numerical relation system empirical relation system
  • 10. The empirical relation system two parts: A set of entities, E A set of relationships, R
  • 11. The numerical relation system two parts: A set of entities, N EXP : Integers , Real A set of relationships, P EXP : Less , Equal
  • 12. Mapping M, maps (E, R) to (N, P) related in the empirical system related in the numberical system
  • 13. Mapping M, maps (E, R) to (N, P) related in the empirical system related in the numberical system EXP : x rel y if M(x) rel M(y)
  • 14. EXP . Mapping measure, BIG X height=< Y height and X weight =< Y weight
  • 15. MONOTONICITY IF increase the value of attribute , the object Will not Reverse.
  • 16. MONOTONICITY IF increase the value of attribute , The object will not Reverse. Exp : 2 y = X Monotonicity X>0 And X<5 2 y = 5x - x Increaes X>=5 And X<10 Decrease Not Monotonicity
  • 17. MEASUREMENT SCALES There are five different scale types : nominal ordinal interval ratio absolute
  • 18. Normal This type basically assigns numbers or symbols without regard to any quantity
  • 19. Normal This type basically assigns numbers or symbols without regard to any quantity EXP:
  • 20. Ordinal there is an implied ordering of the entities by the numbers assigned to the entity
  • 21. Ordinal there is an implied ordering of the entities by the numbers assigned to the entity EXP: First – Second Not Equal 1 Second - third 2 3
  • 22. Interval the amount of the difference is constant
  • 23. Interval the amount of the difference is constant EXP: converting from a Celsius to a Fahrenheit Formule : 9.5 x +32
  • 24. Ratio the amount of the difference is constant and Well Zero
  • 25. absolute The absolute is a counting scale measure EXP:
  • 26. Product Metrics Product metrics are metrics that can be calculated from the document independent of how it was produced . The most basic metric for size is thelinesof code metric .
  • 27. McCABE’S CYCLOMATIC NUMBER introduced in 1976 . Use the Gragh Theory : C = E – N + 2 C = Cyclomatic number . E = number of Edges . N = number of Eodes .
  • 28. McCABE’S CYCLOMATIC NUMBER EXP : 5 1 4 3 2 E = 11 N = 8 C = 11 – 8 + 2 C = 5
  • 29. McCABE’S CYCLOMATIC NUMBER Calculating the cyclomatic number from control flow graphs is time-consuming . McCabe found a more direct Method of calculating his measure .
  • 30. McCABE’S CYCLOMATIC NUMBER Restriction : IN source Code : 1 decision IF , For , While Case or multiple Branch 1 less decision
  • 31. McCABE’S CYCLOMATIC NUMBER Restriction … : Control flow graphs are required to have a distinct starting node and a distinct stoppingnode Formula : C = D + 1 D = Sum of Decisions
  • 32. Example E = 2 D = 1 E = 2 D = 1 E = 3 D = 2 D = 4 C = 5 Complexity
  • 33. Threshold Value If the Complexity is greater than 10 , efforts should be made to reduce the value or to split the module
  • 34. HALSTEAD’S SOFTWARE SCIENCE He did his work in the late 1960s and 1970s. He empirically looked for measures of intrinsic size
  • 35. HALSTEAD’S SOFTWARE SCIENCE variables Operands constants commas parentheses Operator arithmetic operators brackets
  • 36. Basic Measures—η1 and η2 η = η1 + η2 η = total count of unique tokens Count of unique Operator η1 = Count of unique Operands η2 =
  • 37. Basic Measures—η1 and η2 Exp : z = 0; While x> 0 z = z + y ; x = x + 1; End –while ; Print(z) ; Operator = ; > + - Print () While-endwhile Operand z x y 0 1 η1 =8 η2 = 5 η = 13
  • 38. Length(N) N = N1 + N2 N = total count of tokens Count of Operator N1 = Count of Operands N2 =
  • 39. Length EXP : Operators = 3 ; 5 While 1 > 1 + 1 - 1 Print 1 () 1 Operands Z 4 X 3 Y 2 0 2 1 1 z = 0; While x> 0 z = z + y ; x = x + 1; End –while ; Print(z) ; N = N1 + N2 = 14+12 = 26
  • 40. Estimate of the Length(est N) η1 η2 est N = η1*log + η2*log 2 2
  • 41. Estimate of the Length(est N) η1 η2 est N = η1*log + η2*log 2 2 Exp : η1=8 , η2=5 est N = 8*3 +5*2.32 = 35.6
  • 42. Volume ( V ) Volume = number of bits (η1+ η2) V = N * Log 2
  • 43. Volume ( V ) Volume = number of bits (η1+ η2) V = N * Log 2 Exp: N = 26 , η1=8 , η2=5 13 V = 26 * Log = 96.2 2
  • 44. Potential Volume, V* Potential Volume = Min number of bits V* = (2 + η2*)log (2+ η2*) 2 η2* = The Minimal number of Operands
  • 45. Other Parameter Implementation Level : L = V* / V
  • 46. Other Parameter Implementation Level : L = V* / V Effort : E = V / L unit of Effors is emd
  • 47. Other Parameter Implementation Level : L = V* / V Effort : E = V / L unit of Effors is emd Time : T = E / S 18 emd / sec
  • 48. HENRY–KAFURA INFORMATION FLOW measure the intermodule complexity of source code . HK = Weight *(out * in ) i i i i In = into the module i Out = out the module i Weight = weight the module i
  • 49. HENRY–KAFURA INFORMATION FLOW Exp : Weight = 1 HK = 1110