Commit Graph
17 Commits
Author SHA1 Message Date
Antonio AndelicandClaude Opus 4.6 9b905689c8 Set max_block_size to 500 for collapsed jemalloc profile output
Minimize memory usage when querying `system.jemalloc_profile_text` in
collapsed format by streaming results in small blocks instead of
buffering up to 65K rows.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-02-28 23:48:19 +01:00
Antonio AndelicandClaude Opus 4.6 bc7e8e3c51 Fix queryId TDZ error and rename getQueryFlameGraphProfile to getQueryCollapsedProfile
Remove duplicate `const queryId` declaration inside the `try` block of
`getQueryCollapsedProfile` that shadowed the outer one, causing a
"Cannot access 'queryId' before initialization" ReferenceError every
time the function was called.

Rename the function from `getQueryFlameGraphProfile` to
`getQueryCollapsedProfile` to better reflect what it does: it fetches
collapsed stack data and renders it as text with action buttons,
rather than generating the flame graph itself.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-02-25 17:32:20 +01:00
Antonio AndelicandClaude Opus 4.6 57bebd0a51 Show query profile output as text with action buttons in jemalloc dashboard
Change the Query Profiler's Flame Graph section to show the collapsed
profile data in a text box (matching the Global Profiler output style)
instead of directly generating and downloading an SVG. The button is
now "Get Profile" and the output card includes Copy All, Save,
Generate Flame Graph, and Close buttons.

Extract shared helper functions parameterized by result div ID to
deduplicate profile output code between Global and Query Profiler:
`getFullProfileText`, `copyProfileOutput`, `saveProfileOutput`,
`closeProfileOutput`, `showMoreProfileLines`,
`downloadFlameGraphFromProfile`, and `renderProfileOutputCard`.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-02-25 15:18:58 +01:00
Antonio AndelicandClaude Opus 4.6 e5fdb872cd Improve query profiler in jemalloc dashboard
- Add `SETTINGS allow_introspection_functions = 1` to the `flameGraph`
  query so it works without requiring the setting globally.
- Handle `SYSTEM FLUSH LOGS` failure gracefully: show a warning instead
  of aborting, since the user may lack privileges (e.g. readonly mode).
- Preserve the flush warning when no trace log data is found, so the
  user knows the data may appear after a delay.
- Fix empty result detection: `min`/`max` return default values (0)
  on empty sets, not empty strings.
- Darken light theme `--warning-color` for better readability.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-02-24 16:55:09 +01:00
Antonio AndelicandClaude Opus 4.6 1eedff02b5 Check actual jemalloc profiling state via system.asynchronous_metrics
Query `jemalloc.prof.thread_active_init` from `system.asynchronous_metrics`
instead of the config value from `system.server_settings` to reflect
whether profiling is truly active at the jemalloc level.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-02-24 14:56:48 +01:00
Antonio AndelicandClaude Opus 4.6 a2a9eec8d2 Add connection params UI and improve auth in jemalloc.html
- Add URL, user, and password input fields to the header, matching
  the pattern used in `dashboard.html`
- Extract `buildUrl` helper and shared `fetchOptions` to deduplicate
  URL building across all fetch call sites
- Add `add_http_cors_header` and `enable_http_compression` to requests
- Add `Authorization: never` header to suppress browser auth popups
- Change profiling check to query `system.server_settings` for
  `jemalloc_enable_global_profiler` instead of `system.asynchronous_metrics`
- Wrap initialization in `start()` function for compatibility with
  dataplanectl credential injection

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-02-24 10:04:18 +01:00
Antonio AndelicandClaude Opus 4.6 2974936649 jemalloc.html: rename jemalloc_profile to jemalloc_profile_text, set default auto-refresh to 60s
Rename `system.jemalloc_profile` to `system.jemalloc_profile_text` and
the corresponding settings (`jemalloc_profile_output_format`,
`jemalloc_profile_symbolize_with_inline`, `jemalloc_profile_collapsed_use_count`)
to their `jemalloc_profile_text_*` equivalents, following the server-side rename.

Also change the default auto-refresh interval from 10s to 60s.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-02-23 13:58:41 +01:00
Antonio Andelic b8df9f1e0c better 2026-02-20 15:35:06 +01:00
Antonio Andelic a314fd66bb Better 2026-02-19 17:01:26 +01:00
Antonio Andelic 8e76ede05e Add tip for Claude 2026-02-19 15:32:56 +01:00
Antonio Andelic 4b56c65910 Add query profiler 2026-02-18 12:58:28 +01:00
Antonio Andelic 3aa1fac84f Better output 2026-02-18 11:42:09 +01:00
Antonio Andelic 5debb878c2 generate flamegraph 2026-02-18 11:25:16 +01:00
Antonio Andelic 12185df54e Add button 2026-02-18 10:33:11 +01:00
Antonio Andelic 7c83545d48 Fetch profiles in UI 2026-02-18 10:18:35 +01:00
Antonio Andelic 0e6691aa50 More improvements 2026-02-17 10:42:09 +01:00
Antonio Andelic 77173af567 Add visualization 2026-02-16 15:36:49 +01:00