Skip to content

benchmarking only: move the shared Nighthawk adaptive-load helpers into nighthawk_common - #3628

Merged
Lior Lieberman (LiorLieberman) merged 3 commits into
agent-substrate:mainfrom
ygao-g:nighthawk-common-extract
Nov 13, 2026
Merged

Lior Lieberman (LiorLieberman) merged 3 commits into
agent-substrate:mainfrom
ygao-g:nighthawk-common-extract

Conversation

@ygao-g

@ygao-g Yuan Gao (ygao-g) commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #3624 (Stage 1, item 2): share the adaptive load session spec and output helpers between nighthawk-ingress and the coming nighthawk-egress runner.

What changes

Pure relocation, no behavior change. nighthawk-ingress/output.py and spec.py move to benchmarking/nighthawk_common/. The router-specific parts of the spec builder (router SNI, certificate paths, build_spec_dict) stay in nighthawk-ingress/spec.py, which now calls the generic build_session_spec. Callers and tests import nighthawk_common directly; the ingress Dockerfile copies the package into the image.

Review guide

  1. output.py rename (GitHub shows 100%), two import lines, the Dockerfile COPY, two sys.path lines in the ingress tests.
  2. spec.py rename at 100%, importers repointed, an unused import dropped from actors.py.
  3. The split: read nighthawk_common/spec.py as deletions and nighthawk-ingress/spec.py as the same lines moving back.

Testing

hack/verify/benchmarking-python.sh: the ingress suite passes at each commit, and fails without the new sys.path lines, so the import path is exercised.

Independent of #3627. #3629 and #3630 stack on both.

AI use: AI-assisted for the diff, the commit split and the test runs; I reviewed the diff.

  • Tests pass
  • Docs updated (none needed)

…f nighthawk-ingress

Move nighthawk-ingress/output.py to nighthawk_common unchanged so
nighthawk-egress can reuse it. The ingress Dockerfile copies the package
into the image and the ingress tests put benchmarking/ on sys.path.

Signed-off-by: Yuan Gao <ypgao@google.com>
… out of nighthawk-ingress

Move nighthawk-ingress/spec.py to nighthawk_common unchanged and point its importers at the new path. actors.py imported it without using it.

Signed-off-by: Yuan Gao <ypgao@google.com>
…ut of nighthawk_common

build_session_spec in nighthawk_common now takes a finished traffic template. The router SNI, the certificate paths and build_spec_dict, which assembles that template, move back to nighthawk-ingress/spec.py.

Signed-off-by: Yuan Gao <ypgao@google.com>
@LiorLieberman

Copy link
Copy Markdown
Collaborator

This is a benchmarking only pr that has been already approved. Fine to merge

Merged via the queue into agent-substrate:main with commit cf5768a Nov 13, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants