Skip to content

Unifying callbacks setup with the observer machinery#427

Merged
fgmacedo merged 9 commits into
developfrom
macedo/improve-callable-setup
Apr 29, 2024
Merged

Unifying callbacks setup with the observer machinery#427
fgmacedo merged 9 commits into
developfrom
macedo/improve-callable-setup

Conversation

@fgmacedo

@fgmacedo fgmacedo commented Apr 18, 2024

Copy link
Copy Markdown
Owner

Got faster setup by a factor of ~1.8x, and a much simpler callback machinery.

image

------------------------------------------------------------------------------------------------ benchmark: 2 tests ------------------------------------------------------------------------------------------------
Name (time in us)                              Min                 Max                Mean             StdDev              Median                IQR            Outliers  OPS (Kops/s)            Rounds  Iterations
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_setup_performance (NOW)              454.0735 (1.0)      483.1138 (1.0)      469.9761 (1.0)       8.3577 (1.0)      470.2344 (1.0)       8.9441 (1.0)           3;0        2.1278 (1.0)          10        1000
test_setup_performance (0001_9d177b2)     803.6698 (1.77)     837.5716 (1.73)     818.7163 (1.74)     10.4420 (1.25)     817.8931 (1.74)     11.7049 (1.31)          4;0        1.2214 (0.57)         10        1000
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Changes

  1. Removing the ._setup() extra call;
  2. Unifying the callbacks registry with the observer machinery.
  3. Reducing complexity;

Complements the work done on #425.

TODO:

  • Test deepcopy with observers added to the state machine.

@codecov

codecov Bot commented Apr 18, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (16f2a73) to head (1d39a99).

Additional details and impacted files
@@            Coverage Diff            @@
##           develop      #427   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           20        20           
  Lines         1144      1174   +30     
  Branches       164       166    +2     
=========================================
+ Hits          1144      1174   +30     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fgmacedo
fgmacedo force-pushed the macedo/improve-callable-setup branch from 8c4b64e to 0298ad3 Compare April 29, 2024 00:38
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@fgmacedo fgmacedo changed the title [wip] Unifying callbacks setup with the observer machinery Unifying callbacks setup with the observer machinery Apr 29, 2024
@fgmacedo
fgmacedo merged commit ca94afe into develop Apr 29, 2024
@fgmacedo
fgmacedo deleted the macedo/improve-callable-setup branch April 29, 2024 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant