Last 12 weeks · 2 commits
4 of 6 standards met
Summary (benchmarking/platforms/android/adb.py) crashes with when the sysfs battery entry does not exist on a rooted device. Root cause The existence guard was: The test command prints nothing on stdout; returns the captured output list, so this returns both when the file exists and when it does not. is always truthy, so the guard never prevented the , and indexing on the empty result of a failed raises . This is reachable through (battery profiling) and . On a rooted device without entries, the perfetto battery check crashes instead of cleanly reporting the device as unsupported. Fix Read the property with and return an empty string when the command produces no output, which is what the documented return type and all callers already expect: Added unit tests covering the file-exists, file-missing, and non-root cases.
Summary: has been deprecated since Python 3.10, and removed in Python 3.12. Existing usage will now raise the following error under Python 3.12+: This diff replaces usage according to PEP-632 migration advice. I generated this diff by looking for all usages of and replaced them with . These should be close to drop-in replacements! Differential Revision: D73804939
This codemod hardens all calls from file objects returned from an call, and against denial of service attacks. A stream influenced by an attacker could keep providing bytes until the system runs out of memory, causing a crash. Fixing it is straightforward by providing adding a size argument to any calls. The changes from this codemod look like this: More reading https://cwe.mitre.org/data/definitions/400.html Powered by: pixeebot (codemod ID: pixee:python/limit-readline) !
Summary: Currently the post-processing needs to know the threshold and window-size to find the start/end of the benchmark window. This new post-processing logic removes the need for those two parameters. removed energy, which is not used at all. changed latency to ms (from us) to be consistent with the other metrics (mW) added baseline_power output, to see how it changes over time. Reviewed By: ayushidalmia Differential Revision: D54669432
Repository: facebook/FAI-PEP. Description: Facebook AI Performance Evaluation Platform Stars: 394, Forks: 88. Primary language: Python. Languages: Python (96.4%), Shell (1.3%), HTML (0.9%), JavaScript (0.9%), CSS (0.4%). License: Apache-2.0. Open PRs: 35, open issues: 11. Last activity: 1mo ago. Community health: 75%. Top contributors: sf-wind, hl475, ASankaran, lly-zero-one, hlu1, Fightforcoding, virtan, jteller, pritamdamania87, nsubedi11 and others.