Performance
Performance
For heavy traffic, error floods, SQL heavy pages and a full worker pool, see Performance under load.
Requests per second on a demo app (MiniServer, one JVM with 1 GB heap, 8 concurrent clients, 12 seconds per page after a warm up, derby in memory). Read the figures as relative: a run to run difference of 10% is noise.
| Mode | /index.bxm | /orders.bxm | /n-plus-one.bxm | /functions.bxm |
|---|---|---|---|---|
| Installed, bar and console off | 2773 | 1960 | 1737 | 2193 |
Console on, collect.level light | 2194 | 1819 | 1812 | 1935 |
Console on, collect.level full | 2068 | 1801 | 1344 | 1900 |
| Bar shown, light | 1654 | 1408 | 1266 | 1564 |
| Bar shown, full, console on | 1617 | 1373 | 1007 | 1617 |
How it keeps the cost low:
- The bar page carries about 1 KB, not the whole bar. The files are cached by the browser for a year.
- The snapshot JSON is built when somebody looks at it, not for every request. Issue analysis runs only when the console opens a request.
- Statistics, the history entry and the audit log run on one background thread with a bounded queue.
- A request walks the collectors without a lock, and event data is built only when something listens.
At light a profile (JFR) shows Lens in about 5% of the CPU samples. Most of what is left in the full modes is the lookup of the calling template and line for every query, which collectors.queries.captureCaller turns off.