~/talk

Using Java Microbenchmark Harness (JMH) in a real world project

Talkat Joker 2015 · 2015-10-16..10-17· [testing, java]
slides:none on file

Practical guide to adding JMH to a real project: use the JMH harness with Gradle + Shadow to build a fat JAR, run benchmarks via a custom Options API runner, and store results for CI; watch for default 10‑minute timeouts and set per‑benchmark to a day for long setups. Measured surprises: boxed Long keys create 1.3 GB/s garbage, case‑insensitive map caching runs 7–15× faster, batching DB writes gives ~5×, a pivot rewritten in SQL is 49× faster, and overall work build time cut from 3h to 45m.

AI-written summary · about

  1. 0:00Introduction
  2. 1:08Benchmarking challenges
  3. 4:26JMH features
  4. 8:06Benchmarking workflow
  5. 11:04Setting up the harness
  6. 14:18Results and Jenkins
  7. 16:05JMH best practices
  8. 20:30Optimization stories
  9. 24:34Memory pressure
  10. 27:10Reflection optimization
  11. 29:05Object creation
  12. 30:48Array operations
  13. 32:46API design
  14. 34:26Database vs calculation
  15. 36:29N+1 query problem
  16. 37:41Conclusion and Q&A
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.