Skip to main content

Android Simpleperf tool.

Project description

perftools

apkrepacker

$ python -m perftools.apkrepacker --help

usage: apkrepacker.py [-h] -i APK [-o OUTPUT] [--enable-debuggable] [--enable-profileable]

optional arguments:
  -h, --help            show this help message and exit
  -i APK, --apk APK     path of input apk
  -o OUTPUT, --output OUTPUT
                        output path of repacked apk file
  --enable-debuggable   add debuggable in AndroidManifest.xml
  --enable-profileable  add profileable in AndroidManifest.xml

simpleperf

python -m perftools.simpleperf -h 

usage: simpleperf.py [-h] -s SERIAL -p APP [-o OUTPUT] [-f FREQ] [-d DURATION]

optional arguments:
  -h, --help            show this help message and exit
  -s SERIAL, --serial SERIAL
                        serial of device
  -p APP, --app APP     package name of app to be profiled
  -o OUTPUT, --output OUTPUT
                        output path of perf data collected in device
  -f FREQ, --freq FREQ  frequency of simpleperf record
  -d DURATION, --duration DURATION
                        duration of simpleperf record

perfdata

from perftools.perfdata import Perfdata
from pathlib import Path
import json

data = Perfdata("./perf.data")

threads = data.get_threads()

print(threads)

unitymain = threads["UnityMain"][0]

Path("a.json").write_text(json.dumps(unitymain.aggregate().json(), indent=1, ensure_ascii=False))

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

perftools-0.2.5.tar.gz (50.6 MB view details)

Uploaded Source

Built Distribution

perftools-0.2.5-py3-none-any.whl (50.7 MB view details)

Uploaded Python 3

File details

Details for the file perftools-0.2.5.tar.gz.

File metadata

  • Download URL: perftools-0.2.5.tar.gz
  • Upload date:
  • Size: 50.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for perftools-0.2.5.tar.gz
Algorithm Hash digest
SHA256 ce7480a8e1e8adfa4c9864346160b6efb6a6a4a5f8cb445e0519f7a74a8bf89f
MD5 d035e79134f7018cf98c56a94d04a7bd
BLAKE2b-256 1caa1feba9e44c6f41c666f52955b56137c0dfe83a21c20809620c7772142226

See more details on using hashes here.

File details

Details for the file perftools-0.2.5-py3-none-any.whl.

File metadata

  • Download URL: perftools-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 50.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for perftools-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 daeeb01a38449b7aa5129931cd7d9119dc0539349f182e3e9d923c9b2b1da65d
MD5 6d228e516830b36ab86f4220015e0814
BLAKE2b-256 5d2bace939eb51b8e537ed024c0c1b1efd268e87b29f801e022500c8bc1c4f4a

See more details on using hashes here.

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