Skip to content

Conversation

@mukileshPira
Copy link
Contributor

In case of lambda where there are pause times, it should be considered when calculating active time. Essentially total pause time should be removed from [end-start]. Earlier we were considering the last sample time to be the end of the profile but in some corner cases where there is huge pause after that we would include it in the calculation even though pause is after the "end" of the profile.

So updating the way we calculate "end" of the profile. For more detailed information, please have a look at the comments.

Also, added some debug logs.

In case of lambda where there are pause times, it should be considered when calculating active time. Essentially total pause time should be removed from [end-start]. Earlier we were considering the last sample time to be the end of the profile but in some corner cases where there is huge pause after that we would include it in the calculation even though pause is after the "end" of the profile.

So updating the way we calculate "end" of the profile. For more detailed information, please have a look at the comments.

Also, added some debug logs.
@mirelap-amazon mirelap-amazon requested a review from a team July 8, 2021 11:12
Copy link
Contributor

@mirelap-amazon mirelap-amazon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good, but please take a look at the failing unit tests.

@mirelap-amazon mirelap-amazon requested a review from a team July 8, 2021 15:10
Copy link
Contributor

@PapaPedro PapaPedro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, I just realized about the other race condition that could happen, not sure it is possible but maybe we could try to handle it too

@mukileshPira mukileshPira merged commit d55e0b9 into aws:main Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants