I have so far managed to install SpeedUp GitHub - SketchUp/speedup: Profiling tool for SketchUp Ruby extensions. on Mac (21.1.331 and 22.0.253) but am not quite sure how to set-up the pre-defined tests (in the same way as TestUp).
By the way I made a PR on GitHub to suggest/request a few clarifications in the setup doc (README.md).
So I was able to run a profiling test directly from the console, in this format: SpeedUp.profile { fibonacci(20) }
as per your example, and the dialog popped-up with the results, great!
However, when I try to set-up a pre-defined test case, creating a sub-class of SpeedUp::ProfileTest adding a menu item and calling SpeedUp.build_menus, I am getting nowhere, either with your example code or my own variant, I get the same:
If you look at the reload method in "https://github.com/SketchUp/speedup/blob/main/src/speedup/profile_test.rb" …
You’ll see that it is trying to load a filename based upon searching your test case for any method whose name begins with the substring "profile_" and then getting the source_location which is the path from which your test case file is loaded.
This means that you cannot copy and paste the your profile test into the Ruby console. When this is done (ie, any code object is pasted into the console,) the source_location method just returns Ruby’s interpreter main function as the source location.
If you can log a ticket in the repo’s issue tracker that’d be good, making sure we remember to update the docs for this. The profile tests are very much WIP that’s rough around the corners.
Thanks ThomThom. I made an issue on Github.
Would you be able to give any guidance on interpreting the results?
I’m a bit reluctant to post much in the way of internal workings on here, although might be happy to share in another dev forum/space.