Closed mk0sojo closed 2 years ago
@mk0sojo thanks for sharing, Jonas!
Some context first :)
Currently, the tool is excluding "outliers" with a trimmed mean - basically the top and bottom 20% of executions are discarded. This helps you reason about the largest majority of your Lambda executions and optimize cost/performance without the bias of cold starts.
Because the tool treats your function as a black box, it's hard to precisely identify cold starts (versus other cases, especially with complex inputs or downstream dependencies).
Last but not least, I feel like AWS is already providing the best tools to identify cold starts - have a look at AWS X-Ray and the recently announced CloudWatch Lambda Insights.
Ideally, I'd like to make sure that Lambda Power Tuning integrates with CloudWatch Lambda Insights so you can get the best of both tools.
Closing for now, as the tool is not intended for generating cold start statistics. #114 is still open and will let you optionally disable the trimmed mean behavior.
It would have been very useful to get some statistics on cold starts in the output. Both the AWS init time and the custom initialisation code would be interesting to see how much it differs with different memory configurations