Confirmed users
975
edits
Line 63: | Line 63: | ||
val end = SystemClock.elapsedRealtime() | val end = SystemClock.elapsedRealtime() | ||
Log.e("benchmark", "${end - start}") // result is in milliseconds | Log.e("benchmark", "${end - start}") // result is in milliseconds | ||
// Note: elapsedRealtime() is preferred over currentTimeMillis | |||
Like automated benchmarks, these tests can accurately measure what users experience. However, they are fairly quick to write and execute but are tedious and time-consuming to carry out and have many places to introduce errors. | Like automated benchmarks, these tests can accurately measure what users experience. However, they are fairly quick to write and execute but are tedious and time-consuming to carry out and have many places to introduce errors. |