Commit 7a11c57
feat(profiling): Convert JFR converter script to use fat jar for 31x speedup
Replaced Gradle-based execution with a fat jar approach for dramatic
performance improvement in the JFR to OTLP conversion script.
Performance improvement:
- Previous: ~13+ seconds (Gradle overhead)
- New: ~0.4 seconds (< 0.5s total)
- Speedup: ~31x faster
- Actual conversion time: ~120ms (unchanged)
Implementation:
- Added shadowJar task to build.gradle.kts with minimization
- Modified convert-jfr.sh to use fat jar directly via java -jar
- Added automatic rebuild detection based on source file mtimes
- Jar only rebuilds when source files are newer than jar
- Cross-platform mtime detection (GNU stat → BSD stat fallback)
- Suppressed harmless SLF4J warnings (defaults to NOP logger)
Features:
- Automatic jar rebuild only when source files change
- Fast startup (no Gradle overhead)
- Clean output with SLF4J warnings filtered
- All existing diagnostics and features preserved
Fat jar details:
- Size: 1.9MB (minimized with shadow plugin)
- Location: build/libs/profiling-otel-*-cli.jar
- Main-Class manifest entry for direct execution
- Excludes unnecessary SLF4J service providers
Documentation:
- Updated CLI.md to highlight performance improvements
- Noted fat jar usage instead of Gradle task
Example:
./convert-jfr.sh --diagnostics recording.jfr output.pb
Total time: 0.4s (vs 13+ seconds with Gradle)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent f3439fc commit 7a11c57
File tree
3 files changed
+119
-15
lines changed- dd-java-agent/agent-profiling/profiling-otel
- doc
3 files changed
+119
-15
lines changedLines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
62 | 76 | | |
63 | 77 | | |
64 | 78 | | |
| |||
Lines changed: 103 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
| |||
93 | 98 | | |
94 | 99 | | |
95 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
96 | 183 | | |
97 | 184 | | |
98 | 185 | | |
| |||
127 | 214 | | |
128 | 215 | | |
129 | 216 | | |
130 | | - | |
131 | | - | |
| 217 | + | |
| 218 | + | |
132 | 219 | | |
133 | 220 | | |
134 | 221 | | |
| |||
186 | 273 | | |
187 | 274 | | |
188 | 275 | | |
189 | | - | |
| 276 | + | |
| 277 | + | |
190 | 278 | | |
191 | | - | |
| 279 | + | |
192 | 280 | | |
193 | | - | |
194 | | - | |
195 | | - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
196 | 285 | | |
197 | | - | |
| 286 | + | |
198 | 287 | | |
199 | 288 | | |
200 | 289 | | |
201 | | - | |
202 | | - | |
| 290 | + | |
| 291 | + | |
203 | 292 | | |
204 | 293 | | |
205 | 294 | | |
| |||
213 | 302 | | |
214 | 303 | | |
215 | 304 | | |
216 | | - | |
| 305 | + | |
217 | 306 | | |
218 | 307 | | |
219 | 308 | | |
| |||
235 | 324 | | |
236 | 325 | | |
237 | 326 | | |
238 | | - | |
239 | | - | |
240 | | - | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
241 | 330 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
384 | | - | |
| 384 | + | |
| 385 | + | |
385 | 386 | | |
386 | 387 | | |
387 | 388 | | |
| |||
0 commit comments