Skip to content

[#140] Add initial JMH benchmark baseline for agentscope-core#1143

Open
Alexxigang wants to merge 2 commits intoagentscope-ai:mainfrom
Alexxigang:feat/core-jmh-benchmarks
Open

[#140] Add initial JMH benchmark baseline for agentscope-core#1143
Alexxigang wants to merge 2 commits intoagentscope-ai:mainfrom
Alexxigang:feat/core-jmh-benchmarks

Conversation

@Alexxigang
Copy link
Copy Markdown
Contributor

Summary

  • adds a first-phase JMH benchmark harness in �gentscope-core
  • covers three core baseline paths: single ReActAgent calls, sequential pipeline orchestration, and MsgHub lifecycle/broadcast behavior
  • wires Maven execution so contributors can compile and run focused benchmarks from the reactor build

Why this change

Issue #140 asks for a maintainable performance benchmark baseline. Implementing the entire matrix in one pass would be heavy and hard to review, so this PR focuses on a concrete phase 1 baseline in the core module:

  • it establishes the JMH dependency and annotation-processing setup
  • it adds reusable benchmark fixtures with mock-model-backed scenarios
  • it makes future benchmark expansion straightforward without introducing a new top-level module yet

Validation

  • mvn -pl agentscope-core -am spotless:apply
  • mvn -pl agentscope-core -am -DskipTests test-compile
  • mvn -pl agentscope-core -am -rf :agentscope-core -DskipTests -Dbenchmark.include=.ReActAgentBenchmark. -Dbenchmark.warmupIterations=1 -Dbenchmark.measurementIterations=1 -Dbenchmark.forks=1 test-compile exec:exec@run-benchmarks

Scope note

This PR partially addresses #140 by delivering the initial benchmark harness and first baseline scenarios. Additional benchmark cases can be layered on top of this harness in follow-up PRs.

AI assistance

This PR was prepared with AI-assisted tooling, with implementation, validation, and final review performed locally before submission.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 5, 2026

Codecov Report

❌ Patch coverage is 76.92308% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...io/agentscope/core/session/mysql/MysqlSession.java 76.92% 9 Missing ⚠️

📢 Thoughts on this report? Let us know!

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