Skip to content
Open
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
29 changes: 27 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ on:
- lettuce
- none
default: "valkey-glide"
mode:
description: "Server topology mode"
required: false
type: choice
options:
- standalone
- cluster
default: "standalone"
workload:
description: "Workload config"
required: true
Expand Down Expand Up @@ -153,6 +161,7 @@ jobs:
run: |
PRIMARY_DRIVER="${{ github.event.inputs.primary_driver }}"
SECONDARY_DRIVER="${{ github.event.inputs.secondary_driver }}"
MODE="${{ github.event.inputs.mode || 'standalone' }}"
WORKLOAD="${{ github.event.inputs.workload }}"
PRIMARY_VERSION="${{ github.event.inputs.primary_version }}"
SECONDARY_VERSION="${{ github.event.inputs.secondary_version }}"
Expand Down Expand Up @@ -180,6 +189,7 @@ jobs:

echo "primary_driver=$PRIMARY_DRIVER" >> $GITHUB_OUTPUT
echo "secondary_driver=$SECONDARY_DRIVER" >> $GITHUB_OUTPUT
echo "mode=$MODE" >> $GITHUB_OUTPUT
echo "workload=$WORKLOAD" >> $GITHUB_OUTPUT
echo "primary_version=$PRIMARY_VERSION" >> $GITHUB_OUTPUT
echo "secondary_version=$SECONDARY_VERSION" >> $GITHUB_OUTPUT
Expand All @@ -191,6 +201,7 @@ jobs:
echo "========================================"
echo "Primary driver: $PRIMARY_DRIVER"
echo "Secondary driver: $SECONDARY_DRIVER"
echo "Mode: $MODE"
echo "Workload: $WORKLOAD"
echo "Primary version: '${PRIMARY_VERSION}'"
echo "Secondary version: '${SECONDARY_VERSION}'"
Expand All @@ -203,6 +214,7 @@ jobs:
run: |
PRIMARY_DRIVER="${{ steps.inputs.outputs.primary_driver }}"
SECONDARY_DRIVER="${{ steps.inputs.outputs.secondary_driver }}"
MODE="${{ steps.inputs.outputs.mode }}"
WORKLOAD="${{ steps.inputs.outputs.workload }}"
CONFIG_DIR=".github/workflows/benchmark_configs"
CUSTOM_CONFIG_DIR="/tmp/custom_configs"
Expand Down Expand Up @@ -241,10 +253,10 @@ jobs:
if [ "$SECONDARY_DRIVER" = "valkey-glide" ]; then
SECONDARY_IN_FILENAME="glide"
fi
DRIVER="${PRIMARY_DRIVER}-${SECONDARY_IN_FILENAME}-standalone"
DRIVER="${PRIMARY_DRIVER}-${SECONDARY_IN_FILENAME}"
else
# Standalone drivers (valkey-glide, jedis, lettuce, redisson)
DRIVER="${PRIMARY_DRIVER}-standalone"
DRIVER="${PRIMARY_DRIVER}"
if [ "$SECONDARY_DRIVER" != "none" ] && [ -n "$SECONDARY_DRIVER" ]; then
echo "Note: secondary_driver '$SECONDARY_DRIVER' ignored for standalone driver '$PRIMARY_DRIVER'"
fi
Expand All @@ -260,6 +272,14 @@ jobs:
echo "✓ Driver config: $DRIVER_CONFIG"
fi

# Handle selected driver mode (server topology)
if [ -z "$CUSTOM_DRIVER_CONFIG_INPUT" ]; then
DRIVER_CONFIG_WITH_MODE="$CUSTOM_CONFIG_DIR/driver-config.json"
jq --arg mode "$MODE" '.mode = $mode' "$DRIVER_CONFIG" > "$DRIVER_CONFIG_WITH_MODE"
DRIVER_CONFIG="$DRIVER_CONFIG_WITH_MODE"
echo "✓ Mode set to: $MODE"
fi

# Handle custom workload config
CUSTOM_WORKLOAD_CONFIG_INPUT='${{ github.event.inputs.custom_workload_config }}'
if [ -n "$CUSTOM_WORKLOAD_CONFIG_INPUT" ]; then
Expand Down Expand Up @@ -414,6 +434,9 @@ jobs:
sudo apt-get update
sudo apt-get install -y git gcc pkg-config openssl libssl-dev unzip cmake python3-pip

# Install JDK 11 (required by valkey-glide Gradle toolchain)
sudo apt-get install -y openjdk-11-jdk-headless

# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
Expand All @@ -439,6 +462,7 @@ jobs:
run: |
source "$HOME/.cargo/env"
export PATH="$PATH:$HOME/.local/bin"
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64

COMMIT_ID="${{ steps.inputs.outputs.primary_version }}"
echo "Building valkey-glide from commit: $COMMIT_ID (primary driver)"
Expand Down Expand Up @@ -466,6 +490,7 @@ jobs:
run: |
source "$HOME/.cargo/env"
export PATH="$PATH:$HOME/.local/bin"
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64

COMMIT_ID="${{ steps.versions.outputs.secondary_version }}"
echo "Building valkey-glide from commit: $COMMIT_ID (secondary driver)"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"schema_version": "1.0",
"description": "Jedis client - standalone mode",
"description": "Jedis client",
"driver_id": "jedis",
"mode": "standalone",
"specific_driver_config": {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"schema_version": "1.0",
"description": "Lettuce client - standalone mode",
"description": "Lettuce client",
"driver_id": "lettuce",
"mode": "standalone",
"specific_driver_config": {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"schema_version": "1.0",
"description": "Redisson client - standalone mode",
"description": "Redisson client",
"driver_id": "redisson",
"mode": "standalone",
"specific_driver_config": {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"schema_version": "1.0",
"description": "Spring Data Redis with Jedis driver - standalone mode",
"description": "Spring Data Redis with Jedis driver",
"driver_id": "spring-data-redis",
"mode": "standalone",
"specific_driver_config": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"schema_version": "1.0",
"description": "Spring Data Redis with Lettuce driver - standalone mode",
"description": "Spring Data Redis with Lettuce driver",
"driver_id": "spring-data-redis",
"mode": "standalone",
"specific_driver_config": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"schema_version": "1.0",
"description": "Spring Data Valkey with Valkey-Glide driver - standalone mode",
"description": "Spring Data Valkey with Valkey-Glide driver",
"driver_id": "spring-data-valkey",
"mode": "standalone",
"specific_driver_config": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"schema_version": "1.0",
"description": "Spring Data Valkey with Jedis driver - standalone mode",
"description": "Spring Data Valkey with Jedis driver",
"driver_id": "spring-data-valkey",
"mode": "standalone",
"specific_driver_config": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"schema_version": "1.0",
"description": "Spring Data Valkey with Lettuce driver - standalone mode",
"description": "Spring Data Valkey with Lettuce driver",
"driver_id": "spring-data-valkey",
"mode": "standalone",
"specific_driver_config": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"schema_version": "1.0",
"description": "Valkey-Glide client - standalone mode",
"description": "Valkey-Glide client",
"driver_id": "valkey-glide",
"mode": "standalone",
"specific_driver_config": {}
Expand Down
Loading