]> git.proxmox.com Git - mirror_qemu.git/commit - tests/test-coroutine.c
test-coroutine: test cost introduced by coroutine
authorMing Lei <ming.lei@canonical.com>
Wed, 13 Aug 2014 10:08:47 +0000 (18:08 +0800)
committerKevin Wolf <kwolf@redhat.com>
Wed, 20 Aug 2014 09:51:28 +0000 (11:51 +0200)
commit61ff8cfbec64f08f6955fe04649665f9f7eb0cc6
tree05aea60baf0da5d8042de030ef5bdd84f935bc08
parenta1cb48a3bffdb62c429297ac7057d1ce76fc4839
test-coroutine: test cost introduced by coroutine

This test runs dummy function with coroutine by using
two enter and one yield since which is a common usage.

So we can see the cost introduced by corouting for running
one function, for example:

Run operation 20000000 iterations 4.841071 s, 4131K operations/s
242ns per coroutine

Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
tests/test-coroutine.c