A tool for game automation on android platform
Project description
AndroidGameProfiler
A python library that captures the three basic capabilities of a game on Android -- Total PSS (physical memory used by applications, including proportionally Shared library memory), CPU usage, and FPS (frame rate).
The above data are all obtained by adb tool.
Install
pip install gauto-profiler
Usage
from gauto_profiler.mem import *
from gauto_profiler.cpu import *
from gauto_profiler.fps import *
import os
os.chdir(os.path.dirname(os.path.abspath(__file__)))
os.environ["ANDROID_SERIAL"] = "5366a3d3" # the serial of the android device you are willing to test
# Specify the output directory.
# All these threads will share a directory, so once one thread has specify the path, there is no need to do so for the subsequent threads
mem_thread = MemRecorder("output")
cpu_thread = CPURecorder()
fps_thread = FPSRecorder()
# start running
mem_thread.start()
cpu_thread.start()
fps_thread.start()
time.sleep(300) # run for 5 mins
# stop
mem_thread.stop()
cpu_thread.stop()
fps_thread.stop()
mem_thread.join()
cpu_thread.join()
fps_thread.join()
print("All threads have stopped")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gauto_profiler-0.1.1.tar.gz
(4.6 kB
view hashes)
Built Distribution
Close
Hashes for gauto_profiler-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc7059f80c742162319d0367805bcad0f0aec34fb8a00e8f49cb4ccbb64bb68f |
|
MD5 | 4763131ed1428ef90ac4372777145f90 |
|
BLAKE2b-256 | 54fee420cb7e3067b34aab575ac691a69754f20702fa7f189a139b846a4d4d26 |