increase_reads_in_percent calculations are incorrect. #40

Closed
alxmrtn opened this Issue May 13, 2013 · 1 comment

Projects

None yet

2 participants

@alxmrtn
alxmrtn commented May 13, 2013

On line 46 in calculators.py in the function increase_reads_in_percent, you have

increase = int(
    float(current_provisioning)*(float(percent)/100+1))
updated_provisioning = current_provisioning + increase

it should just be

increase = int(float(current_provisioning)*(float(percent)/100))
updated_provisioning = current_provisioning + increase

or alternatively

updated_provisioning = int(float(current_provisioning)*(float(percent)/100+1))
@sebdah sebdah was assigned May 14, 2013
@sebdah sebdah added a commit that referenced this issue May 14, 2013
@sebdah Fixes a calc bug pointed out in #40 266c28a
@sebdah sebdah closed this May 14, 2013
@sebdah
Owner
sebdah commented May 14, 2013

Thanks for the feedback @alxmrtn. I have released Dynamic DynamoDB version 1.3.2 to PyPI containing this fix. Just do a pip install -U dynamic-dynamodb to upgrade to the latest release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment