summaryrefslogtreecommitdiff
path: root/benchmarks
Commit message (Collapse)AuthorAgeFilesLines
* Combine auto-concatenated strings (#2482)David Gilman2022-12-141-1/+1
|
* async_cluster: optimisations (#2205)Utkarsh Gupta2022-06-012-2/+109
| | | | | | | | | | - return true from execute_pipeline if there are any errors - use todo list to speedup retries - store initialisation node in CommandsParser object - add sync context manager for pipeline - use if/else instead of try/except - make command a function argument in _determine_nodes & _determine_slot - add async cluster pipeline benchmark script
* update black to 22.3.0 (#2171)Utkarsh Gupta2022-05-301-4/+4
|
* Add Async RedisCluster (#2099)Utkarsh Gupta2022-05-081-0/+263
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Copy Cluster Client, Commands, Commands Parser, Tests for asyncio * Async Cluster Tests: Async/Await * Add Async RedisCluster * cluster: use ERRORS_ALLOW_RETRY from self.__class__ * async_cluster: rework redis_connection, initialize, & close - move redis_connection from NodesManager to ClusterNode & handle all related logic in ClusterNode class - use Locks while initializing or closing - in case of error, close connections instead of instantly reinitializing - create ResourceWarning instead of manually deleting client object - use asyncio.gather to run commands/initialize/close in parallel - inline single use functions - fix test_acl_log for py3.6 * async_cluster: add types * async_cluster: add docs * docs: update sphinx & add sphinx_autodoc_typehints * async_cluster: move TargetNodesT to cluster module * async_cluster/commands: inherit commands from sync class if possible * async_cluster: add benchmark script with aredis & aioredis-cluster * async_cluster: remove logging * async_cluster: inline functions * async_cluster: manage Connection instead of Redis Client * async_cluster/commands: optimize parser * async_cluster: use ensure_future & generators for gather * async_conn: optimize * async_cluster: optimize determine_slot * async_cluster: optimize determine_nodes * async_cluster/parser: optimize _get_moveable_keys * async_cluster: inlined check_slots_coverage * async_cluster: update docstrings * async_cluster: add concurrent test & use read_response/_update_moved_slots without lock Co-authored-by: Chayim <chayim@users.noreply.github.com>
* Added black and isort (#1734)Anas2021-11-304-82/+81
|
* Pyupgrade + flynt + f-strings (#1759)Aarni Koskela2021-11-303-23/+17
| | | @akx Thank you so much for this! Thanks again for introducing me to a new tool that I'm sliding into my workflow as well.
* Remove support for end-of-life Python 2.7 (#1318)Jon Dufresne2020-08-063-15/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove support for end-of-life Python 2.7 Python 2.7 is end of life. It is no longer receiving bug fixes, including for security issues. Python 2.7 went EOL on 2020-01-01. For additional details on support Python versions, see: Supported: https://devguide.python.org/#status-of-python-branches EOL: https://devguide.python.org/devcycle/#end-of-life-branches Removing support for EOL Pythons will reduce testing and maintenance resources while allowing the library to move towards a modern Python 3 style. Python 2.7 users can continue to use the previous version of redis-py. Was able to simplify the code: - Removed redis._compat module - Removed __future__ imports - Removed object from class definition (all classes are new style) - Removed long (Python 3 unified numeric types) - Removed deprecated __nonzero__ method - Use simpler Python 3 super() syntax - Use unified OSError exception - Use yield from syntax Co-authored-by: Andy McCurdy <andy@andymccurdy.com>
* Switch to flake8 for static code analysis (#1328)Jon Dufresne2020-04-161-1/+0
| | | | | | | | | flake8 catches a wider net of mistakes than pycodestyle and is more commonly used by the larger community. For example, it catches unused imports, a few of which existed. These have since been removed. Two "noqa" comments were added. One ignores the _compat.py file as it has a large amount of Python version specific code. The second is in utils.py which intentionally does not use an import.
* Simplify exception handlers (#1319)Jon Dufresne2020-04-111-8/+6
| | | | | | | | | Use the "as" keyword to capture the exception in a variable instead of sys.exc_info(). Re-raise exception with the bare "raise" syntax. Avoid "# noqa: E722" by catching BaseException, which includes all exceptions including SystemExit.
* Add missing check_health argument to Connection overrides (#1323)Jon Dufresne2020-04-111-2/+2
| | | | | | Now matches the parent class signature. Running the benchmark previously failed with the error: TypeError: send_packed_command() got an unexpected keyword argument 'check_health'
* Drop unused variables and imports (#1284)Jon Dufresne2020-02-121-1/+1
|
* remove legacy Redis classAndy McCurdy2018-11-132-2/+2
| | | | | | | | | | | | | | | | | | | redis-py maintained backwards compatibility by keeping the old "Redis" class around for quite some time. While no doubt a convenience for folks who relied on it, the presence of both Redis and StrictRedis causes a number of support issues and general confusion. With 3.0, we're breaking a few things to make redis-py better going forward. This change removes the old Redis class. We also renamed the StrictRedis class to Redis and aliased StrictRedis to Redis. For people that have been using StrictRedis, this should not change anything. You can continue doing things as you are. People still using the legacy Redis class will need to update the argument order for the SETEX, LREM and ZADD commands. Additionally, the return values for TTL and PTTL now return the integer values -1 when a key exists but has no expire time and -2 when a key does not exist. Previously these cases returned a None value in the Redis class.
* Use unicode literals throughout projectJon Dufresne2018-11-031-5/+6
| | | | Remove workaround for handling unicode with older Pythons.
* Remove explicit position numbers in format strings placeholdersJon Dufresne2018-11-031-1/+1
| | | | All Python versions can handled ordered placeholders.
* pycodestyle changes in benchmarkingRoey Prat2018-10-282-4/+5
|
* Fix bench command_packerroot2018-05-201-2/+2
|
* pep8 cleanupChris Simpson2016-06-121-0/+2
|
* Cache Token objects to improve performance.Chris Simpson2016-06-121-0/+197
| | | | | | | | The Token class now contains a cache of tokens, and each token stores its encoded value. In Python 3 this prevents encoding the Token commands (get, set, incr, etc...) repeatly. There is also a smaller performance improvement by creating fewer objects. A very basic benchmark script was also added.
* benchmark of the old and new pack_command implementationsAndy McCurdy2014-04-291-0/+104
|
* tiny benchmark framework and a benchmark to determine the optimal number of ↵Andy McCurdy2014-04-283-0/+80
bytes to read from a socket