{"record":{"id":"f5a6ec09e22f90eb","repo":"redis/redis-py","slug":"latency-graph-is-intentionally-not-implemented-in","errorCode":null,"errorMessage":"LATENCY GRAPH is intentionally not implemented in the client. For more information, see https://redis.io/commands/latency-graph","messagePattern":"LATENCY GRAPH is intentionally not implemented in the client\\. For more information, see https://redis\\.io/commands/latency-graph","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"redis/commands/core.py","lineNumber":1731,"sourceCode":"        This function is best used within the redis-cli.\n\n        For more information, see https://redis.io/commands/latency-doctor\n        \"\"\"\n        raise NotImplementedError(\n            \"\"\"\n            LATENCY DOCTOR is intentionally not implemented in the client.\n\n            For more information, see https://redis.io/commands/latency-doctor\n            \"\"\"\n        )\n\n    def latency_graph(self):\n        \"\"\"Raise a NotImplementedError, as the client will not support LATENCY GRAPH.\n        This function is best used within the redis-cli.\n\n        For more information, see https://redis.io/commands/latency-graph.\n        \"\"\"\n        raise NotImplementedError(\n            \"\"\"\n            LATENCY GRAPH is intentionally not implemented in the client.\n\n            For more information, see https://redis.io/commands/latency-graph\n            \"\"\"\n        )\n\n    @overload\n    def lolwut(\n        self: SyncClientProtocol, *version_numbers: Union[str, float], **kwargs\n    ) -> bytes | str: ...\n\n    @overload\n    def lolwut(\n        self: AsyncClientProtocol, *version_numbers: Union[str, float], **kwargs\n    ) -> Awaitable[bytes | str]: ...\n\n    def lolwut(self, *version_numbers: Union[str, float], **kwargs) -> (","sourceCodeStart":1713,"sourceCodeEnd":1749,"githubUrl":"https://github.com/redis/redis-py/blob/6a6b581b48225afa0b76912d1028c6035baee932/redis/commands/core.py#L1713-L1749","documentation":"Raised by latency_graph() (redis/commands/core.py:1731) which is a stub that unconditionally raises NotImplementedError. LATENCY GRAPH produces an ASCII art graph meant for redis-cli, so the python client refuses it. The structured latency_history(event) and latency_latest() commands are available instead. No arguments are accepted.","triggerScenarios":"Calling r.latency_graph(). Any call raises immediately.","commonSituations":"Wanting a visual latency chart programmatically; assuming every LATENCY subcommand is mirrored.","solutions":["Fetch raw samples with r.latency_history(event) and render the graph yourself","Use r.latency_latest() for the most recent spike per event","Run 'redis-cli LATENCY GRAPH <event>' for the built-in ASCII art"],"exampleFix":"# before\nr.latency_graph()\n# after\nsamples = r.latency_history(\"command\")","handlingStrategy":"fallback","validationCode":"# latency_graph() is intentionally unimplemented; fetch raw samples\ndef latency_graph_data(r, event):\n    return r.latency_history(event)","typeGuard":null,"tryCatchPattern":"try:\n    r.latency_graph()\nexcept NotImplementedError:\n    data = r.latency_history(\"command\")","preventionTips":["Render graphs client-side from latency_history() samples.","Do not depend on a programmatic latency_graph() method.","Use redis-cli for the built-in ASCII graph."],"tags":["latency","notimplemented","intentional"],"backgroundTag":null,"analyzedSha":"6a6b581b48225afa0b76912d1028c6035baee932","analyzedAt":"2026-08-10T12:52:44.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-21T04:17:39.646Z"}