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

[FW][FIX] profiler: make profiler work with freezegun #95049

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Jul 1, 2022

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

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
@robodoo
Copy link
Contributor

robodoo commented Jul 1, 2022

@fw-bot
Copy link
Contributor Author

fw-bot commented Jul 1, 2022

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

@robodoo robodoo added the forwardport This PR was created by @fw-bot label Jul 1, 2022
@C3POdoo C3POdoo added the RD research & development, internal work label Jul 1, 2022
@fw-bot
Copy link
Contributor Author

fw-bot commented Jul 1, 2022

Ping @Xavier-Do, @d-fence
The next pull request (#95059) is in conflict. You can merge the chain up to here by saying

@fw-bot r+

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@Xavier-Do
Copy link
Contributor

@fw-bot r+

@robodoo
Copy link
Contributor

robodoo commented Jul 1, 2022

Staging failed: ci/runbot (view more at https://runbot.odoo.com/runbot/build/17090503)

@Xavier-Do
Copy link
Contributor

@robodoo retry

@robodoo
Copy link
Contributor

robodoo commented Jul 1, 2022

Staging failed: ci/runbot (view more at https://runbot.odoo.com/runbot/build/17091058)

@Xavier-Do
Copy link
Contributor

Unlucky?

@robodoo retry

robodoo pushed a commit that referenced this pull request Jul 1, 2022
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>
@robodoo robodoo closed this Jul 1, 2022
@robodoo robodoo temporarily deployed to merge July 1, 2022 14:41 Inactive
@fw-bot fw-bot deleted the saas-15.1-15.0-profiling-fixes-xdo-9TvL-fw branch July 15, 2022 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forwardport This PR was created by @fw-bot RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants