Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Experimental] split stream header into 3 separate headers #656

Merged
merged 3 commits into from
Dec 16, 2024

Conversation

DavidBadura
Copy link
Member

@DavidBadura DavidBadura commented Dec 13, 2024

For the experimental stream store, only the stream name is required.

The requirement that 4 values ​​must be present, like the AggregateHeader has, dont exists in StreamHeader.
That's why I have now split this header into 3 headers, so we don't have to deal with nullable values.

  • StreamNameHeader
  • PlayheadHeader
  • RecordedOnHeader

Copy link

github-actions bot commented Dec 13, 2024

Hello 👋

here is the most recent benchmark result:

SimpleSetupBench
================

+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                                        | time (kde mode)                                     | memory                                     |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                                | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad1Event ()                     | 963.100μs (±0.00%) | 962.900μs (±0.00%) | +0.02%    | 34.266mb        | 34.274mb   | -0.02%      |
| benchLoad10000Events ()                | 50.655ms (±0.00%)  | 49.249ms (±0.00%)  | +2.85%    | 34.266mb        | 33.765mb   | +1.48%      |
| benchSave1Event ()                     | 1.031ms (±0.00%)   | 1.063ms (±0.00%)   | -2.96%    | 33.765mb        | 33.765mb   | 0.00%       |
| benchSave10000Events ()                | 218.484ms (±0.00%) | 227.306ms (±0.00%) | -3.88%    | 33.765mb        | 33.765mb   | 0.00%       |
| benchSave10000Aggregates ()            | 7.920s (±0.00%)    | 8.735s (±0.00%)    | -9.33%    | 33.765mb        | 33.765mb   | 0.00%       |
| benchSave10000AggregatesTransaction () | 4.880s (±0.00%)    | 4.890s (±0.00%)    | -0.21%    | 33.765mb        | 33.765mb   | 0.00%       |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

SnapshotsBench
==============

+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                                        | time (kde mode)                                     | memory                                     |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                                | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad10000EventsMissingSnapshot () | 49.804ms (±0.00%)  | 51.038ms (±0.00%)  | -2.42%    | 33.836mb        | 33.836mb   | 0.00%       |
| benchLoad10000Events ()                | 910.700μs (±0.00%) | 916.600μs (±0.00%) | -0.64%    | 33.836mb        | 33.836mb   | 0.00%       |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

SubscriptionEngineBatchBench
============================

+---------------------------+-------------------+-------------------+-----------+-----------------+------------+-------------+
|                           | time (kde mode)                                   | memory                                     |
+---------------------------+-------------------+-------------------+-----------+-----------------+------------+-------------+
| subject                   | Tag: <current>    | Tag: base         | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+---------------------------+-------------------+-------------------+-----------+-----------------+------------+-------------+
| benchHandle10000Events () | 73.623ms (±0.00%) | 71.395ms (±0.00%) | +3.12%    | 34.234mb        | 34.234mb   | 0.00%       |
+---------------------------+-------------------+-------------------+-----------+-----------------+------------+-------------+

SubscriptionEngineBench
=======================

+---------------------------+-----------------+-----------------+-----------+-----------------+------------+-------------+
|                           | time (kde mode)                               | memory                                     |
+---------------------------+-----------------+-----------------+-----------+-----------------+------------+-------------+
| subject                   | Tag: <current>  | Tag: base       | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+---------------------------+-----------------+-----------------+-----------+-----------------+------------+-------------+
| benchHandle10000Events () | 3.181s (±0.00%) | 3.191s (±0.00%) | -0.31%    | 46.382mb        | 46.382mb   | 0.00%       |
+---------------------------+-----------------+-----------------+-----------+-----------------+------------+-------------+

PersonalDataBench
=================

+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                                        | time (kde mode)                                     | memory                                     |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                                | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad1Event ()                     | 931.000μs (±0.00%) | 909.300μs (±0.00%) | +2.39%    | 34.895mb        | 34.895mb   | 0.00%       |
| benchLoad10000Events ()                | 89.108ms (±0.00%)  | 87.394ms (±0.00%)  | +1.96%    | 34.895mb        | 34.895mb   | 0.00%       |
| benchSave1Event ()                     | 1.641ms (±0.00%)   | 1.591ms (±0.00%)   | +3.17%    | 34.895mb        | 34.895mb   | 0.00%       |
| benchSave10000Events ()                | 250.114ms (±0.00%) | 247.639ms (±0.00%) | +1.00%    | 34.897mb        | 34.897mb   | 0.00%       |
| benchSave10000Aggregates ()            | 12.556s (±0.00%)   | 12.423s (±0.00%)   | +1.07%    | 34.895mb        | 34.895mb   | 0.00%       |
| benchSave10000AggregatesTransaction () | 8.989s (±0.00%)    | 9.026s (±0.00%)    | -0.40%    | 35.396mb        | 35.396mb   | 0.00%       |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

SimpleSetupStreamStoreBench
===========================

+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                                        | time (kde mode)                                     | memory                                     |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                                | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad1Event ()                     | 931.100μs (±0.00%) | 903.900μs (±0.00%) | +3.01%    | 34.734mb        | 34.744mb   | -0.03%      |
| benchLoad10000Events ()                | 51.866ms (±0.00%)  | 45.793ms (±0.00%)  | +13.26%   | 34.734mb        | 34.744mb   | -0.03%      |
| benchSave1Event ()                     | 1.058ms (±0.00%)   | 1.161ms (±0.00%)   | -8.89%    | 34.734mb        | 34.744mb   | -0.03%      |
| benchSave10000Events ()                | 212.713ms (±0.00%) | 206.803ms (±0.00%) | +2.86%    | 34.734mb        | 34.744mb   | -0.03%      |
| benchSave10000Aggregates ()            | 8.249s (±0.00%)    | 8.000s (±0.00%)    | +3.11%    | 34.734mb        | 34.745mb   | -0.03%      |
| benchSave10000AggregatesTransaction () | 4.918s (±0.00%)    | 4.902s (±0.00%)    | +0.31%    | 34.734mb        | 34.745mb   | -0.03%      |
+----------------------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

SplitStreamBench
================

+-------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
|                         | time (kde mode)                                     | memory                                     |
+-------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| subject                 | Tag: <current>     | Tag: base          | time-diff | Tag: <current>  | Tag: base  | memory-diff |
+-------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+
| benchLoad10000Events () | 4.308ms (±0.00%)   | 4.315ms (±0.00%)   | -0.15%    | 37.072mb        | 37.072mb   | 0.00%       |
| benchSave10000Events () | 337.845ms (±0.00%) | 350.202ms (±0.00%) | -3.53%    | 37.144mb        | 37.144mb   | 0.00%       |
+-------------------------+--------------------+--------------------+-----------+-----------------+------------+-------------+

This comment gets update everytime a new commit comes in!

@DavidBadura DavidBadura added this to the 3.6.0 milestone Dec 13, 2024
@DavidBadura DavidBadura changed the title split stream header [Experimental] split stream header into 3 separate headers Dec 13, 2024
src/Store/StreamDoctrineDbalStore.php Outdated Show resolved Hide resolved
@DavidBadura DavidBadura merged commit 7e1d0d6 into 3.6.x Dec 16, 2024
38 of 40 checks passed
@DavidBadura DavidBadura deleted the split-stream-header branch December 16, 2024 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants