openmeter icon indicating copy to clipboard operation
openmeter copied to clipboard

Feat/perf testing

Open GAlexIHU opened this issue 3 months ago • 0 comments

Overview

Adds comparative performance tests for using projections versus materialized views & for baselining raw query execution compared to OpenMeter performance.

Based on the results projections have around 2-3x worse performance compared to using materialized views. The sample tests were run on 1M events with the default configuration in perf/configs. Sample screenshots of the test runs: Screenshot 2024-03-24 at 22 11 35 (see MATERIALISED & PROJECTION lines) Screenshot 2024-03-24 at 22 16 46 (see CLICKHOUSE & OPENMETER lines)

For running the tests for yourself check docs/perftest.md and perf/k6/README.md

Fixes #700

Notes for reviewer

Still in draft as the dagger automation for perf tests currently hangs.

Checklist

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings
  • [x] I have added tests that prove my fix is effective or that my feature works
  • [x] New and existing unit tests pass locally with my changes

GAlexIHU avatar Mar 24 '24 21:03 GAlexIHU