Giter Club home page Giter Club logo

measure's Introduction

measure

buildStatus latestVersion Twitter: theapache64

a shell function to measure the graphics performance of two APK files with maestro and gfxinfo

✨ Overview

This is a shell function called measure that compares the graphics performance of two Android apps (APKs) by running a flow of user interactions on each app and collecting data on the app's graphics performance using the dumpsys gfxinfo command. The function prompts the user to input the names of the two APKs, the flow to run on each app, an optional setup flow, and an optional number of iterations to run the flow (default is 3). The function then installs and runs the flow on each APK, collects the graphics performance data, averages the data, and saves it to a file.

🦿 Prerequisites

  • Android device connected to the computer via ADB
  • adb and maestro command line tools must be installed and available in the PATH
  • gfx-avg command line tool must be installed and available in the PATH

⌨️ Usage

measure <apk1> <apk2> <measureFlow> [setupFlow] [iteration]
  • apk1: The file path of the first APK to test
  • apk2: The file path of the second APK to test
  • measureFlow: The file path of the flow file to run on each app
  • setupFlow (optional): The file path of the setup flow file to run on each app before running the measure flow
  • iteration (optional): The number of times to run the measure flow on each app (default is 3)

🌊 Script Flow

  1. The function starts by initializing and printing some information about the input arguments.
  2. The script then prompts the user to uninstall the package of the application if it is already installed.
  3. Then the script installs apk1 and runs the setup flow if provided, otherwise it waits for the user to press enter.
  4. Then it runs the measure flow on apk1 for the number of iterations specified, collecting the graphics performance data using the dumpsys gfxinfo command and saving the data to a file.
  5. Then it uninstalls apk1, installs apk2 and runs the setup flow if provided, otherwise it waits for the user to press enter.
  6. Then it runs the measure flow on apk2 for the number of iterations specified, collecting the graphics performance data using the dumpsys gfxinfo command and saving the data to a file.
  7. The script then averages the data collected from both apk1 and apk2 using the gfx-avg command.
  8. The script then prints "Done!".

💻 Installation

  • The function does not require any installation, it can be used by just copying the function to the shell script or by sourcing the script containing the function.

✍️ Author

👤 theapache64

Feel free to ping me 😉

🤝 Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Open an issue first to discuss what you would like to change.
  2. Fork the Project
  3. Create your feature branch (git checkout -b feature/amazing-feature)
  4. Commit your changes (git commit -m 'Add some amazing feature')
  5. Push to the branch (git push origin feature/amazing-feature)
  6. Open a pull request

Please make sure to update tests as appropriate.

❤ Show your support

Give a ⭐️ if this project helped you!

Patron Link Buy Me A Coffee

📝 License

Copyright © 2023 - theapache64

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

This README was generated by readgen

measure's People

Contributors

theapache64 avatar

Stargazers

Roman avatar Maxvyr avatar Ben Milanko avatar Shivam Dhuria avatar Miran Kamal avatar Jadwiga Słowik avatar Bharath K Malviya avatar Musfick Jamil avatar Yogesh Choudhary Paliyal avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.