+static test_return_t post_allocate(memcached_st *memc __attribute__((unused)))
+{
+ for (size_t x= 0; x < BENCHMARK_TEST_LOOP; x++)
+ {
+ if (benchmark_state.create_init)
+ memcached_free(&benchmark_state.create[x]);
+
+ if (benchmark_state.clone_init)
+ memcached_free(&benchmark_state.clone[x]);
+ }
+
+ free(benchmark_state.create);
+ free(benchmark_state.clone);
+
+ return TEST_SUCCESS;
+}
+
+
+test_st micro_tests[] ={
+ {"memcached_create", 1, (test_callback_fn)memcached_create_benchmark },
+ {"memcached_clone", 1, (test_callback_fn)memcached_clone_benchmark },
+ {0, 0, 0}
+};
+
+
+collection_st collection[] ={
+ {"smash", 0, 0, smash_tests},
+ {"smash_nonblock", (test_callback_fn)pre_nonblock, 0, smash_tests},
+ {"micro-benchmark", (test_callback_fn)pre_allocate, (test_callback_fn)post_allocate, micro_tests},
+ {0, 0, 0, 0}
+};
+
+
+#define SERVERS_TO_CREATE 5
+
+#include "libmemcached_world.h"
+