-
Notifications
You must be signed in to change notification settings - Fork 23.2k
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
[FW][FIX] profiler: make profiler work with freezegun #95049
[FW][FIX] profiler: make profiler work with freezegun #95049
Conversation
When freezegun is used, the profiler and sql_db time are freezed, Making the profile and sql perf counters invalids. A possible solution would be to black list some modules in freezegun but this doens't look possible in the pinned version (0.3.x). Saving the builtin time.time is not enough, it looks like freezegun will find all occurences and replace them. We need to get the __call__ instead. X-original-commit: 32213fb
This PR targets saas-15.1 and is part of the forward-port chain. Further PRs will be created up to master. More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port |
Ping @Xavier-Do, @d-fence
More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port |
@fw-bot r+ |
Staging failed: ci/runbot (view more at https://runbot.odoo.com/runbot/build/17090503) |
@robodoo retry |
Staging failed: ci/runbot (view more at https://runbot.odoo.com/runbot/build/17091058) |
Unlucky? @robodoo retry |
When freezegun is used, the profiler and sql_db time are freezed, Making the profile and sql perf counters invalids. A possible solution would be to black list some modules in freezegun but this doens't look possible in the pinned version (0.3.x). Saving the builtin time.time is not enough, it looks like freezegun will find all occurences and replace them. We need to get the __call__ instead. closes #95049 X-original-commit: 32213fb Signed-off-by: Christophe Monniez (moc) <moc@odoo.com> Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
When freezegun is used, the profiler and sql_db time are freezed,
Making the profile and sql perf counters invalids.
A possible solution would be to black list some modules in freezegun but
this doens't look possible in the pinned version (0.3.x).
Saving the builtin time.time is not enough, it looks like freezegun will
find all occurences and replace them.
We need to get the call instead.
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
Forward-Port-Of: #94998