Profilers

The CPU, Memory and Network Profilers

Studio's Profiler runs tasks against a live app: Find CPU Hotspots (method sampling or tracing), Capture System Activities (a Perfetto 440,880 system trace), Track Memory Consumption (allocations), Analyze Memory Usage (a heap dump) and, under App Inspection, the Network Inspector, which lists each OkHttp 47,077 request and its body. Measure speed on a profileable release-like build, not a debuggable one. Without Studio, adb shell dumpsys meminfo com.example.booknest summarized BookNest's memory after showing its catalog, and am dumpheap wrote the heap dump the profiler opens:

Output of 197
 App Summary
                       Pss(KB)                        Rss(KB)
                        ------                         ------
           Java Heap:    16804                          47764
         Native Heap:    33108                          36872
...
           TOTAL PSS:   126830            TOTAL RSS:   260788      TOTAL SWAP (KB):        0

PSS (proportional set size) splits shared pages among the processes sharing them, so it is the fair number to compare. Only 16.8 MB is Kotlin objects; the native heap holds Coil 11,909 's bitmaps and SQLite 4,756 . For leaks, Square's open-source LeakCanary 29,999 (https://github.com/square/leakcanary 29,999 ) (debugImplementation) dumps the heap when a destroyed activity or ViewModel survives. Perfetto (ui.perfetto.dev) opens the traces Macrobenchmark 234 records in Performance.