From 77fc9c3ba95eb502d1a66146251acfcfd5606df8 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 23 Nov 2020 18:11:43 +0100 Subject: [PATCH] bin: move memaslap to contrib --- CMake/_Include.cmake | 1 + src/bin/CMakeLists.txt | 20 +- src/bin/common/CMakeLists.txt | 2 +- src/bin/common/client_options.h | 49 ----- src/bin/common/generator.cc | 98 ---------- src/bin/common/generator.h | 36 ---- src/bin/common/utilities.cc | 195 -------------------- src/bin/common/utilities.h | 64 ------- src/bin/contrib/CMakeLists.txt | 21 +++ src/bin/{ => contrib}/memaslap.c | 0 src/bin/{ => contrib}/memaslap/ms_atomic.h | 0 src/bin/{ => contrib}/memaslap/ms_conn.c | 0 src/bin/{ => contrib}/memaslap/ms_conn.h | 0 src/bin/{ => contrib}/memaslap/ms_memslap.h | 0 src/bin/{ => contrib}/memaslap/ms_setting.c | 0 src/bin/{ => contrib}/memaslap/ms_setting.h | 0 src/bin/{ => contrib}/memaslap/ms_sigsegv.c | 0 src/bin/{ => contrib}/memaslap/ms_sigsegv.h | 0 src/bin/{ => contrib}/memaslap/ms_stats.c | 0 src/bin/{ => contrib}/memaslap/ms_stats.h | 0 src/bin/{ => contrib}/memaslap/ms_task.c | 0 src/bin/{ => contrib}/memaslap/ms_task.h | 0 src/bin/{ => contrib}/memaslap/ms_thread.c | 0 src/bin/{ => contrib}/memaslap/ms_thread.h | 0 src/bin/memcapable.cc | 5 +- src/bin/memstat.cc | 1 - 26 files changed, 27 insertions(+), 465 deletions(-) delete mode 100644 src/bin/common/client_options.h delete mode 100644 src/bin/common/generator.cc delete mode 100644 src/bin/common/generator.h delete mode 100644 src/bin/common/utilities.cc delete mode 100644 src/bin/common/utilities.h create mode 100644 src/bin/contrib/CMakeLists.txt rename src/bin/{ => contrib}/memaslap.c (100%) rename src/bin/{ => contrib}/memaslap/ms_atomic.h (100%) rename src/bin/{ => contrib}/memaslap/ms_conn.c (100%) rename src/bin/{ => contrib}/memaslap/ms_conn.h (100%) rename src/bin/{ => contrib}/memaslap/ms_memslap.h (100%) rename src/bin/{ => contrib}/memaslap/ms_setting.c (100%) rename src/bin/{ => contrib}/memaslap/ms_setting.h (100%) rename src/bin/{ => contrib}/memaslap/ms_sigsegv.c (100%) rename src/bin/{ => contrib}/memaslap/ms_sigsegv.h (100%) rename src/bin/{ => contrib}/memaslap/ms_stats.c (100%) rename src/bin/{ => contrib}/memaslap/ms_stats.h (100%) rename src/bin/{ => contrib}/memaslap/ms_task.c (100%) rename src/bin/{ => contrib}/memaslap/ms_task.h (100%) rename src/bin/{ => contrib}/memaslap/ms_thread.c (100%) rename src/bin/{ => contrib}/memaslap/ms_thread.h (100%) diff --git a/CMake/_Include.cmake b/CMake/_Include.cmake index 9f983784..67917c8e 100644 --- a/CMake/_Include.cmake +++ b/CMake/_Include.cmake @@ -38,6 +38,7 @@ check_debug() if(ENABLE_MEMASLAP) check_stdatomic() check_dependency(LIBEVENT event event.h) + check_dependency(LIBMATH m math.h) check_decl(getline stdio.h) if(HAVE_LIBEVENT AND HAVE_C_STDATOMIC) set(HAVE_MEMASLAP 1) diff --git a/src/bin/CMakeLists.txt b/src/bin/CMakeLists.txt index b4868b4b..0dea2a88 100644 --- a/src/bin/CMakeLists.txt +++ b/src/bin/CMakeLists.txt @@ -23,22 +23,6 @@ target_link_libraries(memcapable PRIVATE Threads::Threads) target_link_libraries(memping PRIVATE libmemcachedutil) target_link_libraries(memslap PRIVATE Threads::Threads) -# memaslap is special +# contrib -if(HAVE_MEMASLAP) - add_executable(memaslap memaslap.c - memaslap/ms_conn.c - memaslap/ms_setting.c - memaslap/ms_sigsegv.c - memaslap/ms_stats.c - memaslap/ms_task.c - memaslap/ms_thread.c) - target_include_directories(memaslap PRIVATE memaslap) - target_link_libraries(memaslap PRIVATE libclient_common Threads::Threads ${LIBEVENT}) - if(CMAKE_INSTALL_RPATH) - set_target_properties(${CLIENT} PROPERTIES - INSTALL_RPATH ${CMAKE_INSTALL_RPATH}/../${CMAKE_INSTALL_LIBDIR}) - endif() - install(TARGETS memaslap - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) -endif() +add_subdirectory(contrib) diff --git a/src/bin/common/CMakeLists.txt b/src/bin/common/CMakeLists.txt index 973152d1..c5b4faa5 100644 --- a/src/bin/common/CMakeLists.txt +++ b/src/bin/common/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(libclient_common STATIC utilities.cc generator.cc options.cpp checks.hpp) +add_library(libclient_common STATIC options.cpp checks.hpp random.hpp time.hpp) add_library(client_common ALIAS libclient_common) set_target_properties(libclient_common PROPERTIES CXX_STANDARD ${CXX_STANDARD}) target_link_libraries(libclient_common PUBLIC libmemcached) diff --git a/src/bin/common/client_options.h b/src/bin/common/client_options.h deleted file mode 100644 index a3e38252..00000000 --- a/src/bin/common/client_options.h +++ /dev/null @@ -1,49 +0,0 @@ -/* - +--------------------------------------------------------------------+ - | libmemcached - C/C++ Client Library for memcached | - +--------------------------------------------------------------------+ - | Redistribution and use in source and binary forms, with or without | - | modification, are permitted under the terms of the BSD license. | - | You should have received a copy of the license in a bundled file | - | named LICENSE; in case you did not receive a copy you can review | - | the terms online at: https://opensource.org/licenses/BSD-3-Clause | - +--------------------------------------------------------------------+ - | Copyright (c) 2006-2014 Brian Aker https://datadifferential.com/ | - | Copyright (c) 2020 Michael Wallner | - +--------------------------------------------------------------------+ -*/ - -#pragma once - -typedef struct memcached_help_text_st memcached_help_text_st; - -enum memcached_options { - OPT_SERVERS = 's', - OPT_VERSION = 'V', - OPT_HELP = 'h', - OPT_VERBOSE = 'v', - OPT_DEBUG = 'd', - OPT_ANALYZE = 'a', - OPT_FLAG = 257, - OPT_EXPIRE, - OPT_SET, - OPT_REPLACE, - OPT_ADD, - OPT_SLAP_EXECUTE_NUMBER, - OPT_SLAP_INITIAL_LOAD, - OPT_SLAP_TEST, - OPT_SLAP_CONCURRENCY, - OPT_SLAP_NON_BLOCK, - OPT_SLAP_TCP_NODELAY, - OPT_FLUSH, - OPT_HASH, - OPT_BINARY, - OPT_UDP, - OPT_BUFFER, - OPT_USERNAME, - OPT_PASSWD, - OPT_STAT_ARGS, - OPT_SERVER_VERSION, - OPT_QUIET, - OPT_FILE = 'f' -}; diff --git a/src/bin/common/generator.cc b/src/bin/common/generator.cc deleted file mode 100644 index 6b4c3f9f..00000000 --- a/src/bin/common/generator.cc +++ /dev/null @@ -1,98 +0,0 @@ -/* - +--------------------------------------------------------------------+ - | libmemcached - C/C++ Client Library for memcached | - +--------------------------------------------------------------------+ - | Redistribution and use in source and binary forms, with or without | - | modification, are permitted under the terms of the BSD license. | - | You should have received a copy of the license in a bundled file | - | named LICENSE; in case you did not receive a copy you can review | - | the terms online at: https://opensource.org/licenses/BSD-3-Clause | - +--------------------------------------------------------------------+ - | Copyright (c) 2006-2014 Brian Aker https://datadifferential.com/ | - | Copyright (c) 2020 Michael Wallner | - +--------------------------------------------------------------------+ -*/ - -#include "mem_config.h" - -#include - -#include -#include -#include -#include -#include - -#include "generator.h" - -#define KEY_BYTES 20 - -/* Use this for string generation */ -static const char ALPHANUMERICS[] = "0123456789ABCDEFGHIJKLMNOPQRSTWXYZabcdefghijklmnopqrstuvwxyz"; - -#define ALPHANUMERICS_SIZE (sizeof(ALPHANUMERICS) - 1) - -static size_t get_alpha_num(void) { - return (size_t) random() % ALPHANUMERICS_SIZE; -} - -void get_random_string(char *buffer, size_t size) { - char *buffer_ptr = buffer; - - while (--size) { - *buffer_ptr++ = ALPHANUMERICS[get_alpha_num()]; - } - *buffer_ptr++ = ALPHANUMERICS[get_alpha_num()]; -} - -void pairs_free(pairs_st *pairs) { - if (pairs == NULL) { - return; - } - - /* We free until we hit the null pair we stores during creation */ - for (uint32_t x = 0; pairs[x].key; x++) { - free(pairs[x].key); - if (pairs[x].value) { - free(pairs[x].value); - } - } - - free(pairs); -} - -pairs_st *pairs_generate(uint64_t number_of, size_t value_length) { - pairs_st *pairs = (pairs_st *) calloc((size_t) number_of + 1, sizeof(pairs_st)); - - if (pairs == NULL) { - goto error; - } - - for (uint64_t x = 0; x < number_of; x++) { - pairs[x].key = (char *) calloc(KEY_BYTES, sizeof(char)); - - if (pairs[x].key == NULL) - goto error; - - get_random_string(pairs[x].key, KEY_BYTES); - pairs[x].key_length = KEY_BYTES; - - if (value_length) { - pairs[x].value = (char *) calloc(value_length, sizeof(char)); - - if (pairs[x].value == NULL) - goto error; - - get_random_string(pairs[x].value, value_length); - pairs[x].value_length = value_length; - } else { - pairs[x].value = NULL; - pairs[x].value_length = 0; - } - } - - return pairs; -error: - std::cerr << "Memory Allocation failure in pairs_generate." << std::endl; - exit(EXIT_SUCCESS); -} diff --git a/src/bin/common/generator.h b/src/bin/common/generator.h deleted file mode 100644 index b6758d5a..00000000 --- a/src/bin/common/generator.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - +--------------------------------------------------------------------+ - | libmemcached - C/C++ Client Library for memcached | - +--------------------------------------------------------------------+ - | Redistribution and use in source and binary forms, with or without | - | modification, are permitted under the terms of the BSD license. | - | You should have received a copy of the license in a bundled file | - | named LICENSE; in case you did not receive a copy you can review | - | the terms online at: https://opensource.org/licenses/BSD-3-Clause | - +--------------------------------------------------------------------+ - | Copyright (c) 2006-2014 Brian Aker https://datadifferential.com/ | - | Copyright (c) 2020 Michael Wallner | - +--------------------------------------------------------------------+ -*/ - -#pragma once - -typedef struct pairs_st pairs_st; - -struct pairs_st { - char *key; - size_t key_length; - char *value; - size_t value_length; -}; - -#ifdef __cplusplus -extern "C" { -#endif - -pairs_st *pairs_generate(uint64_t number_of, size_t value_length); -void pairs_free(pairs_st *pairs); - -#ifdef __cplusplus -} // extern "C" -#endif diff --git a/src/bin/common/utilities.cc b/src/bin/common/utilities.cc deleted file mode 100644 index b0a0f1b1..00000000 --- a/src/bin/common/utilities.cc +++ /dev/null @@ -1,195 +0,0 @@ -/* - +--------------------------------------------------------------------+ - | libmemcached - C/C++ Client Library for memcached | - +--------------------------------------------------------------------+ - | Redistribution and use in source and binary forms, with or without | - | modification, are permitted under the terms of the BSD license. | - | You should have received a copy of the license in a bundled file | - | named LICENSE; in case you did not receive a copy you can review | - | the terms online at: https://opensource.org/licenses/BSD-3-Clause | - +--------------------------------------------------------------------+ - | Copyright (c) 2006-2014 Brian Aker https://datadifferential.com/ | - | Copyright (c) 2020 Michael Wallner | - +--------------------------------------------------------------------+ -*/ - -#include "mem_config.h" - -#include "utilities.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -long int timedif(struct timeval a, struct timeval b) { - long us, s; - - us = (int) (a.tv_usec - b.tv_usec); - us /= 1000; - s = (int) (a.tv_sec - b.tv_sec); - s *= 1000; - return s + us; -} - -void version_command(const char *command_name) { - printf("%s v%u.%u\n", command_name, 1U, 0U); - exit(EXIT_SUCCESS); -} - -void close_stdio(void) { - int fd; - if ((fd = open("/dev/null", O_RDWR, 0)) < 0) { - return; - } else { - if (dup2(fd, STDIN_FILENO) < 0) { - return; - } - - if (dup2(fd, STDOUT_FILENO) < 0) { - return; - } - - if (dup2(fd, STDERR_FILENO) < 0) { - return; - } - - if (fd > STDERR_FILENO) { - close(fd); - } - } -} - -static const char *lookup_help(memcached_options option) { - switch (option) { - case OPT_SERVERS: - return ("List which servers you wish to connect to."); - case OPT_VERSION: - return ("Display the version of the application and then exit."); - case OPT_HELP: - return ("Display this message and then exit."); - case OPT_VERBOSE: - return ("Give more details on the progression of the application."); - case OPT_QUIET: - return ("stderr and stdin will be closed at application startup."); - case OPT_DEBUG: - return ("Provide output only useful for debugging."); - case OPT_FLAG: - return ("Provide flag information for storage operation."); - case OPT_EXPIRE: - return ("Set the expire option for the object."); - case OPT_SET: - return ("Use set command with memcached when storing."); - case OPT_REPLACE: - return ("Use replace command with memcached when storing."); - case OPT_ADD: - return ("Use add command with memcached when storing."); - case OPT_SLAP_EXECUTE_NUMBER: - return ("Number of times to execute the given test."); - case OPT_SLAP_INITIAL_LOAD: - return ("Number of key pairs to load before executing tests."); - case OPT_SLAP_TEST: - return ("Test to run (currently \"get\" or \"set\")."); - case OPT_SLAP_CONCURRENCY: - return ("Number of users to simulate with load."); - case OPT_SLAP_NON_BLOCK: - return ("Set TCP up to use non-blocking IO."); - case OPT_SLAP_TCP_NODELAY: - return ("Set TCP socket up to use nodelay."); - case OPT_FLUSH: - return ("Flush servers before running tests."); - case OPT_HASH: - return ("Select hash type."); - case OPT_BINARY: - return ("Switch to binary protocol."); - case OPT_ANALYZE: - return ("Analyze the provided servers."); - case OPT_UDP: - return ("Use UDP protocol when communicating with server."); - case OPT_BUFFER: - return ("Enable request buffering."); - case OPT_USERNAME: - return "Username to use for SASL authentication"; - case OPT_PASSWD: - return "Password to use for SASL authentication"; - case OPT_FILE: - return "Path to file in which to save result"; - case OPT_STAT_ARGS: - return "Argument for statistics"; - case OPT_SERVER_VERSION: - return "Memcached daemon software version"; - default: - break; - }; - - assert(0); - return "forgot to document this function :)"; -} - -void help_command(const char *command_name, const char *description, - const struct option *long_options, memcached_programs_help_st *options) { - unsigned int x; - (void) options; - - printf("%s v%u.%u\n\n", command_name, 1U, 0U); - printf("\t%s\n\n", description); - printf("Current options. A '=' means the option takes a value.\n\n"); - - for (x = 0; long_options[x].name; x++) { - const char *help_message; - - printf("\t --%s%c\n", long_options[x].name, long_options[x].has_arg ? '=' : ' '); - if ((help_message = lookup_help(memcached_options(long_options[x].val)))) - printf("\t\t%s\n", help_message); - } - - printf("\n"); - exit(EXIT_SUCCESS); -} - -void process_hash_option(memcached_st *memc, char *opt_hash) { - uint64_t set; - memcached_return_t rc; - - if (opt_hash == NULL) { - return; - } - - set = MEMCACHED_HASH_DEFAULT; /* Just here to solve warning */ - if (!strcasecmp(opt_hash, "CRC")) { - set = MEMCACHED_HASH_CRC; - } else if (!strcasecmp(opt_hash, "FNV1_64")) { - set = MEMCACHED_HASH_FNV1_64; - } else if (!strcasecmp(opt_hash, "FNV1A_64")) { - set = MEMCACHED_HASH_FNV1A_64; - } else if (!strcasecmp(opt_hash, "FNV1_32")) { - set = MEMCACHED_HASH_FNV1_32; - } else if (!strcasecmp(opt_hash, "FNV1A_32")) { - set = MEMCACHED_HASH_FNV1A_32; - } else { - fprintf(stderr, "hash: type not recognized %s\n", opt_hash); - exit(EXIT_FAILURE); - } - - rc = memcached_behavior_set(memc, MEMCACHED_BEHAVIOR_HASH, set); - if (rc != MEMCACHED_SUCCESS) { - fprintf(stderr, "hash: memcache error %s\n", memcached_strerror(memc, rc)); - exit(EXIT_FAILURE); - } -} - -void initialize_sockets(void) { - /* Define the function for all platforms to avoid #ifdefs in each program */ -#if defined(_WIN32) - WSADATA wsaData; - if (WSAStartup(MAKEWORD(2, 0), &wsaData)) { - fprintf(stderr, "Socket Initialization Error. Program aborted\n"); - exit(EXIT_FAILURE); - } -#endif // #if defined(_WIN32) -} diff --git a/src/bin/common/utilities.h b/src/bin/common/utilities.h deleted file mode 100644 index 4ac6e513..00000000 --- a/src/bin/common/utilities.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - +--------------------------------------------------------------------+ - | libmemcached - C/C++ Client Library for memcached | - +--------------------------------------------------------------------+ - | Redistribution and use in source and binary forms, with or without | - | modification, are permitted under the terms of the BSD license. | - | You should have received a copy of the license in a bundled file | - | named LICENSE; in case you did not receive a copy you can review | - | the terms online at: https://opensource.org/licenses/BSD-3-Clause | - +--------------------------------------------------------------------+ - | Copyright (c) 2006-2014 Brian Aker https://datadifferential.com/ | - | Copyright (c) 2020 Michael Wallner | - +--------------------------------------------------------------------+ -*/ - -#pragma once - -#include -#include "libmemcached-1.0/memcached.h" -#include "client_options.h" - -#if defined(HAVE_SYS_TIME_H) -# include -#endif - -#if defined(HAVE_TIME_H) -# include -#endif - -#ifdef __sun -/* For some odd reason the option struct on solaris defines the argument - * as char* and not const char* - */ -# define OPTIONSTRING char * -#else -# define OPTIONSTRING const char * -#endif - -typedef struct memcached_programs_help_st memcached_programs_help_st; - -struct memcached_programs_help_st { - char *not_used_yet; -}; - -#ifdef __cplusplus -extern "C" { -#endif - -char *strdup_cleanup(const char *str); -void cleanup(void); -long int timedif(struct timeval a, struct timeval b); -void version_command(const char *command_name) __attribute__((noreturn)); -void help_command(const char *command_name, const char *description, - const struct option *long_options, memcached_programs_help_st *options) - __attribute__((noreturn)); -void process_hash_option(memcached_st *memc, char *opt_hash); -bool initialize_sasl(memcached_st *memc, char *user, char *password); -void shutdown_sasl(void); -void initialize_sockets(void); -void close_stdio(void); - -#ifdef __cplusplus -} // extern "C" -#endif diff --git a/src/bin/contrib/CMakeLists.txt b/src/bin/contrib/CMakeLists.txt new file mode 100644 index 00000000..40f0a2f0 --- /dev/null +++ b/src/bin/contrib/CMakeLists.txt @@ -0,0 +1,21 @@ +if(HAVE_MEMASLAP) + add_executable(memaslap memaslap.c + memaslap/ms_conn.c + memaslap/ms_setting.c + memaslap/ms_sigsegv.c + memaslap/ms_stats.c + memaslap/ms_task.c + memaslap/ms_thread.c) + target_include_directories(memaslap PRIVATE + memaslap + ${CMAKE_SOURCE_DIR}/include + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_BINARY_DIR}) + target_link_libraries(memaslap PRIVATE libmemcached Threads::Threads ${LIBEVENT} ${LIBMATH}) + if(CMAKE_INSTALL_RPATH) + set_target_properties(${CLIENT} PROPERTIES + INSTALL_RPATH ${CMAKE_INSTALL_RPATH}/../${CMAKE_INSTALL_LIBDIR}) + endif() + install(TARGETS memaslap + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) +endif() diff --git a/src/bin/memaslap.c b/src/bin/contrib/memaslap.c similarity index 100% rename from src/bin/memaslap.c rename to src/bin/contrib/memaslap.c diff --git a/src/bin/memaslap/ms_atomic.h b/src/bin/contrib/memaslap/ms_atomic.h similarity index 100% rename from src/bin/memaslap/ms_atomic.h rename to src/bin/contrib/memaslap/ms_atomic.h diff --git a/src/bin/memaslap/ms_conn.c b/src/bin/contrib/memaslap/ms_conn.c similarity index 100% rename from src/bin/memaslap/ms_conn.c rename to src/bin/contrib/memaslap/ms_conn.c diff --git a/src/bin/memaslap/ms_conn.h b/src/bin/contrib/memaslap/ms_conn.h similarity index 100% rename from src/bin/memaslap/ms_conn.h rename to src/bin/contrib/memaslap/ms_conn.h diff --git a/src/bin/memaslap/ms_memslap.h b/src/bin/contrib/memaslap/ms_memslap.h similarity index 100% rename from src/bin/memaslap/ms_memslap.h rename to src/bin/contrib/memaslap/ms_memslap.h diff --git a/src/bin/memaslap/ms_setting.c b/src/bin/contrib/memaslap/ms_setting.c similarity index 100% rename from src/bin/memaslap/ms_setting.c rename to src/bin/contrib/memaslap/ms_setting.c diff --git a/src/bin/memaslap/ms_setting.h b/src/bin/contrib/memaslap/ms_setting.h similarity index 100% rename from src/bin/memaslap/ms_setting.h rename to src/bin/contrib/memaslap/ms_setting.h diff --git a/src/bin/memaslap/ms_sigsegv.c b/src/bin/contrib/memaslap/ms_sigsegv.c similarity index 100% rename from src/bin/memaslap/ms_sigsegv.c rename to src/bin/contrib/memaslap/ms_sigsegv.c diff --git a/src/bin/memaslap/ms_sigsegv.h b/src/bin/contrib/memaslap/ms_sigsegv.h similarity index 100% rename from src/bin/memaslap/ms_sigsegv.h rename to src/bin/contrib/memaslap/ms_sigsegv.h diff --git a/src/bin/memaslap/ms_stats.c b/src/bin/contrib/memaslap/ms_stats.c similarity index 100% rename from src/bin/memaslap/ms_stats.c rename to src/bin/contrib/memaslap/ms_stats.c diff --git a/src/bin/memaslap/ms_stats.h b/src/bin/contrib/memaslap/ms_stats.h similarity index 100% rename from src/bin/memaslap/ms_stats.h rename to src/bin/contrib/memaslap/ms_stats.h diff --git a/src/bin/memaslap/ms_task.c b/src/bin/contrib/memaslap/ms_task.c similarity index 100% rename from src/bin/memaslap/ms_task.c rename to src/bin/contrib/memaslap/ms_task.c diff --git a/src/bin/memaslap/ms_task.h b/src/bin/contrib/memaslap/ms_task.h similarity index 100% rename from src/bin/memaslap/ms_task.h rename to src/bin/contrib/memaslap/ms_task.h diff --git a/src/bin/memaslap/ms_thread.c b/src/bin/contrib/memaslap/ms_thread.c similarity index 100% rename from src/bin/memaslap/ms_thread.c rename to src/bin/contrib/memaslap/ms_thread.c diff --git a/src/bin/memaslap/ms_thread.h b/src/bin/contrib/memaslap/ms_thread.h similarity index 100% rename from src/bin/memaslap/ms_thread.h rename to src/bin/contrib/memaslap/ms_thread.h diff --git a/src/bin/memcapable.cc b/src/bin/memcapable.cc index f8dfb0f8..017a42b4 100644 --- a/src/bin/memcapable.cc +++ b/src/bin/memcapable.cc @@ -41,7 +41,6 @@ #include "libmemcached/socket.hpp" #include "libmemcachedprotocol-0.0/binary.h" #include "libmemcached/byteorder.h" -#include "utilities.h" #include @@ -1848,7 +1847,7 @@ int main(int argc, char **argv) { break; case 'q': - close_stdio(); + //close_stdio(); break; case 'P': @@ -1882,7 +1881,7 @@ int main(int argc, char **argv) { return EXIT_FAILURE; } - initialize_sockets(); + //initialize_sockets(); sock = connect_server(hostname, port); if (sock == INVALID_SOCKET) { fprintf(stderr, "Failed to connect to <%s:%s>: %s\n", hostname ?: "(null)", port ?: "(null)", diff --git a/src/bin/memstat.cc b/src/bin/memstat.cc index 638297ac..407a7c96 100644 --- a/src/bin/memstat.cc +++ b/src/bin/memstat.cc @@ -24,7 +24,6 @@ #include "common/options.hpp" #include "common/checks.hpp" #include "common/time.hpp" -#include "common/utilities.h" #include #include -- 2.30.2