wlauto.instrumentation.fps package

Module contents

class wlauto.instrumentation.fps.FpsInstrument(device, **kwargs)[source]

Bases: wlauto.core.instrumentation.Instrument

aliases = AC([])
artifacts = AC([])
core_modules = []
description = '\n Measures Frames Per Second (FPS) and associated metrics for a workload.\n\n .. note:: This instrument depends on pandas Python library (which is not part of standard\n WA dependencies), so you will need to install that first, before you can use it.\n\n Android L and below use SurfaceFlinger to calculate the FPS data.\n Android M and above use gfxinfo to calculate the FPS data.\n\n SurfaceFlinger:\n The view is specified by the workload as ``view`` attribute. This defaults\n to ``\'SurfaceView\'`` for game workloads, and ``None`` for non-game\n workloads (as for them FPS mesurement usually doesn\'t make sense).\n Individual workloads may override this.\n\n gfxinfo:\n The view is specified by the workload as ``package`` attribute.\n This is because gfxinfo already processes for all views in a package.\n\n This instrument adds four metrics to the results:\n\n :FPS: Frames Per Second. This is the frame rate of the workload.\n :frame_count: The total number of frames rendered during the execution of\n the workload.\n :janks: The number of "janks" that occured during execution of the\n workload. Janks are sudden shifts in frame rate. They result\n in a "stuttery" UI. See http://jankfree.org/jank-busters-io\n :not_at_vsync: The number of frames that did not render in a single\n vsync cycle.\n\n '
finalize(*args, **kwargs)
initialize(*args, **kwargs)
kind = 'instrument'
name = 'fps'
parameters = AC(["Param({'kind': <type 'list'>, 'mandatory': None, 'name': 'modules', 'constraint': None, 'default': None, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <function numeric>, 'mandatory': None, 'name': 'drop_threshold', 'constraint': None, 'default': 5, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <function boolean>, 'mandatory': None, 'name': 'keep_raw', 'constraint': None, 'default': False, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <function boolean>, 'mandatory': None, 'name': 'generate_csv', 'constraint': None, 'default': True, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <function boolean>, 'mandatory': None, 'name': 'crash_check', 'constraint': None, 'default': True, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <type 'float'>, 'mandatory': None, 'name': 'crash_threshold', 'constraint': None, 'default': 0.7, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <type 'float'>, 'mandatory': None, 'name': 'dumpsys_period', 'constraint': <function <lambda>>, 'default': 2, 'allowed_values': None, 'global_alias': None, 'override': False})", "Param({'kind': <function boolean>, 'mandatory': None, 'name': 'force_surfaceflinger', 'constraint': None, 'default': False, 'allowed_values': None, 'global_alias': None, 'override': False})"])
setup(context)[source]
slow_update_result(context)[source]
start(context)[source]
stop(context)[source]
supported_platforms = ['android']
update_result(context)[source]
validate(*args, **kwargs)
class wlauto.instrumentation.fps.LatencyCollector(outfile, device, activities, keep_raw, logger, dumpsys_period, run_command, list_command, fps_method)[source]

Bases: threading.Thread

run()[source]
stop()[source]