coroutine: add test-coroutine --benchmark-lifecyclecoroutine-core
commit19b13089834e655089258a339a83e20c08555be1
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Thu, 12 May 2011 07:27:39 +0000 (12 08:27 +0100)
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Mon, 25 Jul 2011 17:16:07 +0000 (25 18:16 +0100)
treef16f4ec8027b6fbe460e43a15a2370603e7ec69f
parent3a7f72f54505e1faf470fa8d679b207adce173ee
coroutine: add test-coroutine --benchmark-lifecycle

Add a microbenchmark for coroutine create, enter, and return (aka
lifecycle).  This is a useful benchmark because users are expected to
create many coroutines, one per I/O request for example, and we
therefore need to provide good performance in that scenario.

To run:

  make test-coroutine
  ./test-coroutine --benchmark-lifecycle 20000000

This will do 20,000,000 coroutine create, enter, return iterations and
print the resulting time.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
test-coroutine.c