Skip to content
Query-farmPublic

About

Decode pprof profiles in DuckDB with SQL — flatten samples/stacks/functions for bulk profile diffing and CI gates. A VGI worker.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Query.Farm

vgi-pprof

CI Latest release Documentation on Orchard License: MIT vgi worker: query.farm

vgi-pprof · a VGI worker by Query.Farm

A VGI worker that decodes pprof profiles — the gzip-wrapped profile.proto produced by Go, gperftools, Parca, Pyroscope, py-spy, etc. — into rows, so SRE and performance teams can bulk-diff profiles in SQL and wire CI performance-regression gates.

Documentation and hosting on Orchard: every function and table with runnable examples; run it yourself or let Query.Farm host it

Quick start

SET allow_extension_repositories = 'allowed';

CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
    WITH PREFIX 'https://duckdb-extensions.query.farm';

INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;

ATTACH 'pprof' AS pprof (
  TYPE vgi,
  LOCATION 'github-auto://Query-farm/vgi-pprof'
);

-- A heap profile's sample value types, sampling period, and duration.
SELECT sample_types, period, duration_nanos
FROM pprof.main.meta(
  from_base64(
    'H4sIAAAAAAAA/zyMMU6EQBSGndlh9+0A+rKJES0MUhEKSV4sLI2VZ7DRAUeDIhCBwu7dRGNl6w3sPYaF1zAMxmbyzf++fFqBQKkVLFBpBZ7jJarNNkgQG7hhPkuZ9w8QBDKzjJg/Zbo6FckOCBQRv7JMpkiQ7IKchjc3LPAkUSDxKNMgECKI16nONEjUkY799DDTsMAgCmI/Jdqi0NR1W161xb0th568sh2bgfx57TtTWvKK58H2FFbN2Nt/05+/s7LJx/4pr9vS1HlRNbnpOlo/mqo5nh5aObxrKXTg4mawBI6mQ/AnP9jz8ZY8V71gfv/4fvn52rtUEKK6Zo675W8AAAD//wt6pw46AQAA'
  )
)
WHERE error IS NULL;

-- Look up which value slot holds CPU time for a Go CPU profile (and in what
-- unit).
SELECT value_index, sample_type, unit
FROM pprof.main.sample_type_guide
WHERE producer = 'Go' AND profile_kind = 'cpu'
ORDER BY value_index;

-- Inspect the per-sample labels (e.g. a heap profile's size_class tag)
-- carried alongside the values.
SELECT sample_id, labels, value
FROM pprof.main.samples(
  from_base64(
    'H4sIAAAAAAAA/yyNMU7DQBBF2ckaxuugjNJgpbJcWSkIGiEELRVnoAn2skEgy468ThBUcxNaWm4Q0XIMCq6BvEn1Zt7X1zcaFYHROCI9nSKgIiESEZhpjOh4RoMRgVRkB8XJtconqEilshPIh3KTTxAG8R0EUDw3qAhTzOLicW4QyKQmSwrkIz4t67q1y7Z6cbb3HNl20/Sc7K1fl9ZxVL31zrPxz+9uaevSe9aXFzdXnCx8t114121dx+M9zwM4PnxPLdPhbNzr7Wa1ch3HVeAQRmHiTuTz6/fj7+fsXuOY9INIth79BwAA//+aqrQCCgEAAA=='
  )
)
WHERE error IS NULL
LIMIT 5;

Documentation

  • Orchard: vgi-pprof: every function and table, with examples you can run, and setup for each way to run the worker (release binary, signed Docker image, or your own server).
  • Catalog reference: the full list of functions and tables with their arguments and columns.
  • Executed notebooks: worked analyses using the published worker.
  • What is VGI?: the protocol that connects workers like this one to DuckDB.

VGI: Vector Gateway Interface

License

MIT, see LICENSE. Written by Query.Farm.

Copyright 2026 Query Farm LLC - https://query.farm

About

Decode pprof profiles in DuckDB with SQL — flatten samples/stacks/functions for bulk profile diffing and CI gates. A VGI worker.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages