Calculate person-months of effort in the package #62
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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