anadroid.profiler package
Subpackages
Submodules
anadroid.profiler.AbstractProfiler module
- class anadroid.profiler.AbstractProfiler.AbstractProfiler(profiler, device, pkg_name, device_dir=None, dependency=None, plugin=None)[source]
Bases:
ABC
Defines a basic interface to be implemented by supported profilers. Provides a set of methods that allow to manage a profiling session lifecycle. .. attribute:: profiler
profiler.
- type:
Profiler
- pkg_name
profiler package name.
- Type:
str
- device_dir
path of device directory where remote results can be stored.
- Type:
str
- dependency
dependencies to insert in apps to be profiled.
- Type:
str
- plugin
build plugins to insert in apps to be profiled.
- Type:
str
anadroid.profiler.GreenScalerProfiler module
- class anadroid.profiler.GreenScalerProfiler.GREENSCALER_TASK(value)[source]
Bases:
Enum
Enumerates tasks of greenscaler profiler
- CPU_PROFILING = 'CPU Profiling'
- SCREEN_CAPTURE = 'Screen Capture'
- SYSTRACE = 'Syscal Tracing'
- class anadroid.profiler.GreenScalerProfiler.GreenScalerProfiler(profiler, device, resources_dir='/Users/ruirua/repos/pyAnaDroid/anadroid/resources/profilers/GreenScaler')[source]
Bases:
AbstractProfiler
Implements AbstractProfiler to allow profiling with GreenScalear profiler. Provides a set of methods that allow to manage a profiling session lifecycle. .. attribute:: resources_dir
directory with profiler resources.
- type:
str
- inner_app
the current app being tested.
- Type:
anadroid.profiler.ManafaProfiler module
- class anadroid.profiler.ManafaProfiler.ManafaProfiler(profiler, device, power_profile=None, timezone=None, hunter=True)[source]
Bases:
AbstractProfiler
Implements AbstractProfiler interface to allow profiling with Manafa profiler. Provides a set of methods that allow to manage a profiling session lifecycle. .. attribute:: manafa
EManafa profiler.
- type:
EManafa
anadroid.profiler.NoneProfiler module
- class anadroid.profiler.NoneProfiler.NoneProfiler(profiler, device, power_profile=None, timezone=None, hunter=True)[source]
Bases:
AbstractProfiler
Mock Profiler interaction.
anadroid.profiler.TrepnProfiler module
- class anadroid.profiler.TrepnProfiler.TrepnProfiler(profiler, device)[source]
Bases:
AbstractProfiler
Implements AbstractProfiler interface to allow profiling with Trepn profiler and TrepnLib. Provides a set of methods that allow to manage a profiling session lifecycle. .. attribute:: local_dep_location
location of trepn apk.
- type:
str
- export_results(out_filename='trepnfile.csv')[source]
export results of the previous profiing session. :param out_filename: output filepath.
- Returns:
output filepath.
- Return type:
out_filename
- install_profiler(apk_loc='/Users/ruirua/repos/pyAnaDroid/anadroid/resources/profilers/Trepn/apks/com.quicinc.trepn-6.2-APK4Fun.com.apk')[source]
install trepn profiler on device. :param apk_loc: apk location.
- load_preferences_file(pref_file=None)[source]
load trepn preferences file containing the list of resources to profile.