Skip to main content

Cocomo Metric Calculator

Project description

Cocomoco

  • E is the Effort in staff months
  • a and b are coefficients to be determined
  • KLOC is thousands of lines of code (NOTE: cocomoco uses LOC, do not enter kloc values)

With cocomoco, to calculate the effort for 100000 lines of code using the organic model: print(cocomoco.calculate(100000).effort) -> 302.1 (person-months).

Project Development Time, Staff Size & Productivity

Development Time

  • DTime is time for development
  • c and d are constants to be determined
  • E is the effort

With cocomoco, to calculate the development time for 100000 lines of code using the organic model: print(cocomoco.calculate(100000).dtime) -> 21.9 (months).

Staff Size

Average staff size can be calculated in the following way:

Remember: Effort == Staff Months & Dtime == Months -> divide both cancel the months and staff remains!

With cocomoco, to calculate the average staff size for 100000 lines of code using the organic model: print(cocomoco.calculate(100000).staff) -> 14 number of average staff size.

Productivity

How many lines of code per staff month can be calculated via:

With cocomoco, to calculate the staff productivity for 100000 lines of code using the organic model: print(cocomoco.calculate(100000).sloc_per_staff_month) -> 331 lines of code per staff member and month.

Models

Standard Models

Models define the coefficients a and b for typical projects.

  • Organic
    • 2-50 KLOC
    • stable dev
    • little innovation
  • Semidetached
    • 50-300 KLOC
    • average abilities
    • medium time-constraints
  • Embedded
    • larger 300 KLOC
    • large project team
    • complex
    • innovative
    • severe constraints

Standard Constants

Organic:

  • a: 2.4
  • b: 1.05
  • c: 2.5
  • d: 0.38

Semidetached:

  • a: 3.0
  • b: 1.12
  • c: 2.5
  • d: 0.35

Embedded:

  • a: 3.6
  • b: 1.2
  • c: 2.5
  • d: 0.32

Intermediate Models

Intermediate cocomo introduces cost drivers to the standard models.

  • Product Attributes
    • RELY Required Software Reliability
    • DATA Data Base Size
    • CPLX Product Complexity
  • Computer Attributes
    • TIME Execution Time Constraint
    • STOR Main Storage Constraint
    • VIRT Virtual Machine Volatility
    • TURN Computer Turnaround Time
  • Personnel Attributes
    • ACAP Analyst Capability
    • AEXP Application Experience
    • PCAP Programming Capability
    • VEXP Virtual Machine Experience
    • LEXP Programming Language Experience
  • Project Attributes
    • MODP Modern Programming Practices
    • TOOL Use of Software Tools
    • SCED Required Development Schedule

Cocomo commes with a predefined set of values in the following categories: very low, low, nominal, high, very high, extra high.

Show Case

Following charts are created via python3 -m cocomoco --demo-mode:

Effort 100k -> 500k LOC

image

Producticity 100k -> 500k LOC

image

Installation

Simple install this module via pip (pip for Python 2 is also supported)

pip3 install --user cocomoco

Usage

As Python Module

import cocomoco

result = cocomoco.calculate(100000)
print(result)

As Python Executable

$ python3 -m cocomoco --sloc <number> [--model <modelname>]

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cocomoco-0.1.0.tar.gz (7.4 kB view hashes)

Uploaded source

Built Distribution

cocomoco-0.1.0-py2.py3-none-any.whl (6.9 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page