Install Flashlight CLI on macOS, Linux, and Windows
# Install Rosetta for macOS arm64 (if needed)
softwareupdate --install-rosetta --agree-to-license
# Install Flashlight CLI
curl https://get.flashlight.dev | bashwebsite·Indexed 33 days ago
https://docs.flashlight.devA performance measurement tool for Android apps, including a CLI and cloud service (flashlight.dev) for measuring app start performance and TTI. It supports React Native, integrates with Maestro for e2e tests, and provides a standalone reporter via the @perf-profiler/reporter package for custom scripts and CI integrations.
# Install Rosetta for macOS arm64 (if needed)
softwareupdate --install-rosetta --agree-to-license
# Install Flashlight CLI
curl https://get.flashlight.dev | bash# Install Rosetta for macOS arm64 (Silicon) if not already installed
softwareupdate --install-rosetta --agree-to-license
# Install Flashlight CLI
curl https://get.flashlight.dev | bashflashlight test command by running Maestro tests on real, lower-end hardware hosted on AWS Device Farm. By default, these tests are executed on a Samsung A15 to ensure performance is validated on a device representative of a lower-end user experience.# Install Rosetta for macOS arm64 (if not already installed)
softwareupdate --install-rosetta --agree-to-license
# Install Flashlight CLI
curl https://get.flashlight.dev | bashTo get an app start performance score and Time to Interactive (TTI) measurement via the flashlight.dev cloud service, follow these steps:
flashlight measure or flashlight report, the JS thread is preselected on the third graph for analysis.# Use these commands to analyze JS thread performance
flashlight measure
flashlight reporttop command via the Android Debug Bridge (ADB). This is possible because Android is based on Linux. Note that CPU consumption can exceed 100% because each CPU core accounts for 100% (e.g., a 9-core device has a maximum of 900%).# Display CPU stats every 1 second
adb shell top -d 1--beforeAll flag to specify a Maestro test file that should run once before the actual performance measurement begins. This is useful for tasks like accepting cookies or logging into an app. The steps in the beforeAll file are not included in the performance metrics.flashlight cloud --app example.apk \
--test start.yml \
--duration 10000 \
--beforeAll beforeAll.ymlclearState command at the beginning of your flow to wipe local device data.appId: your.app.id
---
- clearState
- launchApp
- tapOn: "Text on the screen"To run Flashlight in CI, the environment must be connected to a physical Android device. Using an emulator on CI is discouraged as it is typically too slow and will not accurately reproduce real-world performance. Because the profiler requires full adb access, only specific device cloud providers are compatible:
Alternatively, the flashlight.dev cloud version is available in open beta.
To create a project in the Flashlight Cloud console: