diff options
Diffstat (limited to 'zh-cn/compatibility/tests/development/metrics.html')
-rw-r--r-- | zh-cn/compatibility/tests/development/metrics.html | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/zh-cn/compatibility/tests/development/metrics.html b/zh-cn/compatibility/tests/development/metrics.html new file mode 100644 index 00000000..35ee36f9 --- /dev/null +++ b/zh-cn/compatibility/tests/development/metrics.html @@ -0,0 +1,55 @@ +<html devsite><head> + + <meta name="book_path" value="/_book.yaml"/> + + <meta name="project_path" value="/_project.yaml"/> +</head> +<body> + +<!-- + Copyright 2018 The Android Open Source Project + + 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. +--> + +<h1 id="native_metric_tests" class="page-title">原生指标测试</h1> + +<p>如前所述,原生指标测试通常用于执行 HAL 或直接与较低级别的系统服务交互,要利用连续测试服务,应使用 <a href="https://github.com/google/benchmark">google-benchmark</a> 框架编译原生指标测试。</p> + +<p>下面是一些常规说明:</p> + +<ol> +<li>参阅示例原生测试模块设置,位于:<code>bionic/benchmarks/bionic-benchmarks</code></li> +<li>测试模块 makefile 应使用 <code>BUILD_NATIVE_BENCHMARK</code> 编译规则,以便自动包含 google-benchmark 依赖项</li> +<li><p>使用 make 命令编译测试模块:</p> +<pre class="prettyprint lang-shell"><code>make -j40 bionic-benchmarks +</code></pre></li> +<li><p>使用 Trade Federation 自动化测试框架自动安装和运行:</p> +<pre class="prettyprint"><code>make tradefed-all -j +tradefed.sh run template/local_min --template:map test=bionic-benchmarks +1. Manually Install and Run: +1. Push the generated test binary onto device: + + ```shell + adb push ${OUT}/data/benchmarktest/bionic-benchmarks/bionic-benchmarks32 \ + /data/benchmarktest/bionic-benchmarks/bionic-benchmarks32 + ``` +1. Execute the test by invoking test binary on device: + + ```shell + adb shell /data/benchmarktest/bionic-benchmarks/bionic-benchmarks32 + ``` +</code></pre></li> +</ol> + +</body></html>
\ No newline at end of file |