Install
$ agentstack add skill-linlannet-agent-skills-java-performance ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Java 性能技能
通过分析、GC 调优和内存分析优化 JVM 性能。
概述
本技能涵盖 JVM 性能优化,包括垃圾收集调优、内存分析、CPU 分析和使用 JMH 进行基准测试。
何时使用此技能
当您需要以下操作时使用:
- 为低延迟或吞吐量调优 GC
- 分析 CPU 热点
- 分析内存泄漏
- 基准测试代码性能
- 优化容器设置
快速参考
GC 预设
# High-throughput
-XX:+UseG1GC
-XX:MaxGCPauseMillis=200
-Xms4g -Xmx4g
-XX:+AlwaysPreTouch
# Low-latency
-XX:+UseZGC
-XX:+ZGenerational
-Xms8g -Xmx8g
# Memory-constrained
-XX:+UseSerialGC
-Xms512m -Xmx512m
-XX:+UseCompressedOops
# Container-optimized
-XX:+UseContainerSupport
-XX:MaxRAMPercentage=75.0
-XX:+ExitOnOutOfMemoryError
分析命令
# Thread dump
jstack -l > threaddump.txt
# Heap dump
jmap -dump:format=b,file=heap.hprof
# GC analysis
jstat -gcutil 1000 10
# Flight recording
jcmd JFR.start duration=60s filename=app.jfr
# Async profiler
./profiler.sh -d 30 -f profile.html
JMH 基准测试
@BenchmarkMode(Mode.Throughput)
@Warmup(iterations = 3, time = 1)
@Measurement(iterations = 5, time = 1)
@State(Scope.Benchmark)
public class MyBenchmark {
@Benchmark
public void testMethod(Blackhole bh) {
bh.consume(compute());
}
}
GC 比较
| GC | 延迟 | 吞吐量 | 堆大小 | |----|------|--------|--------| | G1 | 中等 | 高 | 4-32GB | | ZGC | 极低 | 中等 | 8GB-16TB | | Shenandoah | 极低 | 中等 | 8GB+ | | Parallel | 高 | 极高 | 任意 |
故障排除
| 问题 | 原因 | 解决方案 | |------|------|----------| | GC 抖动 | 堆太小 | 增加堆大小 | | 高延迟 | GC 暂停 | 切换到 ZGC | | 内存泄漏 | 对象保留 | 堆转储 + MAT | | CPU 峰值 | 热点循环 | 分析 + 优化 |
使用方法
Skill("java-performance")
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: linlannet
- Source: linlannet/agent-skills
- License: Apache-2.0
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.