wlauto.workloads.dex2oat package

Module contents

class wlauto.workloads.dex2oat.Dex2oatBenchmark(device, **kwargs)[source]

Bases: wlauto.core.workload.Workload

aliases = AC([])
artifacts = AC([])
command_template = 'dex2oat --dex-file={} --oat-file={} --instruction-set={} --dump-timing'
core_modules = []
description = '\n Benchmarks the execution time of dex2oat (a key part of APK installation process).\n\n ART is a new Android runtime in KitKat, which replaces Dalvik VM. ART uses Ahead-Of-Time\n compilation. It pre-compiles ODEX files used by Dalvik using dex2oat tool as part of APK\n installation process.\n\n This workload benchmarks the time it take to compile an APK using dex2oat, which has a\n significant impact on the total APK installation time, and therefore user experience.\n\n '
finalize(*args, **kwargs)
initialize(*args, **kwargs)
kind = 'workload'
name = 'dex2oat'
parameters = AC(["Param({'kind': <type 'list'>, 'mandatory': None, 'name': 'modules', 'constraint': None, 'default': None, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <type 'str'>, 'mandatory': None, 'name': 'instruction_set', 'constraint': None, 'default': 'arm64', 'allowed_values': ['arm', 'arm64', 'x86', 'x86_64', 'mips'], 'global_alias': None, 'override': False})"])
run_timeout = 300
supported_platforms = ['android']

Retrieve the last dex2oat time from the logs. That will correspond with the run() method. The compilation time does not.

Pulls out the compilation time and dex2oat execution time:
I/dex2oat ( 2522): 1.8s Compile Dex File I/dex2oat ( 2522): dex2oat took 2.366s (threads: 6)
validate(*args, **kwargs)