Can the matlab profiler be used in code employing classes with overleaded methods?

1 次查看(过去 30 天)
Dear Mathworks,
I am tryining to use profiler in a code where I have a script - the most computationally heavy line of which is call to class method: "algo_objects{a_i}.update()" which happens to be overloaded. I can see that when I view the profiler results for the main script by looking at the line numbers However, the method "update" does not appear anywhere in the outputs of the profiler. I am using openSUSE operating system. So the question is : can the profiler be used in this situation? How can I locate the functions (which are class methods) in the ouput? A lot of function names are listed as "_____________" and I don't know which function they actually refer to.
BR/ Per BR/ Per

采纳的回答

Philip Borghesani
Philip Borghesani 2018-1-12
The profiler should work just fine in this situation. However without a bit more information or an example All we can do is guess. Can you post a screen grab or even better upload results from profsave or simplify the code and post example code that can be used to reproduce what your are seeing?
My first guess is that the viewer is dealing with a long function names poorly and that what you are looking for is there. Try sorting by self or total time and look at expensive functions or look at the function that calls update and examine/link-to its children to view the function you are looking for.
You can also examine the data in info=profile('info') to find data for the function you are looking for. When you find the function you can use: profview( name or index, info) to view the results for that function
If things still don't seem correct i suggest contacting support to see if there is a bug or enhancement needed to help you out.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Whos 的更多信息

标签

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by