From: Andrew Tridgell Date: Thu, 19 Apr 2007 02:43:19 +0000 (+1000) Subject: merge from ronnie X-Git-Tag: tevent-0.9.20~348^2~2869 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=eeb3f01e026750bca8dc2f1cbdab5a812dbf89eb;p=thirdparty%2Fsamba.git merge from ronnie remove unused bench_incr function in ctdb_bench.c (This used to be ctdb commit 39424cb13070c9964121b533a9f9ba448ce49d16) --- eeb3f01e026750bca8dc2f1cbdab5a812dbf89eb diff --cc ctdb/tests/ctdb_bench.c index 5df680f8ff0,5df680f8ff0..02fcc1f2d45 --- a/ctdb/tests/ctdb_bench.c +++ b/ctdb/tests/ctdb_bench.c @@@ -45,7 -45,7 +45,6 @@@ static double end_timer(void static int timelimit = 10; static int num_records = 10; static int num_msgs = 1; --static int num_repeats = 100; enum my_functions {FUNC_INCR=1, FUNC_FETCH=2}; @@@ -78,51 -78,51 +77,6 @@@ static int fetch_func(struct ctdb_call_ return 0; } --/* -- benchmark incrementing an integer --*/ --static void bench_incr(struct ctdb_context *ctdb, struct ctdb_db_context *ctdb_db) --{ -- int loops=0; -- int ret, i; -- struct ctdb_call call; -- -- ZERO_STRUCT(call); -- -- start_timer(); -- -- while (1) { -- uint32_t v = loops % num_records; -- -- call.call_id = FUNC_INCR; -- call.key.dptr = (uint8_t *)&v; -- call.key.dsize = 4; -- -- for (i=0;i timelimit) break; -- printf("Incr: %.2f ops/sec\r", num_repeats*loops/end_timer()); -- fflush(stdout); -- } -- } -- -- call.call_id = FUNC_FETCH; -- -- ret = ctdb_call(ctdb_db, &call); -- if (ret == -1) { -- printf("ctdb_call FUNC_FETCH failed - %s\n", ctdb_errstr(ctdb)); -- return; -- } -- -- printf("Incr: %.2f ops/sec (loops=%d val=%d)\n", -- num_repeats*loops/end_timer(), loops, *(uint32_t *)call.reply_data.dptr); --} static int msg_count; static int msg_plus, msg_minus;