{"id":22455825,"url":"https://github.com/theapache64/measure","last_synced_at":"2025-07-07T08:37:53.101Z","repository":{"id":86799564,"uuid":"593445552","full_name":"theapache64/measure","owner":"theapache64","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-26T02:20:51.000Z","size":138,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T23:09:51.030Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theapache64.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-26T02:09:28.000Z","updated_at":"2023-09-13T12:07:13.000Z","dependencies_parsed_at":"2023-04-05T16:23:52.270Z","dependency_job_id":null,"html_url":"https://github.com/theapache64/measure","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theapache64%2Fmeasure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theapache64%2Fmeasure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theapache64%2Fmeasure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theapache64%2Fmeasure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theapache64","download_url":"https://codeload.github.com/theapache64/measure/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248794571,"owners_count":21162615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-06T07:13:31.929Z","updated_at":"2025-04-13T23:10:05.736Z","avatar_url":"https://github.com/theapache64.png","language":null,"readme":"![](cover.jpeg)\n\n# measure\n\n![buildStatus](https://img.shields.io/github/workflow/status/theapache64/measure/Java%20CI%20with%20Gradle?style=plastic)\n![latestVersion](https://img.shields.io/github/v/release/theapache64/measure)\n\u003ca href=\"https://twitter.com/theapache64\" target=\"_blank\"\u003e\n\u003cimg alt=\"Twitter: theapache64\" src=\"https://img.shields.io/twitter/follow/theapache64.svg?style=social\" /\u003e\n\u003c/a\u003e\n\n\u003e a shell function to measure the graphics performance of two APK files with maestro and gfxinfo\n\n## ✨ Overview\n\nThis 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.\n\n## 🦿 Prerequisites\n\n- Android device connected to the computer via ADB\n- [adb](https://developer.android.com/studio/command-line/adb) and [maestro](https://maestro.mobile.dev/getting-started/installing-maestro#upgrading-the-cli) command line tools must be installed and available in the PATH\n- [gfx-avg](https://github.com/theapache64/gfx-avg) command line tool must be installed and available in the PATH\n\n## ⌨️ Usage\n\n```console\nmeasure \u003capk1\u003e \u003capk2\u003e \u003cmeasureFlow\u003e [setupFlow] [iteration]\n```\n\n- `apk1`: The file path of the first APK to test\n- `apk2`: The file path of the second APK to test\n- `measureFlow`: The file path of the flow file to run on each app\n- `setupFlow` (optional): The file path of the setup flow file to run on each app before running the measure flow\n- `iteration` (optional): The number of times to run the measure flow on each app (default is 3)\n\n## 🌊 Script Flow\n1. The function starts by initializing and printing some information about the input arguments.\n1. The script then prompts the user to uninstall the package of the application if it is already installed.\n1.  Then the script installs `apk1` and runs the setup flow if provided, otherwise it waits for the user to press enter.\n1.  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.\n1.  Then it uninstalls `apk1`, installs `apk2` and runs the setup flow if provided, otherwise it waits for the user to press enter.\n1.  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.\n1.  The script then averages the data collected from both `apk1` and `apk2` using the `gfx-avg` command.\n1.  The script then prints `\"Done!\"`.\n\n## 💻  Installation\n- 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.\n\n\n## ✍️ Author\n\n👤 **theapache64**\n\n* Twitter: \u003ca href=\"https://twitter.com/theapache64\" target=\"_blank\"\u003e@theapache64\u003c/a\u003e\n* Email: theapache64@gmail.com\n\nFeel free to ping me 😉\n\n## 🤝 Contributing\n\nContributions are what make the open source community such an amazing place to be learn, inspire, and create. Any\ncontributions you make are **greatly appreciated**.\n\n1. Open an issue first to discuss what you would like to change.\n1. Fork the Project\n1. Create your feature branch (`git checkout -b feature/amazing-feature`)\n1. Commit your changes (`git commit -m 'Add some amazing feature'`)\n1. Push to the branch (`git push origin feature/amazing-feature`)\n1. Open a pull request\n\nPlease make sure to update tests as appropriate.\n\n## ❤ Show your support\n\nGive a ⭐️ if this project helped you!\n\n\u003ca href=\"https://www.patreon.com/theapache64\"\u003e\n  \u003cimg alt=\"Patron Link\" src=\"https://c5.patreon.com/external/logo/become_a_patron_button@2x.png\" width=\"160\"/\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://www.buymeacoffee.com/theapache64\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" width=\"160\"\u003e\n\u003c/a\u003e\n\n## 📝 License\n\n```\nCopyright © 2023 - theapache64\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n_This README was generated by [readgen](https://github.com/theapache64/readgen)_ ❤","funding_links":["https://www.patreon.com/theapache64","https://www.buymeacoffee.com/theapache64"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheapache64%2Fmeasure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheapache64%2Fmeasure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheapache64%2Fmeasure/lists"}