[Lldb-commits] [lldb] [lldb] Add a packet-test-delay setting for testing slow connections (PR #195440)

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Fri May 8 03:35:24 PDT 2026


Teemperor wrote:

Our current goal is just to evaluate debugging performance when a packet (not package!) delay is involved. For example, we try to print a variable on a remote the small delays add up very quickly and cause most of the delay between command and seeing the value.

Anyway, I think the major reason why the proxy approach won't fly is just that (A) we have to install random network software on machines and (B) it is a bit tedious to set up, and within Xcode it seems *really* tedious to set up.

Having said that, what if we had a way to script the package sending logic? As in, we could add a hook where the script interpreter can modify/delay/etc. a package that is about to be sent. This seems in general useful to simulate any other network/connection setups, and we also don't have to deal with a full TCP proxy.

E.g., we could have a function like below that we register to induce a delay:

```python
def process_package(target, process, package: bytes) ->:
    time.sleep(0.02)
    return package
```

Side note: I think another benefit of doing this via a proxy is that we could go back to older LLDB versions and benchmark them too using the same approach.

(Also thanks for the long writeup about the proxy!)

https://github.com/llvm/llvm-project/pull/195440


More information about the lldb-commits mailing list