Closed sarslanhan closed 6 years ago
That sounds good to me. Since we don't export anything in the stats
directory, what do you think about adding an index.js
to there, exporting the EWMA code there, and then updating index.js
to export EWMA from stats to the root level? We could also do that for the other code in stats as well, since the sample implementations could be useful as well. On the other hand, I would also be 👍 on a tactical approach of simply exposing EWMA for now.
One small reminder for myself is that we'll want to update the typescript definitions (which were just added by #44) as well, I can do that your PR if you like, otherwise i'm 👍 if you'd like to take care of that as well.
@tolbertam please see the pull request I just submitted.
I did not include the type definitions for BinaryHeap as it is not yet exported.
Fixed by #47, thanks for your contribution @sarslanhan !
We have a use case that needs the last 60 minute rate. To do this, we would like to extend the meter implementation and add another field (although we are also open to suggestions). To do this without any duplication we need the EWMA module exported in the main file.
We are happy to submit a PR if you are on board.