My test is based on firecracker@23b4387 on console branch and firerunner@bca73a7 on integrate branch.
This workaround works when the guest has one vcpu. But the loop effectively becomes an infinite loop if a guest has two vcpus because time.clock() always return the same value. Under the hood, for python2, time.clock() calls clock_gettime with clock id CLOCK_PROCESS_CPUTIME_ID
Due to #18 , I tried this alternative approach with commit shown below:
My test is based on
firecracker@23b4387
onconsole
branch andfirerunner@bca73a7
onintegrate
branch.This workaround works when the guest has one vcpu. But the loop effectively becomes an infinite loop if a guest has two vcpus because time.clock() always return the same value. Under the hood, for python2,
time.clock()
callsclock_gettime
with clock idCLOCK_PROCESS_CPUTIME_ID