Skip to content

[jules] Profile agent tool dispatch overhead, parameter schema validation time, and concurrent call handling - #22

Merged
teddashh merged 4 commits into
mainfrom
jules/agent-tool-dispatch-profiling-2748463665065343060
Oct 30, 2026
Merged

teddashh merged 4 commits into
mainfrom
jules/agent-tool-dispatch-profiling-2748463665065343060

Conversation

@teddashh

Copy link
Copy Markdown
Contributor

This PR introduces agent tool dispatch profiling and benchmarks.

  • Added dispatchTool in src/agent/dispatch.mjs to profile agent tool dispatch overhead, parameter schema validation time, and handle concurrent calls. The overhead is calculated by subtracting validation time and tool invocation time from the total execution time.
  • Added benchmark tests in tests/dispatch.benchmark.test.mjs to verify dispatchTool correctly returns profiling metrics such as total time, validation time, and dispatch overhead. The test also checks concurrent execution.

Testing:

  • Checked all tests pass with npm test. The newly added benchmark test passed successfully.

PR created automatically by Jules for task 2748463665065343060 started by @teddashh

Add `dispatchTool` in `src/agent/dispatch.mjs` to profile agent tool dispatch overhead, parameter schema validation time, and handle concurrent calls.
Add benchmark test in `tests/dispatch.benchmark.test.mjs` to benchmark `dispatchTool`.

Co-authored-by: teddashh <233386770+teddashh@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules Bot and others added 3 commits October 25, 2026 16:48
… overhead

Reduces the PR to a benchmark test under `tests/` and a profiling script under `scripts/` that measures the existing dispatch code, removing the unused module `src/agent/dispatch.mjs` as requested.
- `tests/dispatch.benchmark.test.mjs` verifies overhead measurement correctly wraps `client.call` and returns positive metrics.
- `scripts/profile-dispatch.mjs` is a utility script that can be executed to log overhead for concurrent platform calls.

Co-authored-by: teddashh <233386770+teddashh@users.noreply.github.com>
Adds tests/dispatch.benchmark.test.mjs that verifies overhead measurement correctly wraps client.call and returns positive metrics for concurrent calls.

Co-authored-by: teddashh <233386770+teddashh@users.noreply.github.com>
@teddashh
teddashh merged commit 0b771f6 into main Oct 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant