Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
如何运行性能测试
在本地运行性能测试的主要方式是运行其主机端入口点。 这些入口点在
src/tests/end_to_end/perf/ 中定义。这些入口点用于 Fuchsia
基础架构 build,以收集性能结果并上传到 Chromeperf。 运行其中一个入口点涉及以下步骤:
使用 terminal 产品,以便与 CI 和 CQ 中在 Fuchsia 基础架构上测试的内容相匹配。 示例:
fx set terminal.x64-reduced-perf-variation --with //bundles/buildbot/terminal
fx build
照常在硬件或模拟器上启动 Fuchsia。
使用 fx test --e2e 运行测试的主机端入口点。 示例:
fx test --e2e --outdir="out/test_out" --timestamp-artifacts fidlc_microbenchmarks_test
fx test 的实参应为对 fuchsia_component_perf_test 模板的调用中指定的 GN 目标名称。
测试会将结果写入 out/test_out 的新创建的带时间戳的子目录。 这包括包含性能结果的 *.fuchsiaperf.json 文件。 它可能包含其他文件,例如 Fuchsia 跟踪记录。
如需生成和比较本地
更改前后的性能测试结果,您可以改用 perfcompare 工具。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2026-07-07。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2026-07-07。"],[],[]]