--- warning: DO NOT CHANGE THIS MANUALLY, THIS IS GENERATED BY https://github.com/duckdb/community-extensions repository, check README there title: quack_flamegraph excerpt: | DuckDB Community Extensions Query Brendan Gregg folded CPU/allocation profiles as DuckDB tables extension: name: quack_flamegraph description: Query Brendan Gregg folded CPU/allocation profiles as DuckDB tables version: 0.1.0 language: Rust build: cargo license: MIT excluded_platforms: "wasm_mvp;wasm_eh;wasm_threads;windows_amd64_rtools;windows_amd64_mingw;linux_amd64_musl" requires_toolchains: "rust;python3" maintainers: - kevintruong repo: github: kevintruong/quack-flamegraph ref: 253fab90fe4dcddc70f519ea79bd42dd74ce0d3d docs: hello_world: | INSTALL quack_flamegraph FROM community; LOAD quack_flamegraph; -- Hottest self time SELECT leaf, exclusive FROM flamegraph_exclusive('cpu.folded') ORDER BY exclusive DESC LIMIT 10; -- Sample coverage (inclusive) SELECT frame, inclusive FROM flamegraph_inclusive('cpu.folded') ORDER BY inclusive DESC LIMIT 10; -- Raw stacks SELECT list_extract(frames, -1) AS leaf, samples FROM read_folded('cpu.folded') ORDER BY samples DESC LIMIT 10; extended_description: | `quack_flamegraph` reads [folded stack](https://www.brendangregg.com/FlameGraphs/cpuflamegraphs.html) files produced by `stackcollapse-*`, `perf --folded`, samply/xctrace collapse, and similar tools. ### Functions - `read_folded(path)` — table function returning `frames VARCHAR[]`, `samples BIGINT`, `source VARCHAR` - `flamegraph_exclusive(path)` — leaf self-time (`GROUP BY` last frame) - `flamegraph_inclusive(path)` — `unnest(frames)` (recursive names inflate) - `flamegraph_coverage(path)` — unique-stack sample presence (`list_distinct`) - `flamegraph_edges(path)` — parent→child sample mass - `flamegraph_hot_stacks(path)` — stacks ordered for concentration checks The parser drops zero-sample parent frames (common in Instruments/sample collapse), takes the last space-separated field as the count, and strips an optional `Thread_…:` prefix. Built with DuckDB's [Rust C Extension API template](https://github.com/duckdb/extension-template-rs). extension_star_count: 1 extension_star_count_pretty: 1 extension_download_count: 716 extension_download_count_pretty: 716 image: '/images/community_extensions/social_preview/preview_community_extension_quack_flamegraph.png' layout: community_extension_doc --- ### Compatibility Matrix This table covers all DuckDB releases that have not reached [end-of-life](https://duckdb.org/release_calendar), including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.
| Platform | 1.4.4 | 1.4.5 | 1.5.5 | 1.5.6 | 2.0.0 | | :--- | :---: | :---: | :---: | :---: | :---: | | Linux AMD64 | ❌ | ❌ | ✅ | ❌ | ❌ | | Linux ARM64 | ❌ | ❌ | ✅ | ❌ | ❌ | | macOS AMD64 | ❌ | ❌ | ✅ | ❌ | ❌ | | macOS ARM64 | ❌ | ❌ | ✅ | ❌ | ❌ | | Windows AMD64 | ❌ | ❌ | ✅ | ❌ | ❌ | | Windows ARM64 | ❌ | ❌ | ❌ | ❌ | ❌ | | WebAssembly | ❌ | ❌ | ❌ | ❌ | ❌ | ### Installing and Loading ```sql INSTALL {{ page.extension.name }} FROM community; LOAD {{ page.extension.name }}; ``` {% if page.docs.hello_world %} ### Example ```sql {{ page.docs.hello_world }}``` {% endif %} {% if page.docs.extended_description %} ### About {{ page.extension.name }} {{ page.docs.extended_description }} {% endif %} ### Added Functions
| function_name | function_type | description | comment | examples | |-----------------------|---------------|-------------|---------|----------| | flamegraph_coverage | table_macro | NULL | NULL | | | flamegraph_edges | table_macro | NULL | NULL | | | flamegraph_exclusive | table_macro | NULL | NULL | | | flamegraph_hot_stacks | table_macro | NULL | NULL | | | flamegraph_inclusive | table_macro | NULL | NULL | | | read_folded | table | NULL | NULL | | ### Overloaded Functions
This extension does not add any function overloads. ### Added Types
This extension does not add any types. ### Added Settings
This extension does not add any settings.