OSDN Git Service

coroutine: add test-coroutine --benchmark-lifecycle
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Thu, 12 May 2011 07:27:39 +0000 (08:27 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 2 Aug 2011 13:53:40 +0000 (15:53 +0200)
commit5e3840ce24040cbd1957008489cbc136c43ca391
tree22ee331833fc285b99da325790c0edc418ab0aa7
parentaa7ee42ed3b2c196de9f390fc9a5e339dd7417e3
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