Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
README.md | H A D | 25-Apr-2025 | 2.4 KiB | 74 | 52 | |
__init__.py | H A D | 25-Apr-2025 | 133 | 5 | 0 | |
_adb.py | H A D | 25-Apr-2025 | 2 KiB | 74 | 58 | |
_adb_path.py | H A D | 25-Apr-2025 | 864 | 35 | 23 | |
_benchresult.py | H A D | 25-Apr-2025 | 2.6 KiB | 73 | 61 | |
_hardware.py | H A D | 25-Apr-2025 | 3.1 KiB | 94 | 67 | |
_hardware_android.py | H A D | 25-Apr-2025 | 5.9 KiB | 162 | 113 | |
_hardware_nexus_6p.py | H A D | 25-Apr-2025 | 3.6 KiB | 93 | 68 | |
_hardware_pixel.py | H A D | 25-Apr-2025 | 3.1 KiB | 91 | 61 | |
_hardware_pixel2.py | H A D | 25-Apr-2025 | 4.4 KiB | 120 | 84 | |
_hardware_pixel_c.py | H A D | 25-Apr-2025 | 3.5 KiB | 89 | 60 | |
_os_path.py | H A D | 25-Apr-2025 | 598 | 25 | 16 | |
sheet.py | H A D | 25-Apr-2025 | 5.3 KiB | 167 | 126 | |
skiaperf.py | H A D | 25-Apr-2025 | 2.7 KiB | 93 | 69 | |
skpbench.cpp | H A D | 25-Apr-2025 | 29.7 KiB | 779 | 603 | |
skpbench.py | H A D | 25-Apr-2025 | 14.2 KiB | 397 | 343 |
README.md
1# skpbench 2 3skpbench is a benchmarking tool for replaying skp or mksp files on android devices. 4it achieves a lower variance in framerate by controlling the clock speed and stopping 5all other processes that could cause interference. 6 7## Build 8 9skpbench consists of the skpbench binary which must be built for the phone you intend to run on, 10and skpbench.py which runs on the machine the phone is connected to via ADB and is the entry point. 11 12The to build skia for android are at https://skia.org/user/build#android and reproduced here. 13 14Download the Android NDK 15 16``` 17./bin/fetch-sk 18./bin/sk asset download android_ndk_linux /tmp/ndk 19``` 20 21After this is set up once, build skpbench for your target cpu (assumed to be arm64 here for a Pixel 3) 22 23``` 24bin/gn gen out/arm64 --args='ndk="/tmp/ndk" target_cpu="arm64" is_debug=false' 25ninja -C out/arm64 skpbench 26``` 27 28## Benchmark an SKP on a connected device. 29 30First, copy the built skpbench binary and an example skp file to the device. 31(or pull a skp corpus using instructions in the section below) 32 33``` 34adb push out/arm64/skpbench /data/local/tmp 35adb push /home/nifong/Downloads/foo.skp /data/local/tmp/skps/ 36``` 37 38Run skpbench.py 39 40``` 41python tools/skpbench/skpbench.py \ 42 --adb \ 43 --config gles \ 44 /data/local/tmp/skpbench \ 45 /data/local/tmp/skps/foo.skp 46``` 47 48`--adb` specifies that it should use adb to the only connected device and run skpbench there. 49`--force` is necessary because we don't yet have a configuration to monitor vitals on the Pixel 3. 50`--config gles` specifies Open GL ES is the backend GPU config to use. 51 52Additional documentation of arguments is printed by `python tools/skpbench/skpbench.py --help` 53 54Output appears in the following format 55``` 56 accum median max min stddev samples sample_ms clock metric config bench 57 0.1834 0.1832 0.1897 0.1707 1.59% 101 50 cpu ms gles foo.skp 58``` 59 60`accum` is the time taken to draw all frames, divided by the number of frames. 61`metric` specifies that the unit is ms (milliseconds per frame) 62 63## Production 64 65skpbench is run as a tryjob from gerrit, where it uploads the results to perf.skia.org. 66Once such job name is `Perf-Android-Clang-Pixel4XL-GPU-Adreno640-arm64-Release-All-Android_Skpbench` 67 68Perf results are available by querying with this or similar. 69 extra_config = Android_Skpbench 70 sub_result = accum_cpu_ms 71 72Example perf query 73https://perf.skia.org/e/?queries=extra_config%3DAndroid_Skpbench%26sub_result%3Daccum_cpu_ms 74