@@ -443,7 +443,7 @@ func (b *jobBuilder) deriveCompileTaskName() string {
443443 "ReleaseAndAbandonGpuContext" , "CCPR" , "FSAA" , "FAAA" , "FDAA" , "NativeFonts" , "GDI" ,
444444 "NoGPUThreads" , "ProcDump" , "DDL1" , "DDL3" , "T8888" , "DDLTotal" , "DDLRecord" , "9x9" ,
445445 "BonusConfigs" , "SkottieTracing" , "SkottieWASM" , "GpuTess" , "NonNVPR" , "Mskp" ,
446- "Docker" , "PDF" , "SkVM" }
446+ "Docker" , "PDF" , "SkVM" , "Puppeteer" , "SkottieFrames" }
447447 keep := make ([]string , 0 , len (ec ))
448448 for _ , part := range ec {
449449 if ! In (part , ignore ) {
@@ -488,7 +488,7 @@ func (b *jobBuilder) deriveCompileTaskName() string {
488488 if b .extraConfig ("PathKit" ) {
489489 ec = []string {"PathKit" }
490490 }
491- if b .extraConfig ("CanvasKit" , "SkottieWASM" ) {
491+ if b .extraConfig ("CanvasKit" , "SkottieWASM" , "Puppeteer" ) {
492492 if b .cpu () {
493493 ec = []string {"CanvasKit_CPU" }
494494 } else {
@@ -1271,7 +1271,7 @@ func (b *taskBuilder) commonTestPerfAssets() {
12711271 }
12721272}
12731273
1274- // test generates a Test task.
1274+ // dm generates a Test task using dm .
12751275func (b * jobBuilder ) dm () {
12761276 compileTaskName := ""
12771277 // LottieWeb doesn't require anything in Skia to be compiled.
@@ -1391,6 +1391,69 @@ func (b *jobBuilder) fm() {
13911391 })
13921392}
13931393
1394+ // puppeteer generates a task that uses TaskDrivers combined with a node script and puppeteer to
1395+ // benchmark something using Chromium (e.g. CanvasKit, LottieWeb).
1396+ func (b * jobBuilder ) puppeteer () {
1397+ compileTaskName := b .compile ()
1398+ b .addTask (b .Name , func (b * taskBuilder ) {
1399+ b .defaultSwarmDimensions ()
1400+ b .isolate ("perf_puppeteer.isolate" )
1401+ b .cmd (
1402+ "./perf_puppeteer_skottie_frames" ,
1403+ "--project_id" , "skia-swarming-bots" ,
1404+ "--git_hash" , specs .PLACEHOLDER_REVISION ,
1405+ "--task_id" , specs .PLACEHOLDER_TASK_ID ,
1406+ "--task_name" , b .Name ,
1407+ "--canvaskit_bin_path" , "./build" ,
1408+ "--lotties_path" , "./lotties_with_assets" ,
1409+ "--node_bin_path" , "./node/node/bin" ,
1410+ "--benchmark_path" , "./tools/perf-canvaskit-puppeteer" ,
1411+ "--output_path" , OUTPUT_PERF ,
1412+ "--os_trace" , b .parts ["os" ],
1413+ "--model_trace" , b .parts ["model" ],
1414+ "--cpu_or_gpu_trace" , b .parts ["cpu_or_gpu" ],
1415+ "--cpu_or_gpu_value_trace" , b .parts ["cpu_or_gpu_value" ],
1416+ "--alsologtostderr" ,
1417+ )
1418+ b .serviceAccount (b .cfg .ServiceAccountCompile )
1419+ // This CIPD package was made by hand with the following invocation:
1420+ // cipd create -name skia/internal/lotties_with_assets -in ./lotties/ -tag version:0
1421+ // cipd acl-edit skia/internal/lotties_with_assets -reader group:project-skia-external-task-accounts
1422+ // cipd acl-edit skia/internal/lotties_with_assets -reader user:[email protected] 1423+ // Where lotties is a hand-selected set of lottie animations and (optionally) assets used in
1424+ // them (e.g. fonts, images).
1425+ b .cipd (& specs.CipdPackage {
1426+ Name : "skia/internal/lotties_with_assets" ,
1427+ Path : "lotties_with_assets" ,
1428+ Version : "version:0" ,
1429+ })
1430+ b .usesNode ()
1431+ b .cipd (CIPD_PKG_LUCI_AUTH )
1432+ b .dep (b .buildTaskDrivers (), compileTaskName )
1433+ b .output (OUTPUT_PERF )
1434+ b .timeout (20 * time .Minute )
1435+ })
1436+
1437+ // Upload results to Perf after.
1438+ // TODO(kjlubick,borenet) deduplicate this with the logic in perf().
1439+ uploadName := fmt .Sprintf ("%s%s%s" , PREFIX_UPLOAD , b .jobNameSchema .Sep , b .Name )
1440+ depName := b .Name
1441+ b .addTask (uploadName , func (b * taskBuilder ) {
1442+ b .recipeProp ("gs_bucket" , b .cfg .GsBucketNano )
1443+ b .recipeProps (EXTRA_PROPS )
1444+ // TODO(borenet): I'm not sure why the upload task is
1445+ // using the Perf task name, but I've done this to
1446+ // maintain existing behavior.
1447+ b .Name = depName
1448+ b .kitchenTask ("upload_nano_results" , OUTPUT_NONE )
1449+ b .Name = uploadName
1450+ b .serviceAccount (b .cfg .ServiceAccountUploadNano )
1451+ b .linuxGceDimensions (MACHINE_TYPE_SMALL )
1452+ b .cipd (specs .CIPD_PKGS_GSUTIL ... )
1453+ b .dep (depName )
1454+ })
1455+ }
1456+
13941457// perf generates a Perf task.
13951458func (b * jobBuilder ) perf () {
13961459 compileTaskName := ""
@@ -1399,92 +1462,72 @@ func (b *jobBuilder) perf() {
13991462 compileTaskName = b .compile ()
14001463 }
14011464 doUpload := b .release () && b .doUpload ()
1402- if b .extraConfig ("TaskDriver" ) {
1403- doUpload = false
1404- b .addTask (b .Name , func (b * taskBuilder ) {
1405- b .linuxGceDimensions (MACHINE_TYPE_SMALL )
1406- b .isolate ("skottie_wasm.isolate" )
1407- b .cmd (
1408- "./perf_skottie_wasm" ,
1409- "--project_id" , "skia-swarming-bots" ,
1410- "--task_id" , specs .PLACEHOLDER_TASK_ID ,
1411- "--task_name" , b .Name ,
1412- "--workdir" , "." ,
1413- "--alsologtostderr" ,
1414- )
1415- b .serviceAccount (b .cfg .ServiceAccountCompile )
1416- b .cipd (CIPD_PKG_LUCI_AUTH )
1417- b .dep (b .buildTaskDrivers (), compileTaskName )
1418- b .timeout (20 * time .Minute )
1419- })
1420- } else {
1421- b .addTask (b .Name , func (b * taskBuilder ) {
1422- recipe := "perf"
1423- isolate := "perf_skia_bundled.isolate"
1424- if b .extraConfig ("Skpbench" ) {
1425- recipe = "skpbench"
1426- isolate = "skpbench_skia_bundled.isolate"
1427- } else if b .extraConfig ("PathKit" ) {
1428- isolate = "pathkit.isolate"
1429- recipe = "perf_pathkit"
1430- } else if b .extraConfig ("CanvasKit" ) {
1431- isolate = "canvaskit.isolate"
1432- recipe = "perf_canvaskit"
1433- } else if b .extraConfig ("SkottieTracing" ) {
1434- recipe = "perf_skottietrace"
1435- } else if b .extraConfig ("SkottieWASM" ) {
1436- recipe = "perf_skottiewasm_lottieweb"
1437- isolate = "skottie_wasm.isolate"
1438- } else if b .extraConfig ("LottieWeb" ) {
1439- recipe = "perf_skottiewasm_lottieweb"
1440- isolate = "lottie_web.isolate"
1441- }
1442- b .recipeProps (EXTRA_PROPS )
1443- if recipe == "perf" {
1444- b .nanobenchFlags (doUpload )
1445- }
1446- b .kitchenTask (recipe , OUTPUT_PERF )
1447- b .isolate (isolate )
1448- b .swarmDimensions ()
1449- if b .extraConfig ("CanvasKit" , "Docker" , "PathKit" ) {
1450- b .usesDocker ()
1451- }
1452- if compileTaskName != "" {
1453- b .dep (compileTaskName )
1454- }
1455- b .commonTestPerfAssets ()
1456- b .expiration (20 * time .Hour )
1457- b .timeout (4 * time .Hour )
1458-
1459- if b .extraConfig ("Valgrind" ) {
1460- b .timeout (9 * time .Hour )
1461- b .expiration (48 * time .Hour )
1462- b .asset ("valgrind" )
1463- // Since Valgrind runs on the same bots as the CQ, we restrict Valgrind to a subset of the bots
1464- // to ensure there are always bots free for CQ tasks.
1465- b .dimension ("valgrind:1" )
1466- } else if b .extraConfig ("MSAN" ) {
1467- b .timeout (9 * time .Hour )
1468- } else if b .parts ["arch" ] == "x86" && b .parts ["configuration" ] == "Debug" {
1469- // skia:6737
1470- b .timeout (6 * time .Hour )
1471- } else if b .extraConfig ("LottieWeb" , "SkottieWASM" ) {
1472- b .asset ("node" , "lottie-samples" )
1473- } else if b .matchExtraConfig ("Skottie" ) {
1474- b .asset ("lottie-samples" )
1475- }
1465+ b .addTask (b .Name , func (b * taskBuilder ) {
1466+ recipe := "perf"
1467+ isolate := "perf_skia_bundled.isolate"
1468+ if b .extraConfig ("Skpbench" ) {
1469+ recipe = "skpbench"
1470+ isolate = "skpbench_skia_bundled.isolate"
1471+ } else if b .extraConfig ("PathKit" ) {
1472+ isolate = "pathkit.isolate"
1473+ recipe = "perf_pathkit"
1474+ } else if b .extraConfig ("CanvasKit" ) {
1475+ isolate = "canvaskit.isolate"
1476+ recipe = "perf_canvaskit"
1477+ } else if b .extraConfig ("SkottieTracing" ) {
1478+ recipe = "perf_skottietrace"
1479+ } else if b .extraConfig ("SkottieWASM" ) {
1480+ recipe = "perf_skottiewasm_lottieweb"
1481+ isolate = "skottie_wasm.isolate"
1482+ } else if b .extraConfig ("LottieWeb" ) {
1483+ recipe = "perf_skottiewasm_lottieweb"
1484+ isolate = "lottie_web.isolate"
1485+ }
1486+ b .recipeProps (EXTRA_PROPS )
1487+ if recipe == "perf" {
1488+ b .nanobenchFlags (doUpload )
1489+ }
1490+ b .kitchenTask (recipe , OUTPUT_PERF )
1491+ b .isolate (isolate )
1492+ b .swarmDimensions ()
1493+ if b .extraConfig ("CanvasKit" , "Docker" , "PathKit" ) {
1494+ b .usesDocker ()
1495+ }
1496+ if compileTaskName != "" {
1497+ b .dep (compileTaskName )
1498+ }
1499+ b .commonTestPerfAssets ()
1500+ b .expiration (20 * time .Hour )
1501+ b .timeout (4 * time .Hour )
14761502
1477- if b .os ("Android" ) && b .cpu () {
1478- b .asset ("text_blob_traces" )
1479- }
1480- b .maybeAddIosDevImage ()
1503+ if b .extraConfig ("Valgrind" ) {
1504+ b .timeout (9 * time .Hour )
1505+ b .expiration (48 * time .Hour )
1506+ b .asset ("valgrind" )
1507+ // Since Valgrind runs on the same bots as the CQ, we restrict Valgrind to a subset of the bots
1508+ // to ensure there are always bots free for CQ tasks.
1509+ b .dimension ("valgrind:1" )
1510+ } else if b .extraConfig ("MSAN" ) {
1511+ b .timeout (9 * time .Hour )
1512+ } else if b .parts ["arch" ] == "x86" && b .parts ["configuration" ] == "Debug" {
1513+ // skia:6737
1514+ b .timeout (6 * time .Hour )
1515+ } else if b .extraConfig ("LottieWeb" , "SkottieWASM" ) {
1516+ b .asset ("node" , "lottie-samples" )
1517+ } else if b .matchExtraConfig ("Skottie" ) {
1518+ b .asset ("lottie-samples" )
1519+ }
14811520
1482- iid := b .internalHardwareLabel ()
1483- if iid != nil {
1484- b .Spec .Command = append (b .Spec .Command , fmt .Sprintf ("internal_hardware_label=%d" , * iid ))
1485- }
1486- })
1487- }
1521+ if b .os ("Android" ) && b .cpu () {
1522+ b .asset ("text_blob_traces" )
1523+ }
1524+ b .maybeAddIosDevImage ()
1525+
1526+ iid := b .internalHardwareLabel ()
1527+ if iid != nil {
1528+ b .Spec .Command = append (b .Spec .Command , fmt .Sprintf ("internal_hardware_label=%d" , * iid ))
1529+ }
1530+ })
14881531
14891532 // Upload results if necessary.
14901533 if doUpload {
0 commit comments