java-profiler
Skill0 starsChanged 13 months agoMITView on GitHub
Enterprise Java profiling for JVM applications, microservices, and distributed systems
In this repository16 other files it gives its agents.
- aws-cost-analyzerSkill
- code-reviewerSkill
- dast-scannerSkill
- database-optimizerSkill
- dependency-checkerSkill
- git-workflowSkill
- jira-integrationSkill
- memory-analyzerSkill
- penetration-testerSkill
- performance-monitorSkill
- python-profilerSkill
- refactoring-assistantSkill
- sast-analyzerSkill
- security-scannerSkill
- skill-validatorSkill
- tdd-workflowSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 158
Profile Realistic Workloads: Use production-like data volumes
- Distinctive: line 178
Profile: Run YourKit/JProfiler during load test
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Java Profiler Skill
Overview
Professional Java profiling skill integrating industry-leading tools for JVM performance analysis, memory management, and thread debugging in enterprise environments.
Capabilities
1. JVM Performance Analysis
- YourKit Java Profiler: Deep profiling for distributed systems
- JProfiler: Advanced UI with real-time metrics
- VisualVM: Built-in monitoring and profiling
- Java Flight Recorder (JFR): Low-overhead production profiling
2. Memory & Heap Analysis
- Heap dump analysis
- Memory leak detection
- Garbage collection tuning
- Object allocation tracking
3. Thread & Concurrency
- Thread contention detection
- Deadlock identification
- CPU sampling per thread
- Wait time analysis
4. Database & I/O
- JDBC query profiling
- Connection pool monitoring
- File I/O performance
- Network latency tracking
Usage
YourKit Profiler
# Attach to running JVM
java -agentpath:/path/to/yjpagent.so MyApplication
# CPU profiling
# Memory allocation tracking
# Thread monitoringVisualVM (Built-in)
# Launch VisualVM
jvisualvm
# Connect to local/remote JVM
# Monitor: CPU, Memory, Threads, Classes
# Profile: CPU sampling, Memory profilingJava Flight Recorder
# Start JFR recording
java -XX:StartFlightRecording=duration=60s,filename=recording.jfr MyApp
# Analyze with JMC
jmc recording.jfrJProfiler Integration
# Remote profiling
java -agentpath:/path/to/jprofilerti.so=port=8849 MyApplication
# Connect JProfiler GUI to port 8849Integration Scripts
jvm_monitor.sh
Automated JVM health monitoring:
#!/bin/bash
# Monitor JVM performance metrics
PID=$(jps | grep MyApplication | awk '{print $1}')
echo "=== JVM Memory Usage ==="
jmap -heap $PID
echo "=== Thread Dump ==="
jstack $PID
echo "=== GC Statistics ==="
jstat -gcutil $PID 1000 5heap_analyzer.sh
Heap dump analysis automation:
#!/bin/bash
# Generate and analyze heap dump
PID=$1
DUMP_FILE="heap_dump_$(date +%Y%m%d_%H%M%S).hprof"
jmap -dump:live,format=b,file=$DUMP_FILE $PID
echo "Heap dump created: $DUMP_FILE"
# Analyze with jhat or VisualVM
jhat $DUMP_FILEPerformance Tuning Guidelines
JVM Arguments for Profiling
-XX:+UseG1GC # Use G1 garbage collector
-XX:MaxGCPauseMillis=200 # Target max GC pause
-Xms2g -Xmx4g # Heap size (min/max)
-XX:+HeapDumpOnOutOfMemoryError # Dump on OOM
-XX:HeapDumpPath=/tmp/heapdumps # Dump location
-XX:+PrintGCDetails # GC logging
-XX:+PrintGCDateStamps # Timestamp GC logsCommon Performance Issues
1. Memory Leaks
- Growing heap usage over time
- Increasing full GC frequency
- OutOfMemoryError exceptions
Detection: Monitor heap growth pattern, analyze retained objects
2. Thread Contention
- High CPU wait time
- Deadlocks and livelocks
- Poor scalability under load
Detection: Thread dumps, lock contention analysis
3. Database Performance
- N+1 query problems
- Missing connection pool configuration
- Unoptimized JDBC batch sizes
Detection: SQL logging, JDBC profiling
4. GC Overhead
- Long GC pause times
- Frequent full GCs
- High GC CPU usage
Detection: GC logs analysis, pause time distribution
Best Practices
- Start with Low-Overhead Tools: JFR for production, VisualVM for development
- Profile Realistic Workloads: Use production-like data volumes
- Focus on Hot Spots: Optimize methods consuming >10% CPU time
- Monitor GC Impact: Aim for <1% CPU time in GC
- Analyze Thread Dumps: Take 3-5 dumps, 10 seconds apart
- Use Sampling Mode initially, switch to instrumentation for deep analysis
Requirements
# Built-in tools (JDK 8+)
jvisualvm, jconsole, jmc, jstat, jmap, jstack, jhat
# Commercial tools (trial/licensed)
YourKit: https://www.yourkit.com/
JProfiler: https://www.ej-technologies.com/products/jprofiler/Example Workflow
- Baseline: Capture performance metrics under normal load
- Profile: Run YourKit/JProfiler during load test
- Analyze: Identify CPU hot spots and memory allocations
- Optimize: Fix identified issues (algorithms, caching, pooling)
- Verify: Re-profile to confirm improvements
- Monitor: Set up continuous monitoring with JFR
Metrics to Track
- Throughput: Requests/second
- Latency: p50, p95, p99 response times
- Memory: Heap usage, allocation rate
- GC: Pause frequency and duration
- Threads: Active thread count, wait time
- CPU: Per-thread CPU time distribution
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

