I want to run some performance tests of some blocks of code in an Android app. My plan is to measure System.nanoTime()at different points and then spill the difference with Logcat.
However, I was wondering if the calls Log.i()were not really expensive and therefore could distort the results?
Inside, I donβt know what itβs actually doing Log.i(...)- does it write directly to some USB output stream or does it simply put a log message in a queue that needs to be picked up by some kind of asynchronous stream that makes the real one work?
source
share