diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml index f77b034..5ade200 100644 --- a/.github/workflows/testing.yaml +++ b/.github/workflows/testing.yaml @@ -29,7 +29,7 @@ jobs: tarantool-version: ${{ matrix.tarantool-version }} - name: Install build requirements - run: sudo apt-get -y install libsasl2-dev libevent-dev + run: sudo apt-get -y install libsasl2-dev libevent-dev libmemcached-tools - run: cmake . diff --git a/.gitmodules b/.gitmodules index 5c7e60e..6d2f082 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,7 +1,3 @@ -[submodule "third_party/libmemcached"] - path = third_party/libmemcached - url = https://github.com/tarantool/libmemcached.git - branch = libmemcached-1.2-devel-bigbes [submodule "test-run"] path = test-run url = https://github.com/tarantool/test-run.git diff --git a/CMakeLists.txt b/CMakeLists.txt index fc74f4e..4102e38 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,9 +54,7 @@ if(NOT SMALL_FOUND) endif() include_directories(${SMALL_INCLUDE_DIRS}) -include(cmake/BuildLibmemcached.cmake) include(cmake/BuildMemtier.cmake) -libmemcached_build() memtier_build() include_directories(${CMAKE_SOURCE_DIR}/third_party) diff --git a/cmake/BuildLibmemcached.cmake b/cmake/BuildLibmemcached.cmake deleted file mode 100644 index 0738129..0000000 --- a/cmake/BuildLibmemcached.cmake +++ /dev/null @@ -1,24 +0,0 @@ -macro (libmemcached_build) - set(libmemcached_src ${CMAKE_CURRENT_SOURCE_DIR}/third_party/libmemcached) - add_custom_target(libmemcached_cfg ./bootstrap.sh autoreconf - COMMAND ./configure --enable-jobserver=no --enable-memaslap - --enable-static --enable-shared=off - WORKING_DIRECTORY ${libmemcached_src} - ) - add_custom_target(libmemcached_make - COMMAND make libmemcached/csl/parser.h clients/memcapable - clients/memslap clients/memaslap - DEPENDS libmemcached_cfg - WORKING_DIRECTORY ${libmemcached_src} - ) - add_custom_target(libmemcached_copy - COMMAND ${CMAKE_COMMAND} -E copy ${libmemcached_src}/clients/memcapable - ${CMAKE_CURRENT_BINARY_DIR}/test/capable/memcapable - COMMAND ${CMAKE_COMMAND} -E copy ${libmemcached_src}/clients/memaslap - ${CMAKE_CURRENT_BINARY_DIR}/test/bench/memaslap - COMMAND ${CMAKE_COMMAND} -E copy ${libmemcached_src}/clients/memslap - ${CMAKE_CURRENT_BINARY_DIR}/test/bench/memslap - DEPENDS libmemcached_make - ) - add_custom_target(libmemcached DEPENDS libmemcached_copy) -endmacro(libmemcached_build) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 0361f79..05eab80 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -4,7 +4,6 @@ add_dependencies(test-memcached internalso) add_custom_target(test-memcached-capable COMMAND ${CMAKE_SOURCE_DIR}/test/test-run.py --suite capable) -add_dependencies(test-memcached-capable libmemcached) add_custom_target(test-memcached-bench COMMAND ${CMAKE_SOURCE_DIR}/test/test-run.py --force --long --suite bench) diff --git a/test/bench/README.md b/test/bench/README.md deleted file mode 100644 index e392d3e..0000000 --- a/test/bench/README.md +++ /dev/null @@ -1,184 +0,0 @@ -# Building - -``` -cmake . -make libmemcached memtier -``` - -# Mem(a)slap - -``` - * -s, --servers= : List one or more servers to connect. Servers count must be less than threads count. - e.g.: –servers=localhost:1234,localhost:11211 - * -T, --threads= : Number of threads to startup, better equal to CPU numbers. - Default 8. - * -c, --concurrency= : Number of concurrency to simulate with load. - Default 128. - * -n, --conn_sock= : Number of TCP socks per concurrency. - Default 1. - * -x, --execute_number= : Number of operations(get and set) to execute for the given test. - Default 1000000. - * -t, --time= : How long the test to run, suffix: s,m,h,d - e.g.: –time=2h. - * -F, --cfg_cmd= : Load the configure file to get command, key and value distribution list. - * -w, --win_size= : Task window size of each concurrency, suffix: K, M - e.g.: –win_size=10k. Default 10k. - * -X, --fixed_size= : Fixed length of value. - * -v, --verify= : The proportion of date verification, e.g.: - –verify=0.01 - * -d, --division= : Number of keys to multi-get once. - Default 1, means single get. - * -S, --stat_freq= : Frequency of dumping statistic information. suffix: s,m - e.g.: –resp_freq=10s. - * -e, --exp_verify : The proportion of objects with expire time - e.g.: –exp_verify=0.01 - Default no object with expire time - * -o, --overwrite= : The proportion of objects need overwrite - e.g.: –overwrite=0.01. - Default never overwrite object. - * -R, --reconnect= : Reconnect tests, when connection is closed it will be reconnected. - * -U, --udp : UDP tests, default memaslap uses TCP, TCP port and UDP port of server must be same. - * -a, --facebook : Whether it enables facebook test feature, set with TCP and multi-get with UDP. - * -B, --binary : Whether it enables binary protocol. - Default with ASCII protocol. - * -P, --tps= : Expected throughput, suffix: K - e.g.: –tps=10k. - * -p, --rep_write= : The first nth servers can write data - e.g.: –rep_write=2. - * -b, --verbose : Whether it outputs detailed information when verification fails. - * -h, --help : Display this message and then exit. - * -V, --version : Display the version of the application and then exit. -``` - -Configuration file: -``` -################################### -# -# key -# start_len end_len proportion -# -# example1: key range 16~100 accounts for 80% -# key range 101~200 accounts for 10% -# key range 201~250 accounts for 10% -# total should be 1 (0.8+0.1+0.1 = 1) -# -# 16 100 0.8 -# 101 200 0.1 -# 201 249 0.1 -# -# example2: all keys length are 128 bytes -# -# 128 128 1 -# -################################### -# -# value -# start_len end_len proportion -# -# example1: value range 1~1000 accounts for 80% -# value range 1001~10000 accounts for 10% -# value range 10001~100000 accounts for 10% -# total should be 1 (0.8+0.1+0.1 = 1) -# -# 1 1000 0.8 -# 1001 10000 0.1 -# 10001 100000 0.1 -# -# example2: all value length are 128 bytes -# -# 128 128 1 -# -################################### -# -# cmd -# cmd_type cmd_proportion -# -# currently memaslap only testss get and set command. -# -# cmd_type: -# set 0 -# get 1 -# -# example: set command accounts for 50% -# get command accounts for 50% -# total should be 1 (0.5+0.5 = 1) -# -# cmd -# 0 0.5 -# 1 0.5 -# -################################### -``` - -# Memtier benchmark - -``` -A memcache/redis NoSQL traffic generator and performance benchmarking tool. - -Connection and General Options: - -s, --server=ADDR Server address (default: localhost) - -p, --port=PORT Server port (default: 6379) - -S, --unix-socket=SOCKET UNIX Domain socket name (default: none) - -P, --protocol=PROTOCOL Protocol to use (default: redis). Other - supported protocols are memcache_text, - memcache_binary. - -x, --run-count=NUMBER Number of full-test iterations to perform - -D, --debug Print debug output - --client-stats=FILE Produce per-client stats file - --out-file=FILE Name of output file (default: stdout) - --show-config Print detailed configuration before running - --hide-histogram Don't print detailed latency histogram - -Test Options: - -n, --requests=NUMBER Number of total requests per client (default: 10000) - use 'allkeys' to run on the entire key-range - -c, --clients=NUMBER Number of clients per thread (default: 50) - -t, --threads=NUMBER Number of threads (default: 4) - --test-time=SECS Number of seconds to run the test - --ratio=RATIO Set:Get ratio (default: 1:10) - --pipeline=NUMBER Number of concurrent pipelined requests (default: 1) - --reconnect-interval=NUM Number of requests after which re-connection is performed - --multi-key-get=NUM Enable multi-key get commands, up to NUM keys (default: 0) - -a, --authenticate=CREDENTIALS Authenticate to redis using CREDENTIALS, which depending - on the protocol can be PASSWORD or USER:PASSWORD. - --select-db=DB DB number to select, when testing a redis server - --distinct-client-seed Use a different random seed for each client - --randomize random seed based on timestamp (defalut is constant value) - -Object Options: - -d --data-size=SIZE Object data size (default: 32) - --data-offset=OFFSET Actual size of value will be data-size + data-offset - Will use SETRANGE / GETRANGE (default: 0) - -R --random-data Indicate that data should be randomized - --data-size-range=RANGE Use random-sized items in the specified range (min-max) - --data-size-list=LIST Use sizes from weight list (size1:weight1,..sizeN:weightN) - --data-size-pattern=R|S Use together with data-size-range - when set to R, a random size from the defined data sizes will be used, - when set to S, the defined data sizes will be evenly distributed across - the key range, see --key-maximum (default R) - --expiry-range=RANGE Use random expiry values from the specified range - -Imported Data Options: - --data-import=FILE Read object data from file - --data-verify Enable data verification when test is complete - --verify-only Only perform --data-verify, without any other test - --generate-keys Generate keys for imported objects - --no-expiry Ignore expiry information in imported data - -Key Options: - --key-prefix=PREFIX Prefix for keys (default: "memtier-") - --key-minimum=NUMBER Key ID minimum value (default: 0) - --key-maximum=NUMBER Key ID maximum value (default: 10000000) - --key-pattern=PATTERN Set:Get pattern (default: R:R) - G for Gaussian distribution. - R for uniform Random. - S for Sequential. - P for Parallel (Sequential were each client has a subset of the key-range). - --key-stddev The standard deviation used in the Gaussian distribution - (default is key range / 6) - --key-median The median point used in the Gaussian distribution - (default is the center of the key range) - --help Display this help - --version Display version information - -``` diff --git a/test/capable/capable-binary.test.py b/test/capable/capable-binary.test.py index 6f6913d..578238b 100644 --- a/test/capable/capable-binary.test.py +++ b/test/capable/capable-binary.test.py @@ -15,7 +15,7 @@ mc = MemcachedBinaryConnection("127.0.0.1", iproto.py_con.port) mc.flush() -cmd = shlex.split('capable/memcapable -b -p %s -h %s -v' % +cmd = shlex.split('memccapable -b -p %s -h %s -v' % (iproto.py_con.port, '127.0.0.1')) task = Popen(cmd, stdout=PIPE, stderr=STDOUT) diff --git a/test/capable/capable-text.test.py b/test/capable/capable-text.test.py index e904610..ceb0574 100644 --- a/test/capable/capable-text.test.py +++ b/test/capable/capable-text.test.py @@ -15,7 +15,7 @@ mc = MemcachedBinaryConnection("127.0.0.1", iproto.py_con.port) mc.flush() -cmd = shlex.split('capable/memcapable -a -p %s -h %s -v' % +cmd = shlex.split('memccapable -a -p %s -h %s -v' % (iproto.py_con.port, '127.0.0.1')) task = Popen(cmd, stdout=PIPE, stderr=STDOUT) diff --git a/third_party/libmemcached b/third_party/libmemcached deleted file mode 160000 index dc5b8fa..0000000 --- a/third_party/libmemcached +++ /dev/null @@ -1 +0,0 @@ -Subproject commit dc5b8fa6e5a11ca5800cafb60a23ff908f23f025