-2

This is a general question but with a specific use case. There is only a single and completely unaffordable profiler for the Xamarin framework. So this makes me wonder if there are some programming methods to work around this? Maybe something similar to debugging programs without a debugger - relying on console/file logging etc.

I am guessing it boils down to capturing certain metrics at right moments and then storing them somewhere for subsequent analysis. Pretty charts and interactive call trees I guess are probably just a matter of presenting metrics and their context a right way. Is there any additional magic going on? Something like decorating every method with "Before" and "After" code via reflection? Maybe a way of accessing the CLR/JVM memory heaps is also necessary?

asked Oct 23, 2019 at 8:37
3

1 Answer 1

1

Maybe something similar to debugging programs without a debugger - relying on console/file logging

Not "something similar", but exactly this. In particular

  • find some timer or clock function of your environment with a resolution which fulfills your needs

  • use this to measure the execution time of certain code sections, and write that into a log file

  • try to isolate sections suspected to be performance critical, so you can run them multiple times as part of a "performance unit test"

  • compare the results of different runs when you change something in your code, like disabling some operation, or optimizing some operation (which is something you will usually do also when using a profiler)

Of course, without a profiler, this can become tedious work, but sometimes doing things semi-manually is your only viable option when you don't have better tools available.

answered Oct 23, 2019 at 11:19

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.