Skip to content

perf: publish properties with the nightly dataset and measure cached Trino JSON - #1224

Merged
bill-ph merged 3 commits into
mainfrom
claude/perf-unified-suite
Sep 23, 2026
Merged

bill-ph merged 3 commits into
mainfrom
claude/perf-unified-suite

Conversation

@bill-ph

@bill-ph bill-ph commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

A frozen-perf nightly produces two suites, and they published as two unrelated datasets:

  • Table suite: published as posthog-file-views-v1.
  • Properties suite: published as properties-sha256-<inventory hash>.

The dashboard's dataset selector could show one or the other. No single view compared Trino against Duckgres and Athena across the whole run.

This PR is the data half of a one-headline engine comparison. The dashboard half is a follow-up PR in PostHog/grafana-dashboards.

  • One dataset, three new columns on runs and query_results:
    • Both suites now publish under the nightly's dataset_version, shared through a YAML anchor in posthog_frozen_perf.yaml. The properties step fails without it.
    • suite (tables | properties) tells the suites apart. It's a closed set in core, validated when the step starts, so a typo fails before the benchmark rather than at publish.
    • nightly_run_id (the table-suite run's ID) pairs a nightly's suites explicitly. A standalone run is its own nightly.
    • fixture_version records which properties fixture a run measured. Regenerating the fixture is a deliberate history break.
    • The properties run keeps its own run ID and perf-properties/ directory, so the two result sets can't overwrite each other.
  • Publisher:
    • The schema bootstrap adds the columns (ADD COLUMN IF NOT EXISTS) and backfills rows published before they existed, using the -properties suffix those rows carried (WHERE suite IS NULL, so rows with explicit values are never touched). Verified against PostgreSQL 17 with legacy rows and two consecutive bootstraps.
    • A summary without a suite publishes as tables.
  • Cached Trino gets properties coverage: the properties JSON queries now also run on trino_cached, labelled trino (cache). It previously ran only VARIANT, which Hoglake doesn't support, so every engine except cached Trino covered every intent. Now that the Hoglake connector honours fs.cache.enabled (Support shared filesystem caching in Hoglake trino#43), the measurement means something.
  • Docs: the perf README and properties runbook describe the suite model. The README paragraph claiming the connector ignores fs.cache.enabled is replaced; it has been wrong since that change.

Rollout

The dashboard PR (PostHog/grafana-dashboards#539) reads the new columns, which the first publish after this merge creates. The current dashboard would pick the later-starting properties run as "the latest run" once both suites share a dataset.

  1. Merge this PR.
  2. Trigger posthog_frozen_perf on main.
  3. Merge fix(controlplane): honor per-org image pin in warm-pool reserve fallback #539 as soon as that run publishes.

Between the publish and that merge, the current dashboard's table panels are empty (minutes, on a dev perf dashboard).

Testing

go test ./tests/perf/... ./tests/mw-dev/scenario/... passes, with new coverage for:

  • Publisher: suite and fixture_version written on runs and results; the default suite; rejection of an unknown suite; the bootstrap ALTERs and backfills. Exec positions are now derived from the bootstrap length rather than hard-coded.

  • Runner: suite and fixture_version stamped on the summary.

  • Properties catalog: every Duckgres and Trino target measures JSON, and cached Trino JSON gets its own run label.

  • Frozen scenario: properties_comparison shares perf_queries' dataset version.

  • Scenario step: suite, fixture_version and nightly_run_id propagate to the summary; an unknown suite is rejected at step start.

  • Branch validation: run 35922189322 exercises the new cached-Trino properties path on mw-dev.

This is perf tooling only; no duckgres runtime change and no e2e harness change.

🤖 Generated with Claude Code

…Trino JSON

One nightly frozen-perf run produced two unrelated datasets: the table
suite published as posthog-file-views-v1 and the properties suite as
properties-sha256-<inventory hash>, so the dashboard's dataset selector
showed one or the other and no single view compared the engines across
both.

Publish both suites under the nightly's dataset version and tell them
apart with a suite column (tables | properties) on runs and
query_results. The properties inventory hash moves to a fixture_version
column so history still never mixes fixtures. The publisher's schema
bootstrap adds both columns and classifies existing rows by the
-properties run ID suffix; a summary without a suite publishes as
tables, and an unknown suite is rejected.

Also measure the properties JSON queries on trino_cached ("trino
(cache)"). It only ran the unsupported VARIANT representation, so cached
Trino had no properties coverage; now that the Hoglake connector honors
fs.cache.enabled, the measurement is meaningful. Update the README
paragraph that still said the connector ignores the cache.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Sep 23, 2026

Copy link
Copy Markdown

Test Impact Plan

Deterministic summary of how this PR changes tests, CI runners, and coverage-risk signals.

Summary

Area Added Changed Deleted
Test files 1 12 0
E2E/journey files 0 0 0
Workflow files 0 0 0

Signals

  • Test cases: +6 / -0
  • Assertions: +32 / -2
  • Skips or known failures added: 0
  • Workflow continue-on-error added: 0
  • Workflow path filters added: 0
  • Test commands removed from justfile: 0
  • E2E/journey retry lines added: 0

Coverage risk: neutral or increased

No coverage-reduction warnings detected.

bill-ph and others added 2 commits September 23, 2026 17:23
Review fixes:

- Publish an explicit nightly_run_id (the table-suite run's ID) instead
  of leaving consumers to strip a -properties suffix from run IDs.
- Make the column migration one-shot: a guarded DO block adds suite,
  fixture_version and nightly_run_id and classifies older rows only when
  suite is missing, instead of two UPDATE scans on every publish.
- Add duckgres-perf-publisher --bootstrap-only and run it at the start
  of main scenario runs, so the schema (and a dashboard that depends on
  it) can land hours before the first data in the new shape; no window
  where the old dashboard picks the properties run as the latest run.
- Move the suite constants to core and validate the suite when the step
  starts, so a typo fails before the benchmark instead of at publish.
- Share the nightly dataset version through a YAML anchor.
- README: correct the uncached-cache cutoff and stop claiming that
  fixture_version alone keeps history from spanning fixture changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both solved problems that did not justify permanent machinery. The
bootstrap-only CLI mode and workflow step existed to close a one-time
window of a few hours where the dev perf dashboard's table panels would
be empty; merging the dashboard change right after the first publish
does the same. The guarded DO-block migration avoided two UPDATE scans
on a table that grows by ~200 rows a night; plain idempotent ALTERs and
a WHERE suite IS NULL backfill are simpler and just as correct.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bill-ph
bill-ph merged commit ca5d7b2 into main Sep 23, 2026
29 checks passed
@bill-ph
bill-ph deleted the claude/perf-unified-suite branch September 23, 2026 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant