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

hydrator component #223

Merged
merged 1 commit into from
Apr 24, 2022
Merged

hydrator component #223

merged 1 commit into from
Apr 24, 2022

Conversation

DavidBadura
Copy link
Member

move hydrator logic into own class

close #221

@DavidBadura DavidBadura added this to the 2.0.0 milestone Apr 23, 2022
@github-actions
Copy link

Hello 👋

here is the most recent benchmark result:

LoadEventsBench
===============

Average iteration times by variant

99.5ms    │ ██ 
87.0ms    │ ██ 
74.6ms    │ ██ 
62.2ms    │ ██ 
49.7ms    │ ██ 
37.3ms    │ ██ 
24.9ms    │ ██ 
12.4ms    │ ██ 
          └────
            1  

[█ <current>] [█ base] 

1: benchLoadEvents 

Memory by variant

19.1mb    │ ██ 
16.7mb    │ ██ 
14.3mb    │ ██ 
11.9mb    │ ██ 
9.5mb     │ ██ 
7.2mb     │ ██ 
4.8mb     │ ██ 
2.4mb     │ ██ 
          └────
            1  

[█ <current>] [█ base] 

1: benchLoadEvents 

+--------------------+-------------------+-------------------+-----------------+------------+
|                    | time (kde mode)                       | memory                       |
+--------------------+-------------------+-------------------+-----------------+------------+
| subject            | Tag: <current>    | Tag: base         | Tag: <current>  | Tag: base  |
+--------------------+-------------------+-------------------+-----------------+------------+
| benchLoadEvents () | 98.229ms (±0.34%) | 99.454ms (±1.71%) | 19.070mb        | 19.066mb   |
+--------------------+-------------------+-------------------+-----------------+------------+

LoadEventsWithSnapshotsBench
============================

Average iteration times by variant

294.3μs   │ ██ 
257.5μs   │ ██ 
220.7μs   │ ██ 
183.9μs   │ ██ 
147.1μs   │ ██ 
110.4μs   │ ██ 
73.6μs    │ ██ 
36.8μs    │ ██ 
          └────
            1  

[█ <current>] [█ base] 

1: benchLoadEvents 

Memory by variant

13.1mb    │ ██ 
11.4mb    │ ██ 
9.8mb     │ ██ 
8.2mb     │ ██ 
6.5mb     │ ██ 
4.9mb     │ ██ 
3.3mb     │ ██ 
1.6mb     │ ██ 
          └────
            1  

[█ <current>] [█ base] 

1: benchLoadEvents 

+--------------------+--------------------+--------------------+-----------------+------------+
|                    | time (kde mode)                         | memory                       |
+--------------------+--------------------+--------------------+-----------------+------------+
| subject            | Tag: <current>     | Tag: base          | Tag: <current>  | Tag: base  |
+--------------------+--------------------+--------------------+-----------------+------------+
| benchLoadEvents () | 294.293μs (±1.22%) | 291.041μs (±1.67%) | 13.073mb        | 13.069mb   |
+--------------------+--------------------+--------------------+-----------------+------------+

WriteEventsBench
================

Average iteration times by variant

44.8ms    │    ██ 
39.2ms    │    ██ 
33.6ms    │    ██ 
28.0ms    │    ██ 
22.4ms    │    ██ 
16.8ms    │    ██ 
11.2ms    │    ██ 
5.6ms     │ ▃▃ ██ 
          └───────
            1  2  

[█ <current>] [█ base] 

1: benchSaveOneEvent    2: benchSaveAfterThous᠁ 

Memory by variant

7.0mb     │ ▃▃ ██ 
6.1mb     │ ██ ██ 
5.2mb     │ ██ ██ 
4.4mb     │ ██ ██ 
3.5mb     │ ██ ██ 
2.6mb     │ ██ ██ 
1.7mb     │ ██ ██ 
871.9kb   │ ██ ██ 
          └───────
            1  2  

[█ <current>] [█ base] 

1: benchSaveOneEvent    2: benchSaveAfterThous᠁ 

+---------------------------------+-------------------+-------------------+-----------------+------------+
|                                 | time (kde mode)                       | memory                       |
+---------------------------------+-------------------+-------------------+-----------------+------------+
| subject                         | Tag: <current>    | Tag: base         | Tag: <current>  | Tag: base  |
+---------------------------------+-------------------+-------------------+-----------------+------------+
| benchSaveOneEvent ()            | 1.974ms (±12.81%) | 1.783ms (±1.23%)  | 6.348mb         | 6.336mb    |
| benchSaveAfterThousandEvents () | 44.556ms (±1.48%) | 44.772ms (±0.23%) | 6.975mb         | 6.971mb    |
+---------------------------------+-------------------+-------------------+-----------------+------------+

This comment gets update everytime a new commit comes in!

Copy link
Member

@DanielBadura DanielBadura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idk but i feel like the name Hydrator is not right here. It really feels more like a normalizer/denormalizer. Besides that 👍

@DavidBadura
Copy link
Member Author

We already use the name "normalizer" to normalize individual values. And "hydrator" is a common name for transforming arrays into objects.

In any case, let's look at it again later to see if it can be structured better. I'm rebuilding the whole thing in several stages.

@DavidBadura DavidBadura merged commit a026df0 into 2.0.x Apr 24, 2022
@DavidBadura DavidBadura deleted the hydrator-component branch April 24, 2022 09:38
@DavidBadura DavidBadura added the enhancement New feature or request label May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants