Skip to content

Conversation

@adam-fowler
Copy link
Collaborator

@adam-fowler adam-fowler commented Dec 18, 2025

This add tracing spans for the pipeline and transaction functions. Span name is either Pipeline or MULTI. The database operation name though is a list of the commands concatenated together eg SET,SET,INCR.

None of the functions report errors for individual commands as the Results returned by the commands are not processed and processing them would add additional The pipeline functions don't report errors as it doesn't process errors it only returns a collection of Results. The transaction functions report errors returned by EXEC but again errors from individual commands are not reported.

@slashmo

Signed-off-by: Adam Fowler <adamfowler71@gmail.com>
@github-actions
Copy link

github-actions bot commented Dec 18, 2025

✅ Pull request has performance improvements ✅

Summary
==============================================================================
Threshold deviations for ValkeyBenchmarks:Connection: Pipeline array benchmark
==============================================================================
Malloc (total) (K, %) main pull_request Difference % Threshold %
p25 20 17 -14 5

New baseline 'pull_request' is BETTER than the 'main' baseline thresholds.

Full Benchmark Comparison

Comparing results between 'main' and 'pull_request'

Host '9ef60a476605' 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 52 52 53 55 56 56 56 6
pull_request 50 51 54 56 56 56 56 6
Δ -2 -1 1 1 0 0 0 0
Improvement % 4 2 -2 -2 0 0 0 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 46 53 54 57 59 62 62 24
pull_request 49 53 55 56 58 64 64 28
Δ 3 0 1 -1 -1 2 2 4
Improvement % -7 0 -2 2 2 -3 -3 4

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 4 7 8 9 9 9 9 8
pull_request 4 7 8 9 9 9 9 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 9 20 24 26 27 27 27 7
pull_request 9 17 24 26 27 27 27 7
Δ 0 -3 0 0 0 0 0 0
Improvement % 0 15 0 0 0 0 0 0

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 7 24 24 25 25 25 25 7
pull_request 7 24 24 25 25 25 25 7
Δ 0 0 0 0 0 0 0 0
Improvement % 0 0 0 0 0 0 0 0

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 19
pull_request 0 0 0 0 0 0 0 19
Δ 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 830
pull_request 0 0 0 0 0 0 0 832
Δ 0 0 0 0 0 0 0 2
Improvement % 0 0 0 0 0 0 0 2

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 1987
pull_request 0 0 0 0 0 0 0 2011
Δ 0 0 0 0 0 0 0 24
Improvement % 0 0 0 0 0 0 0 24

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 375
pull_request 0 0 0 0 0 0 0 374
Δ 0 0 0 0 0 0 0 -1
Improvement % 0 0 0 0 0 0 0 -1

span?.updateAttributes { attributes in
self.applyCommonAttributes(to: &attributes, commandName: Command.name)
self.applyCommonAttributes(to: &attributes)
attributes[self.configuration.tracing.attributeNames.databaseOperationName] = Command.name
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also add databaseNumber here as well for better tracing ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's not an obvious Otel parameter to use for database number. See https://opentelemetry.io/docs/specs/semconv/registry/attributes/db/

Copy link
Collaborator

@nilanshu-sharma nilanshu-sharma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added comments.

Signed-off-by: Adam Fowler <adamfowler71@gmail.com>
Copy link
Collaborator

@nilanshu-sharma nilanshu-sharma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

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.

3 participants