Вы находитесь на странице: 1из 39

SoftwareMetrics Software Metrics

Friday,July15,2011

Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

Objective
Overviewofsoftwaremetrics Overview of software metrics Thebasicsofmeasurement Frameworkofsoftwaremeasurement k f f EmpiricalInvestigation

Friday,July15,2011

Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

Content
What is measurement Whatismeasurement Whatarethesoftwaremetrics? S Scopeofsoftwareengineeringmetrics:a f f i i i chronologicalreview.

Friday,July15,2011

Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

WhatisMeasurement What is Measurement


Measurement is the process by which numbers Measurementistheprocessbywhichnumbers orsymbolsareassignedtoattributesofentities intherealworld insuchawayastodescribe y themaccordingtoclearlydefinedrules entity:object(person or room) entity: object(personorroom) Event Journeyortestingphaseofasoftware project) Attribute propertyofanentity(colorofroom, costofjourney) cost of journey)
Friday,July15,2011 Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

MeasurementDefined Measurement Defined


Entity: Attribute:
Features & Properties

Mapping:
Numbers & Symbols
Friday,July15,2011 Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

MeasurementExample Meas rement E ample


8 7 6 5 4 3 2

color of marbles (attribute) of (entity)

mapping is the measurement

numerical representation of the attribute color


Friday,July15,2011 Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

MeasurementinEverydayLife Measurement in Everyday Life


It helps us to understand our world interact Ithelpsustounderstandourworld,interact withoursurroundingsandimproveourlives.
Economic indicators determine prices pay raises Economicindicatorsdetermineprices,payraises Medicalsystemdiagnosespecificillness Atmosphere weather prediction Atmosphereweatherprediction Journeycalculatedistance,speed

Friday,July15,2011

Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

MeasurementinEverydayLife Measurement in Everyday Life


Howdoweusemeasurementinourlives?
Inashop,priceisameasure ofthevalueofanitem, andwecalculatethebill tomakesurewegetthe correctchange. g Heightandsizemeasurements ensureclothingwillfit correctly. Wh t Whentraveling,wecalculatedistance,choosearoute, li l l t di t h t measurespeed,andpredictwhenwellarrive

Measurementhelpsusto: p
Understandourworld Interactwithoursurroundings Improveourlives l
Friday,July15,2011 Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

Some aspect descriptor allows us to compare Someaspectdescriptorallowsustocompare itwithothers(calculationaredonewithsetof rules) Price=oneitemwithother Di Distance=distancetraveltodistanceremaining di l di i i

Friday,July15,2011

Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

QuestionsthatareDifficulttoAnswer Questions that are Difficult to Answer


In a room with blue walls is blue ameasure Inaroomwithbluewallsis blue a measure ofthecoloroftheroom?. Height of the person is measurable but Heightofthepersonismeasurablebut intelligence?

Friday,July15,2011

Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

MeasurementinEverydayLife y y
MakingThingsMeasurable
Whatisnotmeasurable,makemeasurable(Galileo Galilei)
Oneaimofscienceistofindwaysofmeasuringattributesof thingswereinterestedin. Meas rement makes concepts more isible therefore more Measurementmakesconceptsmorevisible,thereforemore understandableandcontrollable. Attributespreviouslythoughttobeunmeasurable nowform basisfordecisionsaffectingourlives(e.g.,airquality,inflation index).

Measuringtheunmeasurableimprovesunderstanding ofparticularentities,attributes
A Actofproposingaparticularmeasurecanopendiscussion f i i l di i thatwillleadtogreaterunderstanding Makingnewmeasurementmayrequiringmodifying p ( g, g , g p environment orpractices(e.g.,usinganewtool,addingastep inaprocess)
Friday,July15,2011 Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

MakingThingsMeasurable Making Things Measurable


Measurement:direct quantifiation.egheight Measurement: directquantifiation.eg height ofthetree Calculation: indirect, quantification. Calculation: indirect,quantification. egcityinspectorsassignavaluationtoa house.factors numberofrooms,overallfloor house. factorsnumber of rooms , overall floor space. Two kinds of quantification: Twokindsofquantification:
Measurement Calculation
Friday,July15,2011 Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

MeasurementinSoftwareEngineering Measurement in Software Engineering


whymeasurementinsoftwareengineering. y g g SEactivitiesincludemanaging,costing,planning, modeling,analyzing,specifying,designing, implementing,testingandmaintaining. implementing testing and maintaining Engineeringapproacheachactivityisunderstood andcontrolled. and controlled. CSprovidesthetheoreticalfoundationfor buildingsoftware. SEfocusesonimplementingthesoftwareina controlledandscientificway.
Friday,July15,2011 Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

ImportanceofSE Importance of SE
Used in Usedin
oven, bankingtransaction g Airtrafficcontrol Sophisticatedpowerplants p p p Weapons Qualityoflifedependsonsoftware Worsetoomanystoriesaboutsoftwarethatput livesandbusinessesatrisk.
Friday,July15,2011 Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

MeasurementinotherEngineering Discipline l
EgDesigning electrical circuitstheories ohm Eg Designingelectricalcircuits theoriesohm law, describestherelationshipbetween resistance,currentandvoltage inthecircuit. Measuringthechangesinbehavior,measuring thecauseandeffect. Buildthecircuitwithspecificcurrentand resistance ,weknowvoltageisrequired Itsdifficulttoimagineelectrical,mechanical andcivilengineering withoutmeasurement
Friday,July15,2011 Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

MeasurementinSE Measurement in SE
Before measurement project can be planned Beforemeasurementprojectcanbeplanned
Objectiveandscope shouldbeestablished Alternative solution should be considered Alternativesolution shouldbeconsidered Technicalandmanagementconstraints shouldbe identified

Thisinformationisrequiredtoestimatecosts, projecttasksandprojectschedule. project tasks and project schedule

Friday,July15,2011

Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

ObjectivesforSoftwareMeasurement Objectives for Software Measurement


Measurement is not only useful but necessary Measurementisnotonlyusefulbutnecessary. Howcanyoutellifyourprojectishealthyif youhavenomeasuresofitshealth? you have no measures of its health? Someasurementisneededatleastor assessingthestatusofyourprojects,products, i h f j d processandresources. Measurementactionismotivatedbya particulargoal.
Friday,July15,2011 Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

KindofInformationneedtoManager Kind of Information need to Manager


What does each process cost? Whatdoeseachprocesscost?
Elicitingrequirements,specifying,designing,coding andtesting. and testing

Friday,July15,2011

Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

Productivityofstaff Productivity of staff


Howproductiveisthestaff? p Mangerfigureout,howproductivethestaffisateach activity.

Friday,July15,2011

Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

Howgoodisthecodebringdeveloped? g g p Measuresoftwarequality,comparedifferentproducts, predicttheeffectofchanges.

Friday,July15,2011

Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

Willtheuserbesatisfiedwiththeproduct? p Requirementrequestedhaveactuallybeen implementedproperly

Friday,July15,2011

Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

Howcanbeimprove? p Comparetwodesignmethod toseewhichoneyields thehigherqualitycode.

Friday,July15,2011

Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

Engineers
Aretherequirementtestable? Analyzeeachrequirementreliable Havewefoundallfaults? Measurethenumberoffaultsandfindtherootcauses Havewemetourproductorprocessgoal? Measurecharacteriticsofproductsandprocessmet standards(certification,egnomodulecontainmorethan100linesof ( , g code) Whatwillhappeninthefuture? Measuretheexistingandcurrentproductandpredictthefuture. g p p

Friday,July15,2011

Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

MeasuringforUnderstanding,Control andImprovement d
Measure help us for following three activities Measurehelpusforfollowingthreeactivities
Understand whathappenduringdevelopment andmaintenance. and maintenance Control whathappenontheproject,predict whathappenandmakechangestomeetourgoal. what happen and make changes to meet our goal. BasedonthedesignqualityImprove theprocess andproduct. p

Friday,July15,2011

Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

RoleofMeasurement Role of Measurement


Understand Control

Processes, Products & Services

Evaluate
Friday,July15,2011 Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

Predict

TheScopeofSoftwareMetrics The Scope of Software Metrics


Costandeffortestimation Productivitymeasures Datacollection Qualitymodelsandmeasures Q lit d l d Reliabilitymodels Performanceevaluationandmodels Performance evaluation and models Structuralandcomplexitymetrics Capabilitymaturityassessment Managementbymetrics Evaluationofmethodsantools
Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

Friday,July15,2011

1.CostandEffortEstimation 1.Cost and Effort Estimation


Manger role Mangerrole
Predicttheprojectcostandtime inplanningstage. Costestimationmodelslike COCOMO. Putnams. SLIMmodel. Effortismeasuredby Sizeoftheproduct,capabilityofdevelopers,levelofreuse Sizeidmeasuredby Size id measured by LinesofcodeorFunctionpoint

Friday,July15,2011

Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

2.ProductivityModelsand Measures
Therateofoutputperunitofinput The rate of output per unit of input Productivity=size/effort Productivity=LOC/personmonth d i i OC/ h Productivity Value
Cost

Friday,July15,2011

Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

Productivity

Productivity

Value Personnel Quality Quantity Time Reliability Defects Size Functionality Money HW

Cost

Resources

Complexity Env Cnstrst

Problem difficulty

SW

Friday,July15,2011

Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

3.DataCollection 3.Data Collection


Qualityofmeasurementprogramdependentondatacollection. y p g p Datacollectionmustbeplannedandexecutedinacarefuland sensitivemanner. I Itsessentialforscientificinvestigationofrelationshipandtrends. i lf i ifi i i i f l i hi d d Egsoftwarefailuredatacollection Time of failure Timeoffailure Timeintervalbetweenfailures Cumalative failureuptoagiventime. Failureexperiencedinatimeinterval

Friday,July15,2011

Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

4.QualityModelsandMeasures 4.Quality Models and Measures


Assessment of product quality speed of Assessmentofproductquality,speedof productionismeaningless. Quality combined with productivity Qualitycombinedwithproductivity. Measurethefactorintermsofdependent criteria i i
Egshirtmaterial

Friday,July15,2011

Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

QualityModelsandMeasures
Upperbrancheshighlevelqualityquantify Lowerlevelstructurednessandtraceability y Qualityfactor
Use Factor Usability Product Operatio n Reliability Efficiency Reusability
Completeness

Criteria
Communicativeness Accuracy Consistency Device Efficiency Accessibility

Metrics
Structuredness Conciseness Device Independence

Product Revisio n

Maintainability M i t i bilit Portability Testability

Legibility Self-descriptiveness

Friday,July15,2011

Prof.R.Charanya,AssistantProfessor,SITE, Traceability VITUniversity

5.ReliabilityModels 5.Reliability Models


Most quality models include reliability as a Mostqualitymodelsincludereliabilityasa componentfactor. The most famous model are basic exponential Themostfamousmodelarebasicexponential modelandlogarithmicpoissonmodel.
E ExponentialmodelassumesFinitefailurein ti l d l Fi it f il i infinitetime Logarithmic Poisson Model infinite failure LogarithmicPoissonModelinfinitefailure

Friday,July15,2011

Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

6.PerformanceEvaluationan Models
Performance is another aspect of quality isanotheraspectofquality. Responsetimeandcompletionrates. Efficiencyofalgorithm ffi i f l ih

Friday,July15,2011

Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

7.StructuralandComplexity Metrics
Quality like reliability and maintainability Qualitylikereliabilityandmaintainability cannotbemeasureduntilcodeisavailable. We able to predict which part of software Weabletopredictwhichpartofsoftware systemlessreliable ,moredifficulttotest, evenbeforethesystemiscomplete. even before the system is complete Inadvancewetrytoestablish,predictive theoriestosupportqualityassurance,quality h i li li control,qualityprediction.
Friday,July15,2011 Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

StructuralandcomplexityMetrics Structural and complexity Metrics


Complexity metric Complexitymetric
Cyclomaticcomplexity(McCabe1989)defining thenumberofindependentpath inexecutionof the number of independent path in execution of aprogram.

Friday,July15,2011

Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

8.ManagementbyMetrics 8.Management by Metrics


Measurement is important in SPM MeasurementisimportantinSPM. Customeranddeveloperrelyon, measurementbasedchartsandgraphsto measurement based charts and graphs to decideIftheprojectisontrack. P j Projectcanbecomparedandcontrasted,by b d d d b standardsofmeasurementandtestingreport. CustomerisnotwellversedInsoftware terminology,someasurementcanpainta pictureofprogressingeneral,understandable terms
Friday,July15,2011 Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

9.EvaluationofMethodsandTools 9.Evaluation of Methods and Tools


Many article and book describe new methods Manyarticleandbookdescribenewmethods andtools ,thatmakemoreproductiveand yourproductsbetterandcheaper. your products better and cheaper Manyorgperformexperiment ,runcase studiesoradministrativesurveytohelpthem studies or administrative survey to help them decide whetheramethodatoolismakea positivedifferenceinparticularsituation. positive difference in particular situation Successdependsongoodexperiemental
Friday,July15,2011 Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

10.CapabilityMaturityAssessment 10.Capability Maturity Assessment


US Software Engineering Institute (SEI) model USSoftwareEngineeringInstitute(SEI)model (1989):CMMgradingusingfivelevelscalefor softwaredevelopmentandmaintenance. software development and maintenance Level1Initail L l2 R Level2Repeatable bl Level3Defined Level4Managed Level5 Level 5 optimizing
Friday,July15,2011 Prof.R.Charanya,AssistantProfessor,SITE, VITUniversity

Вам также может понравиться