Path: blob/master/AndroidRunner/Plugins/Profiler.py
630 views
import logging123class Profiler(object):45# noinspection PyUnusedLocal6def __init__(self, config, paths):7self.logger = logging.getLogger(self.__class__.__name__)8pass910def dependencies(self):11"""Returns list of needed app dependencies,like com.quicinc.trepn, [] if none"""12raise NotImplementedError1314def load(self, device):15"""Load (and start) the profiler process on the device"""16raise NotImplementedError1718def start_profiling(self, device, **kwargs):19"""Start the profiling process"""20raise NotImplementedError2122def stop_profiling(self, device, **kwargs):23"""Stop the profiling process"""24raise NotImplementedError2526def collect_results(self, device):27"""Collect the data and clean up extra files on the device, save data in location set by 'set_output' """28raise NotImplementedError2930def unload(self, device):31"""Stop the profiler, removing configuration files on device"""32raise NotImplementedError3334def set_output(self, output_dir):35"""Set the output directory before the start_profiling is called"""36raise NotImplementedError3738def aggregate_subject(self):39"""Aggregate the data at the end of a subject, collect data and save data to location set by 'set output' """40raise NotImplementedError4142def aggregate_end(self, data_dir, output_file):43"""Aggregate the data at the end of the experiment.44Data located in file structure inside data_dir. Save aggregated data to output_file45"""46raise NotImplementedError4748class ProfilerException(Exception):49pass505152