Skip to main content

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


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)

Uploaded Source

Built Distribution

gauto_profiler-0.1.1-py3-none-any.whl (6.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page