Skip to content

Conversation

adam-fowler
Copy link
Collaborator

@adam-fowler adam-fowler commented Sep 12, 2025

Code generator will attempt to choose the correct return value for a Valkey command, but it can only do simple types like String, Int, Array of RESP Tokens. If we want to provide more complex responses we have to write some custom code. To do this

  • disable the return value generation for that command in the code generator
  • override the Response typealias in the ValkeyCommand type
  • provide a method to initialise this Response from a RESPToken.

Also in this PR

  • moved integration tests, testing commands into separate file
  • Added command test helper testCommandEncodesDecodes and use in script and server commands, will extend to others in separate PR

@adam-fowler adam-fowler marked this pull request as draft September 12, 2025 16:28
Copy link

github-actions bot commented Sep 12, 2025

✅ Pull request no significant performance differences ✅

Summary

New baseline 'pull_request' is WITHIN the 'main' baseline thresholds.

Full Benchmark Comparison

Comparing results between 'main' and 'pull_request'

Host '8b5179603778' with 4 'x86_64' processors with 15 GB memory, running:
#18~24.04.1-Ubuntu SMP Sat Jun 28 04:46:03 UTC 2025

ValkeyBenchmarks

Client: GET benchmark metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 81 82 84 88 89 89 89 6
pull_request 83 84 85 87 88 88 88 6
Δ 2 2 1 -1 -1 -1 -1 0
Improvement % -2 -2 -1 1 1 1 1 0

Client: GET benchmark | parallel 20 | 20 concurrent connections metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 97 100 102 106 110 110 110 24
pull_request 94 99 102 106 110 113 113 25
Δ -3 -1 0 0 0 3 3 1
Improvement % 3 1 0 0 0 -3 -3 1

Connection: GET benchmark metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 4 4 4 4 4 4 4 8
pull_request 4 4 4 4 4 4 4 8
Δ 0 0 0 0 0 0 0 0
Improvement % 0 0 0 0 0 0 0 0

Connection: GET benchmark – NoOpTracer metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 7 8 8 10 10 10 10 8
pull_request 7 8 8 10 10 10 10 8
Δ 0 0 0 0 0 0 0 0
Improvement % 0 0 0 0 0 0 0 0

Connection: Pipeline array benchmark metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 33 33 33 34 34 34 34 6
pull_request 33 33 34 34 34 34 34 5
Δ 0 0 1 0 0 0 0 -1
Improvement % 0 0 -3 0 0 0 0 -1

Connection: Pipeline benchmark metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 31 33 33 34 34 34 34 6
pull_request 33 33 33 34 34 34 34 5
Δ 2 0 0 0 0 0 0 -1
Improvement % -6 0 0 0 0 0 0 -1

HashSlot – {user}.whatever metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 0 0 0 0 0 0 0 18
pull_request 0 0 0 0 0 0 0 18
Δ 0 0 0 0 0 0 0 0
Improvement % 0 0 0 0 0 0 0 0

ValkeyCommandEncoder – Command with 7 words metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 0 0 0 0 0 0 0 724
pull_request 0 0 0 0 0 0 0 740
Δ 0 0 0 0 0 0 0 16
Improvement % 0 0 0 0 0 0 0 16

ValkeyCommandEncoder – Simple GET metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 0 0 0 0 0 0 0 1843
pull_request 0 0 0 0 0 0 0 1889
Δ 0 0 0 0 0 0 0 46
Improvement % 0 0 0 0 0 0 0 46

ValkeyCommandEncoder – Simple MGET 15 keys metrics

Malloc (total): results within specified thresholds, fold down for details.

Malloc (total) * p0 p25 p50 p75 p90 p99 p100 Samples
main 0 0 0 0 0 0 0 353
pull_request 0 0 0 0 0 0 0 359
Δ 0 0 0 0 0 0 0 6
Improvement % 0 0 0 0 0 0 0 6

Signed-off-by: Adam Fowler <[email protected]>
Signed-off-by: Adam Fowler <[email protected]>
Add testCommandEncodesDecodes helper function

Signed-off-by: Adam Fowler <[email protected]>
@adam-fowler adam-fowler marked this pull request as ready for review September 13, 2025 14:31
@adam-fowler adam-fowler added this to the 1.0 milestone Sep 25, 2025
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.

1 participant