-
Notifications
You must be signed in to change notification settings - Fork 53
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
chore: Bump acp_core version #3392
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #3392 +/- ##
===========================================
+ Coverage 78.17% 78.27% +0.10%
===========================================
Files 392 392
Lines 35905 35905
===========================================
+ Hits 28067 28104 +37
+ Misses 6166 6141 -25
+ Partials 1672 1660 -12
Flags with carried forward coverage won't be shown. Click here to find out more. see 12 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I am in middle of benchmarking this change to see how local acp improves. questions:
|
@shahzadlone |
I have finished the benchmarks! Wowza!!! Awesome work the TLDR Comparisons of Old vs New:Register: BenchmarkACPRegisterOld/scale=256,inMem=true-22 14 81.2 ms/op 62.8 MB/op 1M allocs/op
BenchmarkACPRegisterOld/scale=512,inMem=true-22 4 283 ms/op 229 MB/op 4M allocs/op
BenchmarkACPRegisterOld/scale=1024,inMem=true-22 1 1.07 s/op 871 MB/op 15M allocs/op
BenchmarkACPRegisterOld/scale=2048,inMem=true-22 1 4.00 s/op 3.41 GB/op 60M allocs/op
BenchmarkACPRegisterOld/scale=4096,inMem=true-22 1 16.1 s/op 13.5 GB/op 238M allocs/op
BenchmarkACPRegisterOld/scale=8192,inMem=true-22 1 68.9 s/op 53.9 GB/op 946M allocs/op
BenchmarkACPRegisterNew/scale=256,inMem=true-22 57 21.8 ms/op 11.6 MB/op 213k allocs/op
BenchmarkACPRegisterNew/scale=512,inMem=true-22 25 44.5 ms/op 23.1 MB/op 426k allocs/op
BenchmarkACPRegisterNew/scale=1024,inMem=true-22 13 88.7 ms/op 46.3 MB/op 852k allocs/op
BenchmarkACPRegisterNew/scale=2048,inMem=true-22 6 178 ms/op 92.6 MB/op 2M allocs/op
BenchmarkACPRegisterNew/scale=4096,inMem=true-22 3 364 ms/op 185 MB/op 3M allocs/op
BenchmarkACPRegisterNew/scale=8192,inMem=true-22 2 744 ms/op 371 MB/op 7M allocs/op CheckDocAccess: BenchmarkACPCheckDocAccessOld/scale=256,inMem=true-22 10 126 µs/op 34.9 kB/op 772 allocs/op
BenchmarkACPCheckDocAccessOld/scale=512,inMem=true-22 10 160 µs/op 34.9 kB/op 772 allocs/op
BenchmarkACPCheckDocAccessOld/scale=1024,inMem=true-22 10 138 µs/op 34.9 kB/op 772 allocs/op
BenchmarkACPCheckDocAccessOld/scale=2048,inMem=true-22 10 177 µs/op 34.9 kB/op 772 allocs/op
BenchmarkACPCheckDocAccessOld/scale=4096,inMem=true-22 10 171 µs/op 35.0 kB/op 773 allocs/op
BenchmarkACPCheckDocAccessOld/scale=8192,inMem=true-22 10 216 µs/op 36.2 kB/op 774 allocs/op
BenchmarkACPCheckDocAccessNew/scale=256,inMem=true-22 10 101 µs/op 34.7 kB/op 769 allocs/op
BenchmarkACPCheckDocAccessNew/scale=512,inMem=true-22 10 102 µs/op 34.8 kB/op 770 allocs/op
BenchmarkACPCheckDocAccessNew/scale=1024,inMem=true-22 10 101 µs/op 34.9 kB/op 771 allocs/op
BenchmarkACPCheckDocAccessNew/scale=2048,inMem=true-22 10 101 µs/op 34.9 kB/op 771 allocs/op
BenchmarkACPCheckDocAccessNew/scale=4096,inMem=true-22 10 195 µs/op 34.9 kB/op 772 allocs/op
BenchmarkACPCheckDocAccessNew/scale=8192,inMem=true-22 10 102 µs/op 34.9 kB/op 772 allocs/op IsDocRegistered: BenchmarkACPIsDocRegisteredOld/scale=256,inMem=true-22 10 249 µs/op 221 kB/op 4k allocs/op
BenchmarkACPIsDocRegisteredOld/scale=512,inMem=true-22 10 484 µs/op 422 kB/op 8k allocs/op
BenchmarkACPIsDocRegisteredOld/scale=1024,inMem=true-22 10 957 µs/op 836 kB/op 15k allocs/op
BenchmarkACPIsDocRegisteredOld/scale=2048,inMem=true-22 10 2.42 ms/op 1.64 MB/op 29k allocs/op
BenchmarkACPIsDocRegisteredOld/scale=4096,inMem=true-22 10 3.98 ms/op 3.32 MB/op 58k allocs/op
BenchmarkACPIsDocRegisteredOld/scale=8192,inMem=true-22 10 9.00 ms/op 6.53 MB/op 115k allocs/op
BenchmarkACPIsDocRegisteredNew/scale=256,inMem=true-22 10 54.6 µs/op 20.9 kB/op 395 allocs/op
BenchmarkACPIsDocRegisteredNew/scale=512,inMem=true-22 10 49.1 µs/op 20.9 kB/op 395 allocs/op
BenchmarkACPIsDocRegisteredNew/scale=1024,inMem=true-22 10 44.3 µs/op 20.9 kB/op 395 allocs/op
BenchmarkACPIsDocRegisteredNew/scale=2048,inMem=true-22 10 50.0 µs/op 20.9 kB/op 395 allocs/op
BenchmarkACPIsDocRegisteredNew/scale=4096,inMem=true-22 10 47.0 µs/op 20.9 kB/op 395 allocs/op
BenchmarkACPIsDocRegisteredNew/scale=8192,inMem=true-22 10 50.1 µs/op 20.9 kB/op 395 allocs/op |
Ok cool! I am happy with that. In the meanwhile I will clean up the testing framework to not depend on the policyID. I would really want to bump sourcehub for some other utils functions too (list/dump a target policy command for example). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I would argue however that this is more a perf
PR then a chore
:P but up to you.
Great stuff!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Lodek One more thing please link this PR with an issue
Relevant issue(s)
Solves #3398
Description
This PR bumps the version of the acp_core dependency which addresses the performance issues reported regarding registering a large number of objects and creating relationships.
Tasks
How has this been tested?
Insertion in Defra was tested using a simple script to time it:
The script ran for 1h 52m and created
123646
documents.I also timed a count query:
Schema used:
Policy used:
The query took roughly ~15 secs to execute.
Running a set of benchmark tests against ACP Core, registering ~1M objs took 56 secs.
Specify the platform(s) on which this was tested: