Print number of converted modules
Previously this was equal to the number of generated targets, but with recent cc_library changes, we now sometimes generate more than one BUILD target for a single module. Thus, converted module count is a more useful metric. At time of writing, this outputs: `Converted 390 Android.bp modules to 453 total generated BUILD targets. Included 4 handcrafted BUILD targets. There are 45093 total Android.bp modules.` Test: m bp2build Change-Id: I7d68880dd4c6bf649ca753837a7f3a9c0d73753a
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
package bp2build
|
||||
|
||||
import (
|
||||
"android/soong/android"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"android/soong/android"
|
||||
)
|
||||
|
||||
// Simple metrics struct to collect information about a Blueprint to BUILD
|
||||
@@ -35,7 +36,8 @@ func (metrics *CodegenMetrics) Print() {
|
||||
generatedTargetCount += count
|
||||
}
|
||||
fmt.Printf(
|
||||
"[bp2build] Generated %d total BUILD targets and included %d handcrafted BUILD targets from %d Android.bp modules.\n With %d modules with unconverted deps \n\t%s",
|
||||
"[bp2build] Converted %d Android.bp modules to %d total generated BUILD targets. Included %d handcrafted BUILD targets. There are %d total Android.bp modules.\n%d converted modules have unconverted deps: \n\t%s",
|
||||
metrics.generatedModuleCount,
|
||||
generatedTargetCount,
|
||||
metrics.handCraftedModuleCount,
|
||||
metrics.TotalModuleCount(),
|
||||
|
Reference in New Issue
Block a user