{"id":37065795,"url":"https://github.com/tqrg/physalia","last_synced_at":"2026-01-14T07:42:51.641Z","repository":{"id":76718979,"uuid":"80285617","full_name":"TQRG/physalia","owner":"TQRG","description":"Energy measurement framework for Mobile Apps","archived":false,"fork":false,"pushed_at":"2020-05-22T08:14:10.000Z","size":6438,"stargazers_count":12,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-11-30T21:44:52.650Z","etag":null,"topics":["android","energy-efficiency","energy-monitor","green-computing","monsoon"],"latest_commit_sha":null,"homepage":"https://tqrg.github.io/physalia/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TQRG.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS"}},"created_at":"2017-01-28T13:22:44.000Z","updated_at":"2025-09-07T19:39:38.000Z","dependencies_parsed_at":"2023-06-03T23:00:14.766Z","dependency_job_id":null,"html_url":"https://github.com/TQRG/physalia","commit_stats":{"total_commits":115,"total_committers":4,"mean_commits":28.75,"dds":0.4782608695652174,"last_synced_commit":"364951d94e02b60092785db46a8c7a7299ffe2a4"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TQRG/physalia","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TQRG%2Fphysalia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TQRG%2Fphysalia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TQRG%2Fphysalia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TQRG%2Fphysalia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TQRG","download_url":"https://codeload.github.com/TQRG/physalia/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TQRG%2Fphysalia/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28413475,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["android","energy-efficiency","energy-monitor","green-computing","monsoon"],"created_at":"2026-01-14T07:42:50.975Z","updated_at":"2026-01-14T07:42:51.627Z","avatar_url":"https://github.com/TQRG.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/TQRG/physalia.svg?branch=master)](https://travis-ci.org/TQRG/physalia)\n[![PyPI version](https://badge.fury.io/py/physalia.svg)](https://badge.fury.io/py/physalia)\n[![PyPI downloads](https://img.shields.io/pypi/d/physalia.svg)](https://pypi.python.org/pypi/physalia)\n[![PyPI status](https://img.shields.io/pypi/status/physalia.svg)](https://pypi.python.org/pypi/physalia)\n[![Code Health](https://landscape.io/github/TQRG/physalia/master/landscape.svg?style=flat)](https://landscape.io/github/TQRG/physalia/master)\n\n\n# Physalia\n\nEnergy measurement framework for Mobile Apps.\n\nMore info and documentation in the [website](https://tqrg.github.io/physalia/).\n\n## Install\n\n```\n$ python3 -m venv venv\n$ source venv/bin/activate\n$ pip install git+https://github.com/luiscruz/PyMonsoon\n$ pip install physalia\n```\n\nYou may have to install libusb:\n\n```\nbrew install libusb\n```\n\n## Example\n\nThe simplest way to measure something:\n\n```\nfrom physalia.power_meters import MonsoonPowerMeter\nfrom time import sleep\n\n # change voltage and serial number accordingly:\npower_meter = MonsoonPowerMeter(voltage=3.8, serial=12886)\npower_meter.start()\nsleep(2) # some work\nenergy_consumption, duration, error_flag = power_meter.stop()\n```\n\nPhysalia also features more advanced control, allowing to insall APKs, and repeat measurements:\n\n````\nfrom physalia.power_meters import MonsoonPowerMeter\nfrom physalia.energy_profiler import AndroidUseCase\nfrom time import sleep\n\n # change voltage and serial number accordingly:\npower_meter = MonsoonPowerMeter(voltage=3.8, serial=12886)\n\ndef run(usecase):\n\tsleep(2) # some work\n\nuse_case = AndroidUseCase(\n  'login',\n  'path/to/apk',\n  'com.test.app',\n  '0.0',\n  prepare=None,\n  run=run,\n  cleanup=None\n)\nmeasurement = use_case.run(power_meter=power_meter)\nprint(measurement)\n````\n\n## Contributing\n\nPlease help us improve this library!\n\nIf you have ideas for new features or anything behaves unexpectedly please report an issue.\n\nIf you find an issue you can actually help fixing please make a pull request of your code.\n\n### Running tests\n\nTo run all tests and checks locally run:\n\n`$ detox -e py27,py36`\n\n### Debugging\n\n#### Unable to find device\nTry executing with `sudo`.\n\n#### Device doesn't power on\nConnect device to the front of Monsoon with a USB cable.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftqrg%2Fphysalia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftqrg%2Fphysalia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftqrg%2Fphysalia/lists"}