MCPcopy
hub / github.com/redis/redis-py / slowlog

Function slowlog

tests/test_commands.py:53–65  ·  view source on GitHub ↗
(request, r)

Source from the content-addressed store, hash-verified

51
52@pytest.fixture()
53def slowlog(request, r):
54 current_config = r.config_get()
55 old_slower_than_value = current_config["slowlog-log-slower-than"]
56 old_max_legnth_value = current_config["slowlog-max-len"]
57
58 def cleanup():
59 r.config_set("slowlog-log-slower-than", old_slower_than_value)
60 r.config_set("slowlog-max-len", old_max_legnth_value)
61
62 request.addfinalizer(cleanup)
63
64 r.config_set("slowlog-log-slower-than", 0)
65 r.config_set("slowlog-max-len", 128)
66
67
68def get_stream_message(client, stream, message_id):

Callers

nothing calls this directly

Calls 2

config_getMethod · 0.45
config_setMethod · 0.45

Tested by

no test coverage detected