]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
merge from ronnie
authorAndrew Tridgell <tridge@samba.org>
Thu, 19 Apr 2007 02:43:19 +0000 (12:43 +1000)
committerAndrew Tridgell <tridge@samba.org>
Thu, 19 Apr 2007 02:43:19 +0000 (12:43 +1000)
remove unused bench_incr function in ctdb_bench.c

(This used to be ctdb commit 39424cb13070c9964121b533a9f9ba448ce49d16)

1  2 
ctdb/tests/ctdb_bench.c

index 5df680f8ff07e8266c9e78d3cb35903f17fd725a,5df680f8ff07e8266c9e78d3cb35903f17fd725a..02fcc1f2d458234363c095505a9dde534e1c1206
@@@ -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<num_repeats;i++) {
--                      ret = ctdb_call(ctdb_db, &call);
--                      if (ret != 0) {
--                              printf("incr call failed - %s\n", ctdb_errstr(ctdb));
--                              return;
--                      }
--              }
--              if (num_repeats * (++loops) % 10000 == 0) {
--                      if (end_timer() > 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;