This pull request changes the calculation of person-months from relying on the tool located at http://softwarecost.org/tools/COCOMO/ to calculating it within the package using the same settings. The labor hours calculation is rounded to the tenths to be consistent with the output of the previous method.
If there is an issue with connecting to the above tool it will cause an unrecoverable failure when using this tool from the CLI. This is especially painful if working over a large number of projects. Since this is a relatively straightforward calculation I thought it prudent to just implement calculating person-months in the package to remove the need to query the tool entirely.
Note: There is a difference in the calculated labor hours value because the above tool rounds the person-months output to the tenths while we have the raw value when calculating it locally. PHP (what the tool appears to be written in) has a default of PHP_ROUND_HALF_UP in the round() function which has the following description:
Rounds num away from zero when it is half way there, making 1.5 into 2 and -1.5 into -2.
This pull request changes the calculation of person-months from relying on the tool located at http://softwarecost.org/tools/COCOMO/ to calculating it within the package using the same settings. The labor hours calculation is rounded to the tenths to be consistent with the output of the previous method.
If there is an issue with connecting to the above tool it will cause an unrecoverable failure when using this tool from the CLI. This is especially painful if working over a large number of projects. Since this is a relatively straightforward calculation I thought it prudent to just implement calculating person-months in the package to remove the need to query the tool entirely.
Note: There is a difference in the calculated labor hours value because the above tool rounds the person-months output to the tenths while we have the raw value when calculating it locally. PHP (what the tool appears to be written in) has a default of
PHP_ROUND_HALF_UP
in theround()
function which has the following description:Using the CLOC of this branch:
Old implementation:
Person-months: 10.4
New implementation:
Person-months: 10.390646842135041