mirror of
https://gitee.com/openharmony/third_party_benchmark
synced 2025-02-17 05:48:12 +00:00
!7 add self-developed modify on third party source
Merge pull request !7 from NicoYam/master
This commit is contained in:
commit
7a92d42c09
70
BUILD.gn
Normal file
70
BUILD.gn
Normal file
@ -0,0 +1,70 @@
|
||||
# Copyright (c) 2021 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.
|
||||
|
||||
import("//build/ohos.gni")
|
||||
|
||||
# Lets callers do '#include <benchmark.h>'
|
||||
config("benchmark_config") {
|
||||
include_dirs = [
|
||||
"include",
|
||||
]
|
||||
}
|
||||
|
||||
# This is the configuration used to build benchmark itself.
|
||||
# It should not be needed outside of this library.
|
||||
config("benchmark_private_config") {
|
||||
visibility = [ ":*" ]
|
||||
include_dirs = [
|
||||
"include",
|
||||
]
|
||||
}
|
||||
|
||||
ohos_static_library("benchmark") {
|
||||
sources = [
|
||||
"src/benchmark_api_internal.cc",
|
||||
"src/benchmark_name.cc",
|
||||
"src/benchmark.cc",
|
||||
"src/benchmark_register.cc",
|
||||
"src/benchmark_runner.cc",
|
||||
"src/colorprint.cc",
|
||||
"src/commandlineflags.cc",
|
||||
"src/complexity.cc",
|
||||
"src/console_reporter.cc",
|
||||
"src/counter.cc",
|
||||
"src/csv_reporter.cc",
|
||||
"src/json_reporter.cc",
|
||||
"src/reporter.cc",
|
||||
"src/sleep.cc",
|
||||
"src/statistics.cc",
|
||||
"src/string_util.cc",
|
||||
"src/sysinfo.cc",
|
||||
"src/timers.cc",
|
||||
]
|
||||
|
||||
public_configs = [ ":benchmark_config" ]
|
||||
configs = [ ":benchmark_private_config" ]
|
||||
}
|
||||
|
||||
ohos_static_library("benchmark_main") {
|
||||
include_dirs = [
|
||||
"include",
|
||||
]
|
||||
|
||||
sources = [
|
||||
"src/benchmark_main.cc",
|
||||
]
|
||||
|
||||
deps = [
|
||||
":benchmark"
|
||||
]
|
||||
}
|
60
OAT.xml
Normal file
60
OAT.xml
Normal file
@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Copyright (c) 2021 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.
|
||||
|
||||
This is the configuration file template for OpenHarmony OSS Audit Tool, please copy it to your project root dir and modify it refer to OpenHarmony/tools_oat/README.
|
||||
|
||||
-->
|
||||
|
||||
<configuration>
|
||||
<oatconfig>
|
||||
<licensefile></licensefile>
|
||||
<policylist>
|
||||
<policy name="projectPolicy" desc="">
|
||||
<!--policyitem type="compatibility" name="GPL-2.0+" path="abc/.*" desc="Process that runs independently, invoked by the X process."/-->
|
||||
<!--policyitem type="license" name="LGPL" path="abc/.*" desc="Dynamically linked by module X"/-->
|
||||
<!--policyitem type="copyright" name="xxx" path="abc/.*" rule="may" group="defaultGroup" filefilter="copyrightPolicyFilter" desc="Developed by X Company"/-->
|
||||
</policy>
|
||||
</policylist>
|
||||
<filefilterlist>
|
||||
<filefilter name="defaultFilter" desc="Files not to check">
|
||||
<filteritem type="filename" name=".travis-libcxx-setup.sh|BUILD.bazel" desc="files are used for build by cmake, do not use them"/>
|
||||
<filteritem type="filename" name="CONTRIBUTORS" desc="contributors of opensource product, do not use it"/>
|
||||
</filefilter>
|
||||
<filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
|
||||
</filefilter>
|
||||
<filefilter name="copyrightPolicyFilter" desc="Filters for copyright header policies">
|
||||
</filefilter>
|
||||
<filefilter name="licenseFileNamePolicyFilter" desc="Filters for LICENSE file policies">
|
||||
</filefilter>
|
||||
<filefilter name="readmeFileNamePolicyFilter" desc="Filters for README file policies">
|
||||
</filefilter>
|
||||
<filefilter name="readmeOpenSourcefileNamePolicyFilter" desc="Filters for README.OpenSource file policies">
|
||||
</filefilter>
|
||||
<filefilter name="binaryFileTypePolicyFilter" desc="Filters for binary file policies">
|
||||
</filefilter>
|
||||
|
||||
</filefilterlist>
|
||||
<licensematcherlist>
|
||||
<!--licensematcher name="uvwxyz License" desc="If the scanning result is InvalidLicense, you can define matching rules here. Note that quotation marks must be escaped.">
|
||||
<licensetext name="
|
||||
uvwxyz license textA xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
" desc=""/>
|
||||
<licensetext name="
|
||||
uvwxyz license textB xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
" desc=""/>
|
||||
</licensematcher-->
|
||||
</licensematcherlist>
|
||||
</oatconfig>
|
||||
</configuration>
|
11
README.OpenSource
Normal file
11
README.OpenSource
Normal file
@ -0,0 +1,11 @@
|
||||
[
|
||||
{
|
||||
"Name": "benchmark",
|
||||
"License": "Apache License V2.0",
|
||||
"License File": "LICENSE",
|
||||
"Version Number": "1.5.2",
|
||||
"Owner": "renxiang11@huawei.com",
|
||||
"Upstream URL": "https://github.com/google/benchmark/releases/tag/v1.5.2",
|
||||
"Description": "A microbenchmark support library"
|
||||
}
|
||||
]
|
@ -3,7 +3,6 @@
|
||||
[![Build Status](https://travis-ci.org/google/benchmark.svg?branch=master)](https://travis-ci.org/google/benchmark)
|
||||
[![Build status](https://ci.appveyor.com/api/projects/status/u0qsyp7t1tk7cpxs/branch/master?svg=true)](https://ci.appveyor.com/project/google/benchmark/branch/master)
|
||||
[![Coverage Status](https://coveralls.io/repos/google/benchmark/badge.svg)](https://coveralls.io/r/google/benchmark)
|
||||
[![slackin](https://slackin-iqtfqnpzxd.now.sh/badge.svg)](https://slackin-iqtfqnpzxd.now.sh/)
|
||||
|
||||
A library to benchmark code snippets, similar to unit tests. Example:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user