Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 0 additions & 61 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,67 +133,6 @@ jobs:
run: bundle exec rake test
- name: Stop containers
run: docker compose --progress quiet -f $DOCKER_COMPOSE_FILE down || true
benchmark:
if: github.event_name == 'schedule' && github.repository == 'redis-rb/redis-cluster-client'
name: Benchmark
timeout-minutes: 10
runs-on: ubuntu-latest
env:
REDIS_VERSION: '7.2'
DOCKER_COMPOSE_FILE: 'compose.latency.yaml'
REDIS_REPLICA_SIZE: '2'
REDIS_CLIENT_MAX_THREADS: '10'
DELAY_TIME: '1ms'
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
bundler-cache: true
- name: Pull Docker images
run: docker compose --progress quiet -f $DOCKER_COMPOSE_FILE pull
- name: Run containers
run: docker compose --progress quiet -f $DOCKER_COMPOSE_FILE up -d
- name: Wait for Redis cluster to be ready
run: bundle exec rake wait
- name: Print containers
run: docker compose -f $DOCKER_COMPOSE_FILE ps
- name: Rebuild cluster for balancing of replicas
run: bundle exec rake build_cluster_for_bench
env:
DEBUG: '1'
- name: Print topology
run: |
for i in {1..9}
do
echo "node$i: $(docker compose -f $DOCKER_COMPOSE_FILE exec node$i redis-cli cluster nodes | grep myself)"
done
- name: Ping nodes
run: |
for i in {1..9}
do
node_addr="$(docker compose -f $DOCKER_COMPOSE_FILE exec node$i redis-cli cluster nodes | grep myself | awk '{print $2}' | cut -d'@' -f1 | cut -d':' -f1)"
echo "node$i:"
ping -c 5 $node_addr
done
- name: Print cpu info
run: grep 'model name' /proc/cpuinfo
- name: Print memory info
run: free -w
- name: Print disk info
run: df -h
- name: Run minitest
run: bundle exec rake bench | grep BenchCommand | grep -v 'Envoy#bench_pipeline_echo\|Envoy#bench_single_echo' | sort
- name: Reset qdisc
run: |
for i in {5..9..2}
do
docker compose -f $DOCKER_COMPOSE_FILE exec node$i tc qdisc del dev eth0 root netem || true
done
- name: Stop containers
run: docker compose --progress quiet -f $DOCKER_COMPOSE_FILE down || true
ips:
if: github.event_name == 'schedule' && github.repository == 'redis-rb/redis-cluster-client'
name: IPS
Expand Down
10 changes: 1 addition & 9 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ SLUGGISH_TEST_TYPES.each do |type|
end
end

%i[bench ips prof].each do |k|
%i[ips prof].each do |k|
Rake::TestTask.new(k) do |t|
t.libs << :lib
t.libs << :test
Expand Down Expand Up @@ -70,11 +70,3 @@ task :build_cluster, %i[addr1 addr2] do |_, args|
timeout: 30.0
).rebuild
end

desc 'Build cluster for benchmark'
task :build_cluster_for_bench do
$LOAD_PATH.unshift(File.expand_path('test', __dir__))
require 'cluster_controller'
nodes = (6379..6387).map { |port| "redis://127.0.0.1:#{port}" }
::ClusterController.new(nodes, shard_size: 3, replica_size: 2, timeout: 30.0).rebuild
end
113 changes: 0 additions & 113 deletions test/bench_command.rb

This file was deleted.

34 changes: 0 additions & 34 deletions test/benchmark_helper.rb

This file was deleted.

118 changes: 0 additions & 118 deletions test/benchmark_mixin.rb

This file was deleted.

Loading