cf-abacus
cf-abacus copied to clipboard
SLACK months are 31 days
Setting SLACK=2M
now equals SLACK=62d
. This is mostly true except for February.
We should calculate the slack with moment as it gives accurate results for slack windows spanning across February.
We have created an issue in Pivotal Tracker to manage this:
https://www.pivotaltracker.com/story/show/142899567
The labels on this github issue will be updated when the story is started.
If I remember correctly, @betafood was saying that it was to consider the maximum days for a slack window.
@hsiliev Can you point me to the code ?
@rajkiranrbala The relevant snippet can be found in accumulator, dedupe and renewer: https://github.com/cloudfoundry-incubator/cf-abacus/search?utf8=%E2%9C%93&q=msDimensions&type=
I guess if we change these 3 places to use moment.subtract we can go with month window that adapts to the month length. Something like the code we had in this test: https://github.com/cloudfoundry-incubator/cf-abacus/commit/c1e107f21917965b390ae6a9f36f3196bdfe22f1