From 34a703f6d2cbc9126ae4ea33d69ff2bf9121434f Mon Sep 17 00:00:00 2001 From: Vinogradov Victor Date: Mon, 18 Aug 2025 20:59:17 +0300 Subject: [PATCH] ui-plugins: perf tests --- ui2abc/ui-plugins/package.json | 4 +- ui2abc/ui-plugins/perf/fix_pluginout.js | 140 ++++++++ ui2abc/ui-plugins/perf/test_ui_perf.js | 306 ++++++++++++++++++ .../ui-plugins/perf/ui2abcconfig-ui-none.json | 35 ++ .../perf/ui2abcconfig-ui-parsed-checked.json | 37 +++ .../perf/ui2abcconfig-ui-parsed-only.json | 36 +++ 6 files changed, 557 insertions(+), 1 deletion(-) create mode 100644 ui2abc/ui-plugins/perf/fix_pluginout.js create mode 100644 ui2abc/ui-plugins/perf/test_ui_perf.js create mode 100644 ui2abc/ui-plugins/perf/ui2abcconfig-ui-none.json create mode 100644 ui2abc/ui-plugins/perf/ui2abcconfig-ui-parsed-checked.json create mode 100644 ui2abc/ui-plugins/perf/ui2abcconfig-ui-parsed-only.json diff --git a/ui2abc/ui-plugins/package.json b/ui2abc/ui-plugins/package.json index e4f0609d3a..2c40cca359 100644 --- a/ui2abc/ui-plugins/package.json +++ b/ui2abc/ui-plugins/package.json @@ -7,6 +7,8 @@ "compile": "rollup -c ./rollup.config.mjs", "compile:libarkts": "npm run compile --prefix ../libarkts", "check": "npm run compile && rm -rf ../../arkoala-arkts/trivial/user/build && npm run build --prefix ../../arkoala-arkts/trivial/user", - "check:run": "npm run check && npm run run --prefix ../../arkoala-arkts/trivial/user" + "check:run": "npm run check && npm run run --prefix ../../arkoala-arkts/trivial/user", + "test:perf": "mkdir -p perf/build && npm run annotate --prefix ../../incremental/runtime && node ./perf/test_ui_perf.js", + "test:perf:all": "npm run compile:libarkts && npm run compile && npm run test:perf" } } diff --git a/ui2abc/ui-plugins/perf/fix_pluginout.js b/ui2abc/ui-plugins/perf/fix_pluginout.js new file mode 100644 index 0000000000..65a882d458 --- /dev/null +++ b/ui2abc/ui-plugins/perf/fix_pluginout.js @@ -0,0 +1,140 @@ +#!/usr/bin/env node +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const fs = require('fs'); +const path = require('path'); + +function readFileStrict(p) { + if (!fs.existsSync(p)) { + throw new Error(`File not found: ${p}`); + } + return fs.readFileSync(p, 'utf8'); +} + +function writeFileEnsured(p, data) { + fs.mkdirSync(path.dirname(p), { recursive: true }); + fs.writeFileSync(p, data, 'utf8'); +} + +function withCount(re, replacer) { + let n = 0; + const wrapped = function (...args) { + n++; + return typeof replacer === 'function' ? replacer(...args) : replacer; + }; + wrapped.count = () => n; + return wrapped; +} + +function fixTextCalls(src) { + const re = /(\bText\()\s*undefined\s*,\s*([\s\S]*?)\s*,\s*undefined\s*(\))/g; + const rep = withCount(re, (_m, p1, expr, p3) => `${p1}${expr}${p3}`); + const out = src.replace(re, rep); + return { out, count: rep.count() }; +} + +function fixButtonCalls(src) { + const re = /(\bButton\()\s*undefined\s*,\s*(\"[^"\n]*\"|'[^'\n]*')\s*,\s*undefined\s*(\))/g; + const rep = withCount(re, (_m, p1, label, p3) => `${p1}${label}${p3}`); + const out = src.replace(re, rep); + return { out, count: rep.count() }; +} + +function fixColumnTripleArg(src) { + const re = /\bColumn\(undefined,\s*undefined,\s*\(\(\)\s*=>\s*{((?:[^{}]*{[^}]*})*[^}]*)}\)\);/g; + const rep = withCount(re, (_m, p1) => `Column() {${p1}}`); + const out = src.replace(re, rep); + return { out, count: rep.count() }; +} + +function fixRowAttrThenBuilder(src) { + const re = /\bRow\(\(\(__instance:\s*RowAttribute\):\s*void\s*=>\s*{\s*__instance([^;]*);\s*}\),\s*undefined,\s*\(\(\)\s*=>\s*{([^}]*)}\)\);/g; + const rep = withCount(re, (_m, p1, p2) => `Row() {${p2}}${p1}`); + const out = src.replace(re, rep); + return { out, count: rep.count() }; +} + +function fixCustomComponent(src) { + const re = /\bCustomComponent\.\$_instantiate\(undefined,\s*\(\(\):\s*([\w\d_]+)\s*=>\s*{\s*return\s*new\s*[\w\d_]+\(\);\s*}\)(?:,\s*\(({[^}]*})\s*as\s*[\w\d_]+\))?\);/g; + const rep = withCount(re, (_m, p1, p2) => `${p1}(${p2||''})`); + const out = src.replace(re, rep); + return { out, count: rep.count() }; +} + +function fixDefaultConstructor(src) { + const re = /\bpublic constructor\(\) {}/g; + const rep = withCount(re, (_m) => ``); + const out = src.replace(re, rep); + return { out, count: rep.count() }; +} + +function fixOptionalChaining(src) { + const re = /\({let\s*([\w\d_%]+)\s*=\s*([\w\d_]+);\s*\(\(\(\1\)\s*==\s*\(null\)\)\s*\?\s*undefined\s*:\s*\1\.([\w\d_]+)\)}\)/g; + const rep = withCount(re, (_m, p1, p2, p3) => `(${p2}?.${p3})`); + const out = src.replace(re, rep); + return { out, count: rep.count() }; +} + +function main() { + const [inFile, outFile] = process.argv.slice(2); + if (!inFile || !outFile) { + console.error('Usage: node fix_pluginout.js '); + process.exit(2); + } + + let code = readFileStrict(inFile); + + const b = fixButtonCalls(code); + code = b.out; + + const t = fixTextCalls(code); + code = t.out; + + const c = fixColumnTripleArg(code); + code = c.out; + + const r = fixRowAttrThenBuilder(code); + code = r.out; + + const cc = fixCustomComponent(code); + code = cc.out; + + const dc = fixDefaultConstructor(code); + code = dc.out; + + const oc = fixOptionalChaining(code); + code = oc.out; + + writeFileEnsured(outFile, code); + + console.log('[fix_pluginout] Done.'); + console.log(` Button(undefined, "…", undefined) -> Button("…"): ${b.count}`); + console.log(` Text(undefined, , undefined) -> Text(): ${t.count}`); + console.log(` Column(undefined, undefined, ) -> Column(): ${c.count}`); + console.log(` Row(attrCb, undefined, ) -> Row(): ${r.count}`); + console.log(` CustomComponent: ${cc.count}`); + console.log(` DefaultConstructor: ${dc.count}`); + console.log(` OptionalChaining: ${oc.count}`); +} + +if (require.main === module) { + try { + main(); + } catch (e) { + console.error('[fix_pluginout] Error:', e && e.stack || e); + process.exit(1); + } +} diff --git a/ui2abc/ui-plugins/perf/test_ui_perf.js b/ui2abc/ui-plugins/perf/test_ui_perf.js new file mode 100644 index 0000000000..1d59016764 --- /dev/null +++ b/ui2abc/ui-plugins/perf/test_ui_perf.js @@ -0,0 +1,306 @@ +#!/usr/bin/env node + +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const fs = require('fs'); +const path = require('path'); +const cp = require('child_process'); + +const PANDA_SDK_PATH = path.resolve(__dirname, "../../../incremental/tools/panda/node_modules/@panda/sdk"); +const ES2PANDA = path.resolve(__dirname, "../../libarkts/lib/es2panda.js"); + +const PERF_DIR = path.resolve(__dirname); +const INPUT_DIR = path.join(PERF_DIR, "input"); +const BUILD_DIR = path.join(PERF_DIR, "build"); +const INPUT_FILE = path.join(INPUT_DIR, "main.ui.ets"); +const PLUGINOUT_FILE = path.join(INPUT_DIR, "main.pluginout.ets"); + +const CFG_PARSED_ONLY = path.join(PERF_DIR, "ui2abcconfig-ui-parsed-only.json"); +const CFG_PARSED_CHECKED = path.join(PERF_DIR, "ui2abcconfig-ui-parsed-checked.json"); +const CFG_NO_PLUGIN = path.join(PERF_DIR, "ui2abcconfig-ui-none.json"); + +function env(extra={}) { + return { + ...process.env, + KOALA_WORKSPACE: "1", + PANDA_SDK_PATH, + ...extra, + }; +} + +function sh(cmd, extraEnv={}) { + const t0 = Date.now(); + console.log(`[EXEC] ${cmd}`); + cp.execSync(cmd, { stdio: "inherit", env: env(extraEnv) }); + const ms = Date.now() - t0; + console.log(`[DONE] ${ms}ms\n`); + return ms; +} + +function runToFiles(cmdArgs, outFile, errFile, extraEnv = {}) { + fs.mkdirSync(path.dirname(outFile), { recursive: true }); + const outFD = fs.openSync(outFile, 'w'); + const errFD = fs.openSync(errFile, 'w'); + const t0 = Date.now(); + const child = cp.spawnSync('node', cmdArgs, { + env: { ...process.env, KOALA_WORKSPACE: '1', PANDA_SDK_PATH, ...extraEnv }, + stdio: ['ignore', outFD, errFD], + encoding: 'utf8', + maxBuffer: 1024 * 1024 * 1024 + }); + const ms = Date.now() - t0; + fs.closeSync(outFD); + fs.closeSync(errFD); + + if (child.error) { + throw child.error; + } + if (child.status !== 0) { + throw new Error(`Command failed (status ${child.status}). See logs:\n stdout: ${outFile}\n stderr: ${errFile}`); + } + console.log(`[DONE] ${ms}ms (stdout→${outFile})\n`); + return ms; +} + +function ensureDirs() { + fs.mkdirSync(INPUT_DIR, { recursive: true }); + fs.mkdirSync(BUILD_DIR, { recursive: true }); +} + +function cleanArtifacts() { + [PLUGINOUT_FILE, + path.join(BUILD_DIR, "ui-perf-parsed.abc"), + path.join(BUILD_DIR, "ui-perf-full.abc"), + path.join(BUILD_DIR, "ui-perf-noplugin.abc"), + path.join(BUILD_DIR, "tmp.stdout.abc"), + path.join(BUILD_DIR, "plugin_stdout.log"), + ].forEach(p => { if (fs.existsSync(p)) fs.rmSync(p); }); +} + +function generateInput({ components = 2000, propsPerRow = 6, buttonsPerRow = 3, chunkSize = 100 }) { + ensureDirs(); + if (fs.existsSync(INPUT_FILE)) fs.rmSync(INPUT_FILE); + + const out = []; + const w = s => out.push(s); + + w('import { Column, Row, Text, Button } from "@ohos.arkui.component"\n'); + w('import { Component, State, Prop, Link, Entry } from "arkui"\n\n'); + + w('@Entry\n@Component\n'); + w('struct Root {\n'); + w(' @State count: number = 0;\n'); + w(' build() {\n'); + w(' Column() {\n'); + + const chunks = Math.ceil(components / chunkSize); + for (let c = 0; c < chunks; c++) { + w(` Chunk${c}({ count: this.count, linkCount: this.count })\n`); + } + + w(' }\n'); + w(' }\n'); + w('}\n\n'); + + for (let c = 0; c < chunks; c++) { + w('@Component\n'); + w(`struct Chunk${c} {\n`); + w(' @Prop count: number;\n'); + w(' @Link linkCount: number;\n'); + w(' build() {\n'); + w(' Column() {\n'); + + const start = c * chunkSize; + const end = Math.min((c + 1) * chunkSize, components); + + for (let i = start; i < end; i++) { + w(' Row() {\n'); + for (let p = 0; p < propsPerRow; p++) { + w(` Text("item_${i}_${p}: " + this.count + " / " + this.linkCount)\n`); + } + for (let b = 0; b < buttonsPerRow; b++) { + w(` Button("btn_${i}_${b}")\n`); + } + w(` }.width(${100 + (i % 200)}).height(${40 + (i % 60)}).id("row_${i}")\n`); + } + + w(' }\n'); + w(' }\n'); + w('}\n\n'); + } + + w('function entry() {}\n'); + + fs.writeFileSync(INPUT_FILE, out.join(''), 'utf8'); + const size = fs.statSync(INPUT_FILE).size; + console.log(`Input generated: ${INPUT_FILE}, size=${size} bytes\n`); + return size; +} + +function extractSourceBlocks(stdout) { + const blocks = []; + const reHeader = /(BEFORE|AFTER)\s+ui-(parsed|checked):\s*[\r\n]+\/\/\s*file:\s*(.*)\r?\n([\s\S]*?)(?=(?:BEFORE|AFTER)\s+ui-|$)/g; + let m; + while ((m = reHeader.exec(stdout)) !== null) { + const kind = m[1]; + const phase = m[2]; + const file = m[3].trim(); + const body = m[4] || ''; + const src = body + .split(/\r?\n/) + .map(line => { + const mm = line.match(/^\s*\d+\s*\|\s?(.*)$/); + return mm ? mm[1] : ''; + }) + .join('\n') + .trimEnd(); + blocks.push({ kind, phase, file, src }); + } + return blocks; +} + +function pickTransformedForFile(blocks, targetAbs) { + const norm = p => p.replace(/\\/g, '/').toLowerCase(); + const target = norm(targetAbs); + + let b = blocks.find(b => b.kind === 'AFTER' && b.phase === 'checked' && norm(b.file) === target); + if (b && b.src) return b.src; + + b = blocks.find(b => b.kind === 'AFTER' && b.phase === 'parsed' && norm(b.file) === target); + if (b && b.src) return b.src; + + b = blocks.find(b => + b.kind === 'AFTER' && + (b.phase === 'parsed') && + norm(b.file).endsWith('/input/main.ui.ets') + ); + if (b && b.src) return b.src; + + return null; +} + +function runParsedOnly() { + console.log("=== PARSED-ONLY ==="); + const OUT = path.join(BUILD_DIR, "ui-perf-parsed.abc"); + const cmd = `node ${ES2PANDA} --ets-module --arktsconfig ${CFG_PARSED_ONLY} --output ${OUT} --simultaneous --profile-memory ${INPUT_FILE}`; + const ms = sh(cmd); + const size = fs.existsSync(OUT) ? fs.statSync(OUT).size : 0; + return { ms, out: OUT, size }; +} + +function runFull() { + console.log("=== FULL (parsed+checked) ==="); + const OUT = path.join(BUILD_DIR, "ui-perf-full.abc"); + const cmd = `node ${ES2PANDA} --ets-module --arktsconfig ${CFG_PARSED_CHECKED} --output ${OUT} --simultaneous --profile-memory ${INPUT_FILE}`; + const ms = sh(cmd); + const size = fs.existsSync(OUT) ? fs.statSync(OUT).size : 0; + return { ms, out: OUT, size }; +} + +function runPluginTransformViaStdout() { + console.log("=== PLUGIN→ETS (via KOALA_DUMP_PLUGIN_AST) ==="); + + const TMP_ABC = path.join(BUILD_DIR, "tmp.stdout.abc"); + fs.mkdirSync(BUILD_DIR, { recursive: true }); + + const STDOUT_LOG = path.join(BUILD_DIR, 'plugin_stdout.log'); + const STDERR_LOG = path.join(BUILD_DIR, 'plugin_stderr.log'); + + const args = [ + ES2PANDA, + '--ets-module', + '--arktsconfig', CFG_PARSED_CHECKED, + '--output', TMP_ABC, + '--simultaneous', + INPUT_FILE + ]; + + console.log(`[PLUGIN→ETS] spawning es2panda: node ${args.join(" ")}`); + console.log(`[PLUGIN→ETS] stdout → ${STDOUT_LOG}`); + console.log(`[PLUGIN→ETS] stderr → ${STDERR_LOG}`); + + const ms = runToFiles(args, STDOUT_LOG, STDERR_LOG, { KOALA_DUMP_PLUGIN_AST: '1' }); + console.log(`[PLUGIN→ETS] es2panda finished in ${ms}ms`); + + const stdout = fs.readFileSync(STDOUT_LOG, 'utf8'); + console.log(`[PLUGIN→ETS] read stdout log: ${stdout.length} bytes`); + + const blocks = extractSourceBlocks(stdout); + console.log(`[PLUGIN→ETS] parsed ${blocks.length} source blocks from log`); + + if (blocks.length > 0) { + console.log(`[PLUGIN→ETS] first block: kind=${blocks[0].kind}, phase=${blocks[0].phase}, file=${blocks[0].file || "(none)"}`); + console.log(`[PLUGIN→ETS] last block: kind=${blocks[blocks.length-1].kind}, phase=${blocks[blocks.length-1].phase}, file=${blocks[blocks.length-1].file || "(none)"}`); + } + + const src = pickTransformedForFile(blocks, INPUT_FILE); + + if (!src) { + const seen = blocks + .filter(b => b.kind === 'AFTER') + .map(b => `${b.phase} :: ${b.file || '(no file)'}`) + .slice(0, 20) + .join('\n'); + console.error(`[PLUGIN→ETS] ERROR: target block not found for ${INPUT_FILE}`); + console.error(`[PLUGIN→ETS] available AFTER-blocks:\n${seen || '(нет)'}\n`); + throw new Error(`Не найден блок AFTER для ${INPUT_FILE}. См. ${STDOUT_LOG}`); + } + + fs.writeFileSync(PLUGINOUT_FILE, src, 'utf8'); + console.log(`[PLUGIN→ETS] wrote ${PLUGINOUT_FILE} (${src.length} bytes)`); + + const FIXED_FILE = path.join(INPUT_DIR, 'main.pluginout.fixed.ets'); + const FIXER = path.join(PERF_DIR, 'fix_pluginout.js'); + + const cmdFix = `node ${FIXER} ${PLUGINOUT_FILE} ${FIXED_FILE}`; + console.log(`[PLUGIN→ETS] running fixer: ${cmdFix}`); + sh(cmdFix); + + return { msDump: ms, pluginEtsSize: src.length, fileName: FIXED_FILE }; +} + + +function runNoPluginOnFile(file) { + console.log("=== NO-PLUGIN compile (pluginout) ==="); + const OUT = path.join(BUILD_DIR, "ui-perf-noplugin.abc"); + const cmd = `node ${ES2PANDA} --ets-module --arktsconfig ${CFG_NO_PLUGIN} --output ${OUT} --simultaneous --profile-memory ${file}`; + const ms = sh(cmd); + const size = fs.existsSync(OUT) ? fs.statSync(OUT).size : 0; + return { ms, out: OUT, size }; +} + +function main() { + cleanArtifacts(); + const difficulty = Number(process.env.DIFF || 2000); + const inputSize = generateInput({ components: difficulty, propsPerRow: 6, buttonsPerRow: 3, chunkSize: 100 }); + + const rParsed = runParsedOnly(); + const rFull = runFull(); + + const rDump = runPluginTransformViaStdout(); + const rNoPlug = runNoPluginOnFile(rDump.fileName); + + console.log('\n=== SUMMARY ==='); + console.log( + `N=${difficulty} | input=${inputSize}B | ` + + `parsed-only: ${rParsed.ms}ms (out ${rParsed.size}B) | ` + + `full: ${rFull.ms}ms (out ${rFull.size}B) | ` + + `plugin→ets dump: ${rDump.msDump}ms (ets ${rDump.pluginEtsSize}B) | ` + + `noplugin: ${rNoPlug.ms}ms (out ${rNoPlug.size}B)` + ); +} + +if (require.main === module) main(); diff --git a/ui2abc/ui-plugins/perf/ui2abcconfig-ui-none.json b/ui2abc/ui-plugins/perf/ui2abcconfig-ui-none.json new file mode 100644 index 0000000000..5b6ee6ef8b --- /dev/null +++ b/ui2abc/ui-plugins/perf/ui2abcconfig-ui-none.json @@ -0,0 +1,35 @@ +{ + "compilerOptions": { + "package": "@ohos.arkui.perf-tests", + "outDir": "./build", + "baseUrl": "./input", + "paths": { + "arkui": ["../../../../arkoala-arkts/arkui/sdk"], + "@ohos.arkui.component": ["../../../../arkoala-arkts/arkui/@ohos.arkui.component"], + "global.resource": ["../../../../arkoala-arkts/modules/global.resource/src/resource"], + "@ohos.font": ["../../../../arkoala-arkts/modules/ohos/src/font"], + "@ohos.multimedia.image": ["../../../../arkoala-arkts/modules/ohos/src/multimedia.image"], + "@ohos.arkui.stateManagement": ["../../../../arkoala-arkts/arkui/@ohos.arkui.stateManagement"], + "@ohos.arkui.inspector": ["../../../../arkoala-arkts/arkui/@ohos.arkui.inspector"], + "@ohos.arkui.theme": ["../../../../arkoala-arkts/arkui/@ohos.arkui.theme"], + "@ohos.arkui.node": ["../../../../arkoala-arkts/arkui/@ohos.arkui.node"], + "@ohos.arkui.dragController": ["../../../../arkoala-arkts/arkui/@ohos.arkui.dragController"], + "@ohos.arkui.UIContext": ["../../../../arkoala-arkts/arkui/@ohos.arkui.UIContext"], + "@ohos.arkui": ["../../../../arkoala-arkts/arkui/@ohos.arkui"], + "@ohos.router": ["../../../../arkoala-arkts/arkui/@ohos.router"], + "@koalaui/builderLambda": ["../../../../arkoala-arkts/arkui/sdk/stateAnnotations"], + "@koalaui/interop": ["../../../../interop/src/arkts"], + "@koalaui/harness": ["../../../../incremental/harness/src/arkts"], + "@koalaui/compat": [ "../../../../incremental/compat/src/arkts" ], + "#platform": [ "../../../../incremental/compat/src/arkts" ], + "@koalaui/common": [ "../../../../incremental/common/src" ], + "@koalaui/runtime": [ "../../../../incremental/runtime/ets" ], + "@koalaui/runtime/annotations": [ "../../../../incremental/runtime/annotations" ] + }, + "plugins": [ + ] + }, + "include": [ + "./input/main.pluginout.ets" + ] +} diff --git a/ui2abc/ui-plugins/perf/ui2abcconfig-ui-parsed-checked.json b/ui2abc/ui-plugins/perf/ui2abcconfig-ui-parsed-checked.json new file mode 100644 index 0000000000..8b71356753 --- /dev/null +++ b/ui2abc/ui-plugins/perf/ui2abcconfig-ui-parsed-checked.json @@ -0,0 +1,37 @@ +{ + "compilerOptions": { + "package": "@ohos.arkui.perf-tests", + "outDir": "./build", + "baseUrl": "./input", + "paths": { + "arkui": ["../../../../arkoala-arkts/arkui/sdk"], + "@ohos.arkui.component": ["../../../../arkoala-arkts/arkui/@ohos.arkui.component"], + "global.resource": ["../../../../arkoala-arkts/modules/global.resource/src/resource"], + "@ohos.font": ["../../../../arkoala-arkts/modules/ohos/src/font"], + "@ohos.multimedia.image": ["../../../../arkoala-arkts/modules/ohos/src/multimedia.image"], + "@ohos.arkui.stateManagement": ["../../../../arkoala-arkts/arkui/@ohos.arkui.stateManagement"], + "@ohos.arkui.inspector": ["../../../../arkoala-arkts/arkui/@ohos.arkui.inspector"], + "@ohos.arkui.theme": ["../../../../arkoala-arkts/arkui/@ohos.arkui.theme"], + "@ohos.arkui.node": ["../../../../arkoala-arkts/arkui/@ohos.arkui.node"], + "@ohos.arkui.dragController": ["../../../../arkoala-arkts/arkui/@ohos.arkui.dragController"], + "@ohos.arkui.UIContext": ["../../../../arkoala-arkts/arkui/@ohos.arkui.UIContext"], + "@ohos.arkui": ["../../../../arkoala-arkts/arkui/@ohos.arkui"], + "@ohos.router": ["../../../../arkoala-arkts/arkui/@ohos.router"], + "@koalaui/builderLambda": ["../../../../arkoala-arkts/arkui/sdk/stateAnnotations"], + "@koalaui/interop": ["../../../../interop/src/arkts"], + "@koalaui/harness": ["../../../../incremental/harness/src/arkts"], + "@koalaui/compat": [ "../../../../incremental/compat/src/arkts" ], + "#platform": [ "../../../../incremental/compat/src/arkts" ], + "@koalaui/common": [ "../../../../incremental/common/src" ], + "@koalaui/runtime": [ "../../../../incremental/runtime/ets" ], + "@koalaui/runtime/annotations": [ "../../../../incremental/runtime/annotations" ] + }, + "plugins": [ + { "transform": "@koalaui/ui-plugins", "state": "parsed", "name": "ui" }, + { "transform": "@koalaui/ui-plugins", "state": "checked", "name": "ui" } + ] + }, + "include": [ + "./input/main.ui.ets" + ] +} diff --git a/ui2abc/ui-plugins/perf/ui2abcconfig-ui-parsed-only.json b/ui2abc/ui-plugins/perf/ui2abcconfig-ui-parsed-only.json new file mode 100644 index 0000000000..7d319c260b --- /dev/null +++ b/ui2abc/ui-plugins/perf/ui2abcconfig-ui-parsed-only.json @@ -0,0 +1,36 @@ +{ + "compilerOptions": { + "package": "@ohos.arkui.perf-tests", + "outDir": "./build", + "baseUrl": "./input", + "paths": { + "arkui": ["../../../../arkoala-arkts/arkui/sdk"], + "@ohos.arkui.component": ["../../../../arkoala-arkts/arkui/@ohos.arkui.component"], + "global.resource": ["../../../../arkoala-arkts/modules/global.resource/src/resource"], + "@ohos.font": ["../../../../arkoala-arkts/modules/ohos/src/font"], + "@ohos.multimedia.image": ["../../../../arkoala-arkts/modules/ohos/src/multimedia.image"], + "@ohos.arkui.stateManagement": ["../../../../arkoala-arkts/arkui/@ohos.arkui.stateManagement"], + "@ohos.arkui.inspector": ["../../../../arkoala-arkts/arkui/@ohos.arkui.inspector"], + "@ohos.arkui.theme": ["../../../../arkoala-arkts/arkui/@ohos.arkui.theme"], + "@ohos.arkui.node": ["../../../../arkoala-arkts/arkui/@ohos.arkui.node"], + "@ohos.arkui.dragController": ["../../../../arkoala-arkts/arkui/@ohos.arkui.dragController"], + "@ohos.arkui.UIContext": ["../../../../arkoala-arkts/arkui/@ohos.arkui.UIContext"], + "@ohos.arkui": ["../../../../arkoala-arkts/arkui/@ohos.arkui"], + "@ohos.router": ["../../../../arkoala-arkts/arkui/@ohos.router"], + "@koalaui/builderLambda": ["../../../../arkoala-arkts/arkui/sdk/stateAnnotations"], + "@koalaui/interop": ["../../../../interop/src/arkts"], + "@koalaui/harness": ["../../../../incremental/harness/src/arkts"], + "@koalaui/compat": [ "../../../../incremental/compat/src/arkts" ], + "#platform": [ "../../../../incremental/compat/src/arkts" ], + "@koalaui/common": [ "../../../../incremental/common/src" ], + "@koalaui/runtime": [ "../../../../incremental/runtime/ets" ], + "@koalaui/runtime/annotations": [ "../../../../incremental/runtime/annotations" ] + }, + "plugins": [ + { "transform": "@koalaui/ui-plugins", "state": "parsed", "name": "ui" } + ] + }, + "include": [ + "./input/main.ui.ets" + ] +} -- Gitee