Name Description Size
__init__.py 0
benchmark.py utility class for running benchmarks in raptor 3882
browsertime 4
cmdline.py 23024
control_server.py Control server expects messages of the form {'type': 'messagetype', 'data':...} Each message is given a key which is calculated as If type is 'webext_status', then the key is data['type']/data['data'] otherwise the key is data['type']. The control server can be forced to wait before performing an action requested via POST by sending a special message {'type': 'wait-set', 'data': key} where key is the key of the message for which the control server should perform a wait before processing. The handler will store this key in the wait_after_messages dict as a True value. wait_after_messages[key] = True For subsequent requests, the handler will check the key of the incoming message against wait_for_messages; if found and its value is True, the handler will assign the key to waiting_in_state and will loop until the key is removed or until its value is changed to False. The control server will stop waiting for a state to be continued or cleared after wait_timeout seconds, after which the wait will be removed and the control server will finish processing the current POST request. wait_timeout defaults to 60 seconds but can be set globally for all wait states by sending the message {'type': 'wait-timeout', 'data': timeout} The value of waiting_in_state can be retrieved by sending the message {'type': 'wait-get', 'data': ''} which will return the value of waiting_in_state in the content of the response. If the value returned is not 'None', then the control server has received a message whose key is recorded in wait_after_messages and is waiting before completing the request. The control server can be told to stop waiting and finish processing the current request while keeping the wait for subsequent requests by sending {'type': 'wait-continue', 'data': ''} The control server can be told to stop waiting and finish processing the current request while removing the wait for subsequent requests by sending {'type': 'wait-clear', 'data': key} if key is the empty string '' the key in waiting_in_state is removed from wait_after_messages waiting_in_state is set to None else if key is 'all' all keys in wait_after_messages are removed else key is not in wait_after_messages the message is ignored else the key is removed from wait_after messages if the key matches the value in waiting_in_state, then waiting_in_state is set to None 18814
cpu.py AndroidCPUProfiler is used to measure CPU usage over time for an app in testing. Polls usage at a defined interval and then submits this as a supporting perfherder data measurement. ``` # Initialize the profiler and start polling for CPU usage of the app cpu_profiler = AndroidCPUProfiler(raptor, poll_interval=1) cpu_profiler.start_polling() # Or call the following to perform the commands above cpu_profiler = start_android_cpu_profiler(raptor) # Run test... # Stop measuring and generate perfherder data cpu_profiler.generate_android_cpu_profile("browsertime-tp6m") ``` 6093
filters.py data filters: takes a series of run data and applies statistical transforms to it Each filter is a simple function, but it also have attached a special `prepare` method that create a tuple with one instance of a :class:`Filter`; this allow to write stuff like:: from raptor import filters filter_list = filters.ignore_first.prepare(1) + filters.median.prepare() for filter in filter_list: data = filter(data) # data is filtered 6348
gecko_profile.py module to handle Gecko profiling. 12664
gen_test_config.py // this file is auto-generated by raptor, do not edit directly function getTestConfig() {{ return {{ "cs_port": "{control_server_port}", "test_name": "{test}", "test_settings_url": "http://{host}:{control_server_port}/json/{test}.json", "post_startup_delay": "{post_startup_delay}", "benchmark_port": "{benchmark_port}", "host": "{host}", "debug_mode": "{debug_mode}", "browser_cycle": "{browser_cycle}" }}; }} 1823
manifest.py 24469
memory.py 1473
output.py output raptor test results 75794
outputhandler.py 1061
perfdocs 7
performance_tuning.py Set various performance-oriented parameters, to reduce jitter. This includes some device-specific kernel tweaks. For more information, see https://bugzilla.mozilla.org/show_bug.cgi?id=1547135. 9513
perftest.py Abstract base class for perftests that execute via a subharness, either Raptor or browsertime. 32164
power.py Returns the type of device being tested. Currently it can either be Pixel 2, Moto G5, or Samsung S7. 15077
raptor.ini 2125
raptor.py 7551
results.py Abstract base class to handle perftest results 38459
signal_handler.py 618
tests 6
tooltool-manifests 2
utils.py Utility functions for Raptor 3109
webextension 4