cf-abacus icon indicating copy to clipboard operation
cf-abacus copied to clipboard

SLACK months are 31 days

Open hsiliev opened this issue 7 years ago • 3 comments

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.

hsiliev avatar Apr 01 '17 19:04 hsiliev

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.

cf-gitbot avatar Apr 01 '17 19:04 cf-gitbot

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 avatar Apr 07 '17 18:04 rajkiranrbala

@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

hsiliev avatar Apr 07 '17 18:04 hsiliev