Skip to content

Conversation

@fcostaoliveira
Copy link
Collaborator

This PR introduces first-class support for driving memtier_benchmark workloads from Redis MONITOR output files.

It adds:

  • --monitor-input=FILE to load commands captured via redis-cli MONITOR
  • --monitor-pattern={S|R} to control runtime command selection (Sequential by default, or Random)
  • A new __monitor_c*__ placeholder family for --command:
    • __monitor_c1__, __monitor_c2__, … to replay a specific command from the monitor file
    • __monitor_c@__ to select commands at runtime (sequential or random)

This enables replaying real traffic and mixing captured workloads with synthetic commands using --command-ratio, while remaining compatible with both standalone and Redis Cluster deployments.

User-facing behavior

Replay a specific captured command on every request:

memtier_benchmark --monitor-input=monitor.txt --command=__monitor_c1__

Runtime-selected replay (sequential by default, random with --monitor-pattern=R):

memtier_benchmark --monitor-input=monitor.txt --command=__monitor_c@__ --monitor-pattern=R

Documentation

  • Adds a new Using monitor input files section to the README
  • Includes concrete usage examples
  • Documents how to capture MONITOR output using redis-cli
  • Links to the official Redis CLI MONITOR documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants