Performance/Fenix/Performance reviews: Difference between revisions

Jump to navigation Jump to search
→‎Timestamp benchmark: Add simple example
(→‎Timestamp benchmark: Complete outline)
(→‎Timestamp benchmark: Add simple example)
Line 57: Line 57:


== Timestamp benchmark ==
== Timestamp benchmark ==
A timestamp benchmark is a manual test where a developer adds temporary code to log the duration they want to measure and then performs the use case on the device themselves to get the values printed. Like automated benchmarks, these tests can accurately measure what users experience. They are fairly quick to write and execute but are tedious and time-consuming to carry out, especially more than once, and have many places where errors can be introduced.
A timestamp benchmark is a manual test where a developer adds temporary code to log the duration they want to measure and then performs the use case on the device themselves to get the values printed. Here's an example of a simple use case:
 
val start = SystemClock.elapsedRealtime()
thingWeWantToMeasure()
val end = SystemClock.elapsedRealtime()
Log.e("benchmark", "${end - start}")
 
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.


Here's an '''outline of a typical timestamp benchmark''':
Here's an '''outline of a typical timestamp benchmark''':
Confirmed users
975

edits

Navigation menu