diff options
| author | Duncan Ogilvie <mr.exodia.tpodt@gmail.com> | 2026-08-20 23:55:52 +0200 |
|---|---|---|
| committer | Duncan Ogilvie <mr.exodia.tpodt@gmail.com> | 2026-08-20 23:55:52 +0200 |
| commit | f4c1d9b5497fd0d38137b6b345e8171b307c1117 (patch) | |
| tree | 5f1f9b0d27c2894582512727c2a3f002077f4097 /experiments | |
| parent | Adopt idb_events and remote module features from ida-codemode (diff) | |
| download | ida-tui-f4c1d9b5497fd0d38137b6b345e8171b307c1117.tar.gz ida-tui-f4c1d9b5497fd0d38137b6b345e8171b307c1117.tar.xz ida-tui-f4c1d9b5497fd0d38137b6b345e8171b307c1117.zip | |
Switch to ida-nexus
Diffstat (limited to 'experiments')
| -rw-r--r-- | experiments/bench_ops.py | 12 | ||||
| -rw-r--r-- | experiments/bench_pack_trace.py | 4 | ||||
| -rw-r--r-- | experiments/call_census.py | 10 | ||||
| -rw-r--r-- | experiments/profile_client.py | 4 | ||||
| -rw-r--r-- | experiments/profile_remote.py | 4 | ||||
| -rw-r--r-- | experiments/worker_smoke.py | 10 |
6 files changed, 22 insertions, 22 deletions
diff --git a/experiments/bench_ops.py b/experiments/bench_ops.py index 9cc51fa..1c0ad69 100644 --- a/experiments/bench_ops.py +++ b/experiments/bench_ops.py @@ -1,4 +1,4 @@ -"""Time a realistic idatui operation mix against whatever ida-codemode is installed. +"""Time a realistic idatui operation mix against whatever ida-nexus is installed. The companion to `bench_pack_trace.py`: that one isolates a single workaround, this one answers "how much faster is the whole client, on real operations". @@ -14,16 +14,16 @@ replace or delete it:: PYTHONPATH=. ~/ida-venv/bin/python /tmp/bench_ops.py # B: current client against the OLD library (shows what the workarounds were for) - git -C ~/dev/ida-codemode checkout 4195f21 + git -C ~/dev/ida-nexus checkout 4195f21 PYTHONPATH=. ~/ida-venv/bin/python /tmp/bench_ops.py # A: the client as it SHIPPED on the old library, workarounds and all git checkout 8550474 # the commit before the workaround removal PYTHONPATH=. ~/ida-venv/bin/python /tmp/bench_ops.py - git checkout main && git -C ~/dev/ida-codemode checkout main # ALWAYS restore + git checkout main && git -C ~/dev/ida-nexus checkout main # ALWAYS restore -ida-codemode is installed **editable** into both venvs, so checking that repo out +ida-nexus is installed **editable** into both venvs, so checking that repo out swaps the backend under the TUI with no reinstall -- which is what makes this A/B cheap. """ @@ -36,7 +36,7 @@ import statistics import time from idatui import remote_ops -from idatui.codemode_client import CodeModeClient +from idatui.nexus_client import NexusClient def bench(fn, reps: int) -> tuple[float, float]: @@ -55,7 +55,7 @@ def main() -> int: ap.add_argument("--reps", type=int, default=20) args = ap.parse_args() - client = CodeModeClient(os.path.abspath(args.target)) + client = NexusClient(os.path.abspath(args.target)) client.connect() handle = client._handle diff --git a/experiments/bench_pack_trace.py b/experiments/bench_pack_trace.py index edbb9f7..2b53afd 100644 --- a/experiments/bench_pack_trace.py +++ b/experiments/bench_pack_trace.py @@ -17,7 +17,7 @@ import statistics import time from idatui import remote_ops -from idatui.codemode_client import CodeModeClient +from idatui.nexus_client import NexusClient def timed(function, reps: int = 1) -> tuple[object, float]: @@ -37,7 +37,7 @@ def main() -> int: parser.add_argument("--rows", type=int, default=200) args = parser.parse_args() - client = CodeModeClient(os.path.abspath(args.target)).connect() + client = NexusClient(os.path.abspath(args.target)).connect() index, operations_cold = timed( lambda: client.call(remote_ops.list_funcs, queries=[{"offset": 0, "count": 40}]) diff --git a/experiments/call_census.py b/experiments/call_census.py index 1680691..17a5f94 100644 --- a/experiments/call_census.py +++ b/experiments/call_census.py @@ -1,7 +1,7 @@ """Count backend round-trips per user action. Answers "are we batching, or paying a round-trip per item?" with numbers rather -than intent. Wraps ``CodeModeClient.invoke`` on the live app, drives a headless +than intent. Wraps ``NexusClient.invoke`` on the live app, drives a headless Pilot through realistic actions, and reports calls + wall time + which operations were used for each. @@ -25,7 +25,7 @@ from _fixtures import fast_keys, staged # noqa: E402 fast_keys() from idatui.app import IdaTui, ListingView # noqa: E402 -from idatui.codemode_client import CodeModeClient # noqa: E402 +from idatui.nexus_client import NexusClient # noqa: E402 class Census: @@ -34,18 +34,18 @@ class Census: def __init__(self) -> None: self.ops: collections.Counter = collections.Counter() self.n = 0 - original = CodeModeClient.invoke + original = NexusClient.invoke def counting(client, operation, *a, **kw): self.n += 1 self.ops[operation] += 1 return original(client, operation, *a, **kw) - CodeModeClient.invoke = counting + NexusClient.invoke = counting self._original = original def restore(self) -> None: - CodeModeClient.invoke = self._original + NexusClient.invoke = self._original def span(self, label: str): return _Span(self, label) diff --git a/experiments/profile_client.py b/experiments/profile_client.py index bac130e..84abd8a 100644 --- a/experiments/profile_client.py +++ b/experiments/profile_client.py @@ -21,7 +21,7 @@ import pstats import time from idatui import remote_ops -from idatui.codemode_client import CodeModeClient +from idatui.nexus_client import NexusClient from idatui.domain import Program @@ -35,7 +35,7 @@ def main() -> int: ) args = ap.parse_args() - client = CodeModeClient(os.path.abspath(args.binary)) + client = NexusClient(os.path.abspath(args.binary)) client.connect() program = Program(client) regions = client.call(remote_ops.file_regions) diff --git a/experiments/profile_remote.py b/experiments/profile_remote.py index 97f4fb1..fbf17dc 100644 --- a/experiments/profile_remote.py +++ b/experiments/profile_remote.py @@ -15,7 +15,7 @@ import argparse import os from idatui import remote_ops -from idatui.codemode_client import CodeModeClient +from idatui.nexus_client import NexusClient CALLS = { "heads": ("heads", {"count": 500, "annotate": True}), @@ -36,7 +36,7 @@ def main() -> int: parser.add_argument("--addr", default=None, help="default: the .text start") args = parser.parse_args() - client = CodeModeClient(os.path.abspath(args.binary)).connect() + client = NexusClient(os.path.abspath(args.binary)).connect() addr = args.addr if addr is None: regions = client.call(remote_ops.file_regions) diff --git a/experiments/worker_smoke.py b/experiments/worker_smoke.py index 9b55138..1c2125f 100644 --- a/experiments/worker_smoke.py +++ b/experiments/worker_smoke.py @@ -1,6 +1,6 @@ -"""Exercise the real domain.Program through an IDA Code Mode lease. +"""Exercise the real domain.Program through an IDA Nexus lease. -A matching registered GUI is reused; otherwise Code Mode starts a managed +A matching registered GUI is reused; otherwise IDA Nexus starts a managed idalib worker. Usage: ``uv run python experiments/worker_smoke.py FILE``. """ from __future__ import annotations @@ -9,15 +9,15 @@ import os import sys import time -from idatui.codemode_client import CodeModeClient +from idatui.nexus_client import NexusClient from idatui.domain import Program def main() -> int: target = os.path.abspath(sys.argv[1] if len(sys.argv) > 1 else "experiments/fibonacci.elf") - print(f"attaching Code Mode to {target}…", flush=True) + print(f"attaching IDA Nexus to {target}…", flush=True) started = time.time() - client = CodeModeClient(target) + client = NexusClient(target) client.connect(progress=lambda message: print(f" {message}", flush=True)) print( f" ready in {time.time() - started:.2f}s; backend={client.backend}; " |
