forked from cory/tildefriends
libuv 1.45.0, #include cleanup, probably something else.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4308 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
9
deps/libuv/test/benchmark-queue-work.c
vendored
9
deps/libuv/test/benchmark-queue-work.c
vendored
@ -46,6 +46,7 @@ static void after_work_cb(uv_work_t* req, int status) {
|
||||
static void timer_cb(uv_timer_t* handle) { done = 1; }
|
||||
|
||||
BENCHMARK_IMPL(queue_work) {
|
||||
char fmtbuf[2][32];
|
||||
uv_timer_t timer_handle;
|
||||
uv_work_t work;
|
||||
uv_loop_t* loop;
|
||||
@ -60,9 +61,11 @@ BENCHMARK_IMPL(queue_work) {
|
||||
ASSERT_EQ(0, uv_queue_work(loop, &work, work_cb, after_work_cb));
|
||||
ASSERT_EQ(0, uv_run(loop, UV_RUN_DEFAULT));
|
||||
|
||||
printf("%s async jobs in %.1f seconds (%s/s)\n", fmt(events), timeout / 1000.,
|
||||
fmt(events / (timeout / 1000.)));
|
||||
printf("%s async jobs in %.1f seconds (%s/s)\n",
|
||||
fmt(&fmtbuf[0], events),
|
||||
timeout / 1000.,
|
||||
fmt(&fmtbuf[1], events / (timeout / 1000.)));
|
||||
|
||||
MAKE_VALGRIND_HAPPY();
|
||||
MAKE_VALGRIND_HAPPY(loop);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user