Movatterモバイル変換


[0]ホーム

URL:


Skip to content

CLI Utility

Pre-requisite

This CLI utility just takes care of generating beautified report from generated raw report by Compose compiler.Thus, before using CLI, you'll need to generate compose compiler metrics and reports manually.

How to generate Compose Compiler metric and report?

Make sure to generate Compose compiler metrics and reports asmentionedhereorthis good read article by Chris Banes. These files are then needed tothis CLI utility to feed the data.

To generate the report, provide details related to app, metric and report files and output directory.

Using CLI

CLI utility is available in the two forms:

  1. JAR Distribution
  2. NPM package

1. Install the distribution

Navigate to thereleases and download the latest JAR artifact.

Latest:Download JAR

npminstall-gcompose-report2html

Latest:NPM Package

2. Know usage

Run the command to know the usage of CLI

java-jarcomposeReport2Html.jar-h
composeReport2Html.jar-h

▶️Output

Usage:ComposeCompilerReporttoHTMLGenerator~v1.4.2options_listOptions:--applicationName,-app->Applicationname(Tobedisplayedinthereport)(alwaysrequired){String}--inputDirectory,-i->Inputdirectorywherecomposablereportandmetricsareavailable{String}--overallStatsFile,-overallStatsReport->OverallStatisticsMetricsJSONfiles(separatedbycommas){String}--detailedStatsFile,-detailedStatsMetrics->DetailedStatisticsMetricsCSVfiles(separatedbycommas){String}--composableMetricsFile,-composableMetrics->ComposableMetricsTXTfiles(separatedbycommas){String}--classMetricsFile,-classMetrics->ClassMetricsTXTfiles(separatedbycommas){String}--outputDirectory,-o->Outputdirectoryname{String}--includeStableComposables[true]->WhethertoincludestableComposablefunctionsinthereport--includeStableClasses[true]->Whethertoincludestableclassesinthereport--includeClasses[true]->Whethertoincludealltheclassesinthereport--showOnlyUnstableComposables[false]->WhethertoONLYincludeunstablecomposablesinthereport--help,-h->Usageinfo

3. Generate report

HTML Report can be generated with the following combinations.

3.1 When all metric and report files are available in the same directory

Assuming report and metrics generated by Compose Compiler are available in one directory then you can specify path tothat directory only and utility will automatically pick files.

java-jarcomposeReport2Html.jar\-appMyAppName\-ipath/to/metric/directory\-opath/to/html/output
composeReport2Html\-appMyAppName\-ipath/to/metric/directory\-opath/to/html/output

Info

In the above command, path provided to-i parameter assumes all metrics and report are present and generates and saves report in the path provided to-o parameter.

3.2 Provide path to individual report and metric files

You can provide each metric/report file individually using separate parameters.

java-jarcomposeReport2Html.jar\-appMyAppName\-overallStatsReportapp_release-module.json\-detailedStatsMetricsapp_release-composables.csv\-composableMetricsapp_release-composables.txt\-classMetricsapp_release-classes.txt\-ohtmlReportDir
composeReport2Html\-appMyAppName\-overallStatsReportapp_release-module.json\-detailedStatsMetricsapp_release-composables.csv\-composableMetricsapp_release-composables.txt\-classMetricsapp_release-classes.txt\-ohtmlReportDir

Info

Multiple metric/report files can be provided as a CLI parameter by providing path separated by comma (,).


[8]ページ先頭

©2009-2025 Movatter.jp