cocomo

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package cocomo implements COCOMO II effort estimation for software projects. COCOMO (Constructive Cost Model) estimates development effort based on lines of code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EstimateEffort

func EstimateEffort(linesOfCode int, cfg Config) time.Duration

EstimateEffort calculates development effort based on lines of code.

The formula used is: Effort = Multiplier × (KLOC)^Exponent where KLOC is thousands of lines of code.

The result is in person-months, which we convert to hours by multiplying by 152 (a standard industry conversion: 1 person-month = 152 hours).

Parameters:

  • linesOfCode: The number of lines of code written
  • cfg: COCOMO configuration parameters

Returns:

  • Effort in hours (never less than config.MinimumEffort)

Types

type Config

type Config struct {
	// Multiplier is the base effort coefficient (default: 2.94)
	Multiplier float64

	// Exponent is the scale factor (default: 1.0997)
	Exponent float64

	// MinimumEffort is the minimum effort in minutes (default: 20)
	MinimumEffort time.Duration
}

Config holds parameters for COCOMO II effort estimation. These defaults are based on the COCOMO II model for organic projects.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns COCOMO II configuration with standard values.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL