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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

File details

Details for the file cocomoco-0.1.0.tar.gz.

File metadata

  • Download URL: cocomoco-0.1.0.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for cocomoco-0.1.0.tar.gz
Algorithm Hash digest
SHA256 02ef053c1ba7a62ce175948987af7ccdba1f4236325942d53fa92bc813ad6be3
MD5 1291a594b7b1d2d0f5e62a0c79a92f35
BLAKE2b-256 d13fce2ab51fdb5d5e91ec21e0f81134b822afa7b42d04481793a5edebecb1bf

See more details on using hashes here.

File details

Details for the file cocomoco-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: cocomoco-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.2

File hashes

Hashes for cocomoco-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6915080e7f0334292234a6278a62b0257e6f175c0351f0be06cd89a3d95f86a7
MD5 0f92b2fad2e632f5ad7dc9711a0c67c6
BLAKE2b-256 f1cc942beb959ec85fbc451ba18ec8603f13d1a1efccd158faf7cf195e283618

See more details on using hashes here.

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