0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-28 18:26:15 +01:00
Commit Graph

22 Commits

Author SHA1 Message Date
Karl-Aksel Puulmann
2139a6e204
Add measure.sh helper script to repo (#7877) 2022-01-05 12:46:08 +02:00
Karl-Aksel Puulmann
f3fc669cda
Add benchmark for earliest timestamp sql (#7848) 2021-12-28 15:16:47 +02:00
Karl-Aksel Puulmann
afce8efafb
Add benchmark for funnel query (#7813)
* Add benchmark for funnel query

Testing new sorting order takes the benchmark from 3.5s -> 1.5s \o/

* Update snapshots
2021-12-21 13:09:00 +02:00
Harry Waye
5fb811a365
perf(lifecycle): add benchmark for lifecycle (#7753)
* perf(lifecycle): add benchmark for lifecycle

* Add some notes on running benchmarks locally
2021-12-17 09:36:49 +00:00
Eric Duong
a051f7ee1f
[actors] retention actors (#7495)
* convert to actor form

* change var name

* remove unused imports

* typing issue

* use subquery

* bad import

* groups for general retention query

* actor in period

* update imports

* update test

* remove comment
2021-12-09 10:11:21 -05:00
Karl-Aksel Puulmann
882d26f4f0
Add daily active users benchmarks (#7556) 2021-12-07 18:17:03 +02:00
James Greenhill
b7df925186
Revert "Add logging to all postgresql queries with query context (#7486)" (#7512)
This reverts commit 3287c48f53.
2021-12-03 12:07:19 -08:00
Eric Duong
4e0e69ac91
[actors] Stickiness actor pattern (#7440)
* separate class

* filter typing

* remove repeat

* refactor test

* add limits

* remove ee

* working tests

* working group tests for stickiness

* remove inits

* suggested changes

* typing

* adjust typing

* add correct params

* remove repeat
2021-12-02 11:43:20 -05:00
Karl-Aksel Puulmann
3287c48f53
Add logging to all postgresql queries with query context (#7486)
* Add logging to all postgresql queries with query context

Uses the exact same pattern as we do currently for clickhouse, just
hooking in there differently

* Support psycopg2.sql.SQL

* Better docs

* update a test
2021-12-02 16:08:26 +02:00
Harry Waye
79816a9715
feat(retention): add support for multiple breakdown props (#7431)
* test(retention): add http api tests for retention breakdowns

This just adds tests for person and event property breakdowns

* Add helper function for substituting clickhouse sql params

* feat(retention): add support for multiple breakdown props

This just reuses the work done for funnel multiple breakdown values. I
haven't tested this with anything other than person or event properties.
Rather than try to get it working for all the other property types.

The change adds a new `breakdowns` parameter to the retention endpoint,
that is the same as for funnels, e.g. it looks like:

```
{
    ...
    "breakdowns": [{"type": "person", "property": "os"}, ...]
    ...
}
```

The return structure is the same as the non-breakdown version, except we
also include a `breakdown_values` property that is e.g. `["Chrome",
"95"]`, and the `label` attribute for this case would be "Chrome::95".

* fix typing

* update query snapshots

* remove unused imports

* use `self.assertEqual` instead of `assert`

* Remove explicit should_join_persons

* Revert limit by changes, use breakdown_type

* update snapshots

* fix typing

* use json_encode_request_params in retention test requests

* update json_encode_request_params to encode_get_request_params to better reflect purpose

* perf(retention): add benchmark query for retention with breakdown

* no materialize
2021-12-02 13:35:33 +00:00
Harry Waye
eed62dad9f
perf(retention): add benchmark cases for retention (#7483)
This was pretty much as copy paste job from the stickiness cases. I'm
going to be merging in some changes to retention so I want to get this
in first such that we can see if it affects the perf of these queries at
all. I don't think it touches them, as seen by the snapshot queries
generated by the retention tests not changing in
https://github.com/PostHog/posthog/pull/7431 but better safe than sorry.

Addresses [this comment](https://github.com/PostHog/posthog/pull/7431#pullrequestreview-820773405)
2021-12-02 10:38:49 +00:00
Karl-Aksel Puulmann
98a58648e2
Add benchmarks for session recording page (#7251) 2021-11-22 20:10:09 +00:00
Karl-Aksel Puulmann
bf28d14aed
Add some benchmarks for stickiness (#7116)
* Add benchmarks for stickiness

* Don't require get_earliest_timestamp always

* Improve benchmark
2021-11-15 13:38:11 +02:00
Neil Kakkar
283319adfc
Modify query to not use properties for autocapture (#6711)
* modify query to not use properties for autocapture

* address comments

* add benchmark test to check if worth materialising
2021-10-28 13:12:26 +01:00
Neil Kakkar
850075979c
Add event with properties benchmark (#6666) 2021-10-26 17:19:24 +01:00
Karl-Aksel Puulmann
becaee3abd
Add benchmarks for trends + actions (#6354) 2021-10-12 10:18:23 +03:00
Neil Kakkar
7ff7c5b7cc
Update param name in benchmarks (#6324) 2021-10-08 14:44:00 +03:00
Karl-Aksel Puulmann
7461f90153
Simplify cohort filters (#6277)
* WIP: Create new property types for simplified cohorts

* Add documentation on simplified_cohort_filter_properties

* Handle static-cohort/precalculated-cohort property types

* Handle new property filters properly

* Add casting

* Test cohorts in more cases

* Fix a bug

* Fix benchmark simplifying

* Avoid redoing work every setup for benchmarks

* Update typing;

* Remove unneeded scope

* Add tests for simplifying and cohorts

* Roll more of "do we need to join persons table" behavior into ClickhousePersonQuery class

* Handle precalculated cohort logic in sessions

* Simplify event query

* More tests without any JSONExtract

* Simplify entity properties as well

* Improve docstring

* Add test for breakdown & precalculated cohorts

* Add test for filtering sessions by precalculated cohorts

* Reset unneeded change

* Update cohort

* Solve some typing issues

* Update benchmarking

* Fix cohort filtering tests

* Fix cohort tests

* Fix a caching issue

* Typecheck

* Handle exclusion filters
2021-10-08 10:51:11 +03:00
Neil Kakkar
cfe9844a09
Add benchmarks for correlation (#6307)
* Add benchmarks for correlation
2021-10-07 14:12:56 +00:00
Karl-Aksel Puulmann
fda8313be6
Use fixed benchmarking version (#6247)
This way adding new benchmarks/setup code does not invalidate the
existing code.
2021-10-05 13:24:10 +03:00
Karl-Aksel Puulmann
0512972426
Add benchmarks for cohort filtering in trends (#6244)
* Add benchmarks for cohort filtering in trends

* Add a way to manually trigger benchmarking
2021-10-05 12:16:55 +03:00
Karl-Aksel Puulmann
437b2982cd
Benchmarking suite for ClickHouse queries (#6187)
* Add asv code

* Get a benchmark running

* better output folder

* Move benchmark file

* Cleanup of config

* Run a query and benchmark

* Skip benchmarks for isort

* Set up materialized columns before test

* Better skipping logic

* Add first proper benchmark, add some documentation

* Person property filtering

* Add new workflow

* Show stderr in test run

* Continue debugging actions

* Try to save benchmark results to separate repo

* Output to main directory

* Scheduling

* Remove if temporarily

* Int for ms

* Comment on the PR

* Collapsible section

* Update README

* Clarification

* Remove h3

* Remove pyproject.toml, .gitignore changes that are unneeded
2021-10-01 15:20:58 +03:00