Skip to content

Conversation

@fabianfett
Copy link
Collaborator

@fabianfett fabianfett commented Dec 4, 2025

Fixes: #261.

@fabianfett fabianfett added this to the 1.0 milestone Dec 4, 2025
@fabianfett fabianfett force-pushed the ff-adopt-NonIsolatedNonSendingByDefault branch from c742432 to 5b23941 Compare December 4, 2025 12:42
@github-actions
Copy link

github-actions bot commented Dec 4, 2025

❌ Benchmark comparison failed with error ❌

Summary
===============================================================
Threshold deviations for ValkeyBenchmarks:Client: GET benchmark
===============================================================
Malloc (total) (K, %) main pull_request Difference % Threshold %
p25 56 52 -7 5
p50 58 53 -7 5
p75 59 56 -5 5
=========================================================================================================
Threshold deviations for ValkeyBenchmarks:Client: GET benchmark | parallel 20 | 20 concurrent connections
=========================================================================================================
Malloc (total) (K, %) main pull_request Difference % Threshold %
p25 57 54 -5 5
p50 60 56 -7 5
p75 62 58 -6 5

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

Full Benchmark Comparison

Comparing results between 'main' and 'pull_request'

Host '1d4b18c7c157' 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 55 56 58 59 60 60 60 6
pull_request 52 52 53 56 57 57 57 6
Δ -3 -4 -5 -3 -3 -3 -3 0
Improvement % 5 7 9 5 5 5 5 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 54 57 60 62 63 66 66 23
pull_request 51 54 56 58 59 60 60 26
Δ -3 -3 -4 -4 -4 -6 -6 3
Improvement % 6 5 7 6 6 9 9 3

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 6 9 10 10 10 10 10 7
pull_request 6 9 10 10 10 10 10 7
Δ 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 25 30 30 37 37 37 37 6
pull_request 26 30 30 37 37 37 37 6
Δ 1 0 0 0 0 0 0 0
Improvement % -4 0 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 25 32 33 33 35 35 35 5
pull_request 25 31 33 33 35 35 35 5
Δ 0 -1 0 0 0 0 0 0
Improvement % 0 3 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 18
pull_request 0 0 0 0 0 0 0 19
Δ 0 0 0 0 0 0 0 1
Improvement % 0 0 0 0 0 0 0 1

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 826
pull_request 0 0 0 0 0 0 0 828
Δ 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 1989
pull_request 0 0 0 0 0 0 0 1998
Δ 0 0 0 0 0 0 0 9
Improvement % 0 0 0 0 0 0 0 9

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 377
pull_request 0 0 0 0 0 0 0 378
Δ 0 0 0 0 0 0 0 1
Improvement % 0 0 0 0 0 0 0 1

Copy link
Collaborator

@adam-fowler adam-fowler left a comment

Choose a reason for hiding this comment

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

A couple of comments, mainly based on my ignorance of some of the concurrency keywords

/// ``ValkeyConnection/psubscribe(to:process:)``
@inlinable
public func _subscribe<Value>(
public nonisolated(nonsending) func _subscribe<Value>(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this nonisolated(nonsending) when the functions that call it are nonisolated?

/// ``ValkeyConnection/subscribe(to:process:)`` or
/// ``ValkeyConnection/psubscribe(to:process:)``
@inlinable
public func _subscribe<Value>(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of using a later swift-format which the majority of people aren't using yet can you add this instead

    // swift-format-ignore
    @inlinable
    public nonisolated(nonsending) func _subscribe<Value>(
        command: some ValkeySubscribeCommand,
        process: nonisolated(nonsending) (ValkeySubscription) async throws -> Value
    ) async throws -> Value {

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed in an even better way.

with:
api_breakage_check_container_image: swift:latest
docs_check_container_image: swift:latest
# 6.2 does not understand `nonisolated(nonsending)` correctly
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use // swift-format-ignore to get around swift-format not understanding nonisolated(nonsending)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed in an even better way.

Signed-off-by: Fabian Fett <fabianfett@apple.com>
Signed-off-by: Fabian Fett <fabianfett@apple.com>
Signed-off-by: Fabian Fett <fabianfett@apple.com>
Signed-off-by: Fabian Fett <fabianfett@apple.com>
Signed-off-by: Fabian Fett <fabianfett@apple.com>
@fabianfett fabianfett force-pushed the ff-adopt-NonIsolatedNonSendingByDefault branch from 0f603a6 to 0af7dd4 Compare December 9, 2025 10:43
Signed-off-by: Fabian Fett <fabianfett@apple.com>
Signed-off-by: Fabian Fett <fabianfett@apple.com>
Signed-off-by: Fabian Fett <fabianfett@apple.com>
@fabianfett fabianfett force-pushed the ff-adopt-NonIsolatedNonSendingByDefault branch from 0af7dd4 to 51d3611 Compare December 9, 2025 10:44
Signed-off-by: Fabian Fett <fabianfett@apple.com>
Signed-off-by: Fabian Fett <fabianfett@apple.com>
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.

Adopt upcoming nonisolated(nonsending) by default

3 participants