timeline command visualizes how samples are distributed over time, showing temporal patterns, peaks, and trends. It requires JFR input (pprof and collapsed formats lack timestamps).
Usage
What It Shows
A time-bucketed view showing:- Time ranges for each bucket
- Sample count or percentage per bucket
- ASCII bar chart for visualization
- Optional hot method annotation per bucket
- Peak detection (buckets > 2× median)
Flags
Number of time buckets. Default
0 means auto (~20 buckets, clamped to 5-40). Cannot be used with --resolution.Fixed bucket width (e.g.,
1s, 500ms, 100ms). Cannot be used with --buckets.Examples: 1s, 500ms, 100ms, 2sOnly count samples containing this method (substring match). When specified, shows what percentage of each bucket contains the method.
Show method percentage per bucket instead of absolute counts. Requires
--method.Omit per-bucket hot method annotation. Speeds up output for large profiles.
Show only the N highest-sample buckets. Default
0 means show all buckets.Compare two events as a ratio:
cpu,wall or wall,cpu. Shows CPU/WALL ratio per bucket.Incompatible with: --event, --method, --pct, --hide, --top, --no-top-methodRemove frames matching this regex before analysis. Affects hot method detection.
Shared Flags
Event type:
cpu, wall, alloc, lock, or hardware counter name. Not usable with --compare.Filter to threads containing this substring.
Start of time window. Examples:
5s, 1m30s, 2m.End of time window. Examples:
10s, 2m, 1m30s.Remove idle leaf frames from analysis.
Examples
Basic Timeline
The bar length is scaled to the maximum bucket. Peak detection highlights buckets > 2× median.
Fixed Resolution
Specific Bucket Count
Method Timeline
HashMap.get, with hot method annotation showing self%.
Method Percentage Per Bucket
Top Buckets Only
Compare CPU and Wall
Thread-Specific Timeline
Time Window Timeline
Disable Hot Method Annotation
Reading the Output
Header
- Total recording duration
- Number of buckets and width of each
- Event type being analyzed
- Total sample count
Timeline Rows
- 9.0s-12.0s: Time range for this bucket
- 678: Sample count in this bucket
- Bar: ASCII visualization (scaled to max bucket)
- <- peak: Annotation for buckets > 2× median
- HashMap.resize (35%): Hottest method in this bucket with self%
Compare Mode
- 678: CPU samples in this bucket
- 721: Wall samples in this bucket
- 0.94: CPU/WALL ratio
Use Cases
Identifying Spikes
Find sudden increases in CPU/memory usage
Warmup Analysis
See how performance changes from start to steady-state
Periodic Patterns
Detect repeated spikes (GC, scheduled tasks, etc.)
Regression Pinpointing
Narrow down when a performance issue started
CPU vs Wall Comparison
Find time periods with high blocking
Method Evolution
See how a method’s impact changes over time