I am adding profiler on my custom method on Odoo v15.0 I have referred below doc for code profiling https://www.odoo.com/documentation/15.0/developer/howtos/profilecode.html
Below is the syntax i am using
from odoo.tools.profiler import profile
@profile
@api.model
def mymethod(...):
My code
But on execution of code i am getting below error on terminal "ImportError: cannot import name 'profile' from 'odoo.tools.profiler'"
To debug the issue i have deep dived in base code of "/odoo/tool/profiler.py". But unable to locate any wrapper or function called profiler.
What is correct way to use profiling using "Log a method" strategy on odoo v15.0?