javaperf cpu hotspots

    1

    Finds CPU hot spots in a running Java service via JFR and the javaperf MCP server.

    Free

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+22 more

    javaperf cpu hotspots

    Example session with this skill installed

    My Java service at PID 4521 is hitting 90% CPU under load. Can you find the hot spots?

    • Read your context and instructions
    • Compiled the javaperf cpu hotspots

    I have recorded a 60-second JFR profile for PID 4521. The recording captured 5,842 CPU samples during the load window. The analysis shows the service is heavily CPU-bound, primarily due to intensive JSON serialization and regex matching in the request processing layer.

    CPU Hot Spot Analysis

    RankMethod% SamplesCall PathLikely Cause
    1com.auth.Token.verify()42.1%AuthFilter -> JWT.parseRe-compiling Regex pattern on every call.
    2com.data.Mapper.toJson()28.4%ApiController -> ResponseReflective access in legacy Jackson version.
    3java.util.regex.Pattern.matcher12.8%Token.verifySide effect of Rank 1 method.
    4zip.Deflater.deflateBytes7.2%GzipFilterHigh compression level (9) on small payloads.

    Verdict: The service is compute-bound. 70% of CPU time is spent in two specific methods related to security and serialization.

    Fixes to try:

    1. Cache Regex Patterns: Move the Pattern.compile call in Token.verify() to a static final constant.
    2. Upgrade Jackson: Update jackson-databind to 2.15+ to benefit from improved property cache lookups.
    3. Adjust GZIP: Lower the compression level to 6 or implement a payload size threshold for compression.

    Next steps

    • Apply the static Regex fix and re-run the profile.
    • Verify if the com.data.Mapper can be replaced with a pre-generated serializer.
    • Check compiler_codecache if performance stays inconsistent after fixes.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Finds CPU hot spots in a running Java service by recording JFR under load and ranking the hottest methods and call paths via the javaperf MCP server. Use when the user says the Java backend is slow, has high CPU or latency, wants to find hot spots during a load test, or asks which methods burn the most CPU.

    How to use

    Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free forever

    No account required to browse

    Trust & safety

    Security scanned

    Verified clean 5 days ago

    • Free to download with an account

    Requires

    Node.js
    Jperf MCP

    Listed5 days ago

    What's inside

    Frequently Asked Questions