yr.Context.getCPUNumber

yr.Context.getCPUNumber#

Context.getCPUNumber()[source]#

Get the number of cpu distributed to the running function the cpu number scale by millicores, one cpu cores equals 1000 millicores. In function stage runtime, every function have base of 200 millicores, and increased by memory size distributed to function. The offset is about Memory Size(M)/128 * 100

Returns:

The CPU resources occupied by the function.