-
Notifications
You must be signed in to change notification settings - Fork 18
Standard return types and errors for hrandfield #262
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Nilanshu Sharma <[email protected]>
|
✅ Pull request no significant performance differences ✅ SummaryNew baseline 'pull_request' is WITHIN the 'main' baseline thresholds. Full Benchmark ComparisonComparing results between 'main' and 'pull_request'ValkeyBenchmarksClient: GET benchmark metricsMalloc (total): results within specified thresholds, fold down for details.
Client: GET benchmark | parallel 20 | 20 concurrent connections metricsMalloc (total): results within specified thresholds, fold down for details.
Connection: GET benchmark metricsMalloc (total): results within specified thresholds, fold down for details.
Connection: GET benchmark – NoOpTracer metricsMalloc (total): results within specified thresholds, fold down for details.
Connection: Pipeline array benchmark metricsMalloc (total): results within specified thresholds, fold down for details.
Connection: Pipeline benchmark metricsMalloc (total): results within specified thresholds, fold down for details.
HashSlot – {user}.whatever metricsMalloc (total): results within specified thresholds, fold down for details.
ValkeyCommandEncoder – Command with 7 words metricsMalloc (total): results within specified thresholds, fold down for details.
ValkeyCommandEncoder – Simple GET metricsMalloc (total): results within specified thresholds, fold down for details.
ValkeyCommandEncoder – Simple MGET 15 keys metricsMalloc (total): results within specified thresholds, fold down for details.
|
Signed-off-by: Nilanshu Sharma <[email protected]>
Signed-off-by: Nilanshu Sharma <[email protected]>
| /// Get multiple random field-value pairs when HRANDFIELD was called with COUNT and WITHVALUES | ||
| /// - Returns: Array of HashEntry (field-value pairs), or empty array if key doesn't exist | ||
| /// - Throws: RESPDecodeError if response format is unexpected | ||
| public func multipleFieldsWithValues() throws -> [HashEntry] { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a bunch of helper functions for decoding which you should probably use. Also this should probably be a nil value when null is returned. This can probably be replaced with
[HashEntry]?(fromRESP: token)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried using [HashEntry]?(fromRESP: token) for multipleFieldsWithValues(). It did work for RESP3 which encodes responses as an array of arrays, because HashEntry can convert a RESPToken encoded as an array to self.
But RESP2 responses will fail because a flat array can't be converted to HashEntry.
So If responses are RESP3 I'll use [HashEntry]?(fromRESP: token) but I'll use the custom logic in case of flat array.
Signed-off-by: Nilanshu Sharma <[email protected]>
Signed-off-by: Nilanshu Sharma <[email protected]>
Signed-off-by: Nilanshu Sharma <[email protected]>
hrandfieldcommand. The command returns either:====================================================================================
Following test show the RESP return types for RESP2 and RESP3.