Skip to content

Overview

The marco CLI tool facilitates the generation of performance reports and visualization of performance data for Android and iOS applications. It provides both command-line options and a configuration file, offering flexibility in managing and analyzing application performance.


Configuration File

To configure default values for the CLI tool, create a marco.config.js file in the root directory of project:

marco.config.js
module.exports = {
android: {
packageName: 'com.example.app',
outputPath: './marco-reports/android',
dataDir: './marco-reports/android/log.json',
port: '8080',
},
ios: {
packageName: 'com.example.app',
outputPath: './marco-reports/ios',
dataDir: './marco-reports/ios/log.json',
port: '8080',
},
};

After creating the config file, one can run below commands to generate and visualize the performance data.

Generate report:

yarn marco generate --platform android
// ios
yarn marco generate --platform ios

Visualize report:

yarn marco visualize --platform android
// ios
yarn marco visualize --platform ios

We can even run visualize with some other report file, without specifying the platform.

yarn marco visualize --dataDir ./my-report/log.json