Skip to content

sandykumar93/Lambda-Warm-Time-and-Memory-Benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

AWSLambda-Warm-Time-and-Memory-Benchmark

Simple python code to check lambda warm time and to benchmark memory
Run the python file - lambdabenchmark.py in Cloud9 with Lambda Invoke permission.

Validation points

  • The warm start execution time of a lambda is significantly lesser than the cold start execution.
  • As the memory is increased, the execution time decreases until a saturation memory is reached

The python code provides tests the lambda and provides data to validate the above mentioned points. Results are printed at adequate levels to provide the Lambda execution time and Memory consumptions.

Global Variables

Input

  • lambdaname - provide the lambda function name
  • memory - the list of memories you want to test against
  • payload - the payload to be sent to the lambda function
  • timeinmin - time intervals to test lambda warm time in minutes Output
  • results - all the results are stored in this variable

Python Functions

checkoptimalmemory()

Use this function to trigger lambda function with various memory values specified in the "memory" variable. It will provide the execution time for both "warm" and "cold" states.

WhatsApp Image 2019-08-24 at 7 42 44 AM

checkwarmtime()

Use this function to trigger lambda function with between time intervals specified in the "timeinmin" variable. It will provide the execution time for both "warm" and "cold" starts.

WhatsApp Image 2019-08-27 at 10 01 35 PM

About

Simple python code to check lambda warm time and to set memory benchmarks

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages