Python: Add FUNCTION STATS command#1794
Merged
acarbonetto merged 17 commits intovalkey-io:mainfrom Jul 4, 2024
Merged
Conversation
python/python/tests/utils/utils.py
Outdated
| function_count (int): Expected functions count. | ||
| """ | ||
| running_script_info = response.get(b"running_script") | ||
| if running_script_info == None and len(running_function) != 0: |
Collaborator
There was a problem hiding this comment.
Use is None instead of == None, and is not None instead of != None in python
Yury-Fridlyand
left a comment
There was a problem hiding this comment.
Please, add a changelog entry
Yury-Fridlyand
approved these changes
Jul 4, 2024
|
|
||
| @pytest.mark.parametrize("cluster_mode", [False]) | ||
| @pytest.mark.parametrize("protocol", [ProtocolVersion.RESP2, ProtocolVersion.RESP3]) | ||
| async def test_function_stats(self, redis_client: GlideClient): |
There was a problem hiding this comment.
Please rename redis_client to glide_client
jamesx-improving
approved these changes
Jul 4, 2024
| Returns information about the function that's currently running and information about the | ||
| available execution engines. | ||
|
|
||
| See https://redis.io/commands/function-stats/ for more details |
Collaborator
There was a problem hiding this comment.
Are we sure we want to mix use redis.io and valkey.io? Most python commands use valkey.io though.
Yury-Fridlyand
approved these changes
Jul 4, 2024
acarbonetto
approved these changes
Jul 4, 2024
cyip10
pushed a commit
to Bit-Quill/valkey-glide
that referenced
this pull request
Jul 16, 2024
* Add cluster and standalone versions of FUNCTION STATS commands * Add transaction implementation for FUNCTION STATS * Start adding tests for FUNCTION STATS * Try finish implementing tests * Fix some issues in the tests * Fix tests * Document check_function_stats_response * Run linters and formatters * Import pytest * Fix import ordering * Fix mypy errors * Fix transaction tests * Address PR comments * Fix black lint * Address minor PR comments --------- Co-authored-by: aaron-congo <aaron.congo@improving.com>
Yury-Fridlyand
pushed a commit
to Bit-Quill/valkey-glide
that referenced
this pull request
Jun 6, 2025
* Add cluster and standalone versions of FUNCTION STATS commands * Add transaction implementation for FUNCTION STATS * Start adding tests for FUNCTION STATS * Try finish implementing tests * Fix some issues in the tests * Fix tests * Document check_function_stats_response * Run linters and formatters * Import pytest * Fix import ordering * Fix mypy errors * Fix transaction tests * Address PR comments * Fix black lint * Address minor PR comments --------- Co-authored-by: aaron-congo <aaron.congo@improving.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
N/A
This PR adds the FUNCTION STATS command for the Python wrapper.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.