Chapter  6

Benchmarking And Profiling

Being able to measure performance is required in order to determine whether optimizations are needed, and whether the optimizations actually improved anything.

Performance in most cases will be measured as a function of the time it takes to complete an operation. For example, the performance of a game will very often be measured in how many frames per second can be rendered, which directly depends on how much time it takes to render frames: to achieve a constant frame rate of 60 frames per second, each frame should take less than 16.67 milliseconds to render and display. Also, as we discussed in Chapter 1, a response time of 100 milliseconds is often desired in order for results to appear instantaneous.

In this chapter you learn the various ways of measuring time in your application. You also learn how to use a profiling tool, Traceview, to trace Java code and native code and easily identify bottlenecks in your application. Finally, you learn about the logging mechanism in Android and how to take advantage of the filtering capabilities.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.77.250