Description
The tool could provide an option to power-tune a given function considering only cold start invocations.
The current logic is based on aliases in order to maximize parallelism and optimize overall speed of the power-tuning process. Unfortunately, it also makes it hard to achieve cold-start-only tuning.
We could implement an alternative logic such as:
When parameter
forceColdStarts
(oronlyColdStarts
) is provided:
[Initializer] Do nothing (no alias or version needs to be created)
[Executor] Invoke $LATEST sequentially after forcing a cold start (by updating power config and an env variable)
This should work fine for all values of num
and any power value.
The only drawback is that nothing can be parallelized, which isn't a big issue as long as each invocation is short enough. For example, if the average cold invocation takes 5 seconds, with num=20
and 5 power values, the overall power-tuning process will take about 8 minutes. It's very easy to reach 40+ minutes with 10s invocations and num>50
.