From: Brian Aker Date: Sun, 15 Apr 2012 07:30:12 +0000 (-0700) Subject: Simplify down the benchmark caller. X-Git-Tag: 1.0.7~7^2^2^2~7 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=e43f018db5ff3167a060cd383f017147cebe68c2;p=awesomized%2Flibmemcached Simplify down the benchmark caller. --- diff --git a/tests/libmemcached-1.0/all_tests.h b/tests/libmemcached-1.0/all_tests.h index e6ce65d8..cd9b5163 100644 --- a/tests/libmemcached-1.0/all_tests.h +++ b/tests/libmemcached-1.0/all_tests.h @@ -282,7 +282,6 @@ test_st ketama_compatibility[]= { }; test_st generate_tests[] ={ - {"generate_pairs", true, (test_callback_fn*)generate_pairs }, {"generate_data", true, (test_callback_fn*)generate_data }, {"get_read", false, (test_callback_fn*)get_read }, {"delete_generate", false, (test_callback_fn*)delete_generate }, @@ -303,7 +302,6 @@ test_st generate_tests[] ={ }; test_st consistent_tests[] ={ - {"generate_pairs", true, (test_callback_fn*)generate_pairs }, {"generate_data", true, (test_callback_fn*)generate_data }, {"get_read", 0, (test_callback_fn*)get_read_count }, {"cleanup", true, (test_callback_fn*)cleanup_pairs }, @@ -311,7 +309,6 @@ test_st consistent_tests[] ={ }; test_st consistent_weighted_tests[] ={ - {"generate_pairs", true, (test_callback_fn*)generate_pairs }, {"generate_data", true, (test_callback_fn*)generate_data_with_stats }, {"get_read", false, (test_callback_fn*)get_read_count }, {"cleanup", true, (test_callback_fn*)cleanup_pairs }, diff --git a/tests/libmemcached-1.0/generate.cc b/tests/libmemcached-1.0/generate.cc index da31fe0c..4f1db4c9 100644 --- a/tests/libmemcached-1.0/generate.cc +++ b/tests/libmemcached-1.0/generate.cc @@ -66,7 +66,7 @@ test_return_t cleanup_pairs(memcached_st *memc) return TEST_SUCCESS; } -test_return_t generate_pairs(memcached_st *) +static test_return_t generate_pairs(memcached_st *) { global_pairs= pairs_generate(GLOBAL_COUNT, 400); global_count= GLOBAL_COUNT; @@ -96,6 +96,8 @@ test_return_t generate_large_pairs(memcached_st *) test_return_t generate_data(memcached_st *memc) { + test_compare(TEST_SUCCESS, generate_pairs(memc)); + unsigned int check_execute= execute_set(memc, global_pairs, global_count); test_compare_warn_hint(global_count, check_execute, "Possible false, positive, memcached may have ejected key/value based on memory needs"); @@ -105,6 +107,8 @@ test_return_t generate_data(memcached_st *memc) test_return_t generate_data_with_stats(memcached_st *memc) { + test_compare(TEST_SUCCESS, generate_pairs(memc)); + unsigned int check_execute= execute_set(memc, global_pairs, global_count); test_compare(check_execute, global_count); diff --git a/tests/libmemcached-1.0/generate.h b/tests/libmemcached-1.0/generate.h index eacb6026..bd4855a9 100644 --- a/tests/libmemcached-1.0/generate.h +++ b/tests/libmemcached-1.0/generate.h @@ -44,7 +44,6 @@ test_return_t generate_buffer_data(memcached_st*); test_return_t generate_data(memcached_st*); test_return_t generate_data_with_stats(memcached_st*); test_return_t generate_large_pairs(memcached_st *); -test_return_t generate_pairs(memcached_st*); test_return_t get_read(memcached_st*); test_return_t get_read_count(memcached_st*); test_return_t mget_read(memcached_st*);