aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorXueliang Zhong <xueliang.zhong@linaro.org>2016-01-26 15:59:00 +0000
committerAlexandre Rames <alexandre.rames@linaro.org>2016-02-01 14:20:40 +0000
commitba4e60c9450ba122ff0b673d1c1f39e97b108f33 (patch)
tree1f7904d2e7a4b9f75ac7befab101ece33a55fa49 /README.md
parentdcfe628091365d910a565a0f3824c6caf10f62df (diff)
downloadart-testing-ba4e60c9450ba122ff0b673d1c1f39e97b108f33.tar.gz
Guidelines about porting existing benchmark in README.md.
Change-Id: Ifa28745c62da3da5125704bd97f1abc8a1a6385c
Diffstat (limited to 'README.md')
-rw-r--r--README.md36
1 files changed, 35 insertions, 1 deletions
diff --git a/README.md b/README.md
index 1fe89d3..514a8ca 100644
--- a/README.md
+++ b/README.md
@@ -59,7 +59,7 @@ And similarly on target
adb shell "cd /data/local/tmp && dalvikvm -cp /data/local/tmp/bench.apk benchmarks/micro/Base64"
-### Comparing the rsults
+### Comparing the results
The results of `run.py` can be compared using `compare.py`.
@@ -103,6 +103,40 @@ benchmarks/ folder.
Before contributing, make sure that `test/test.py` passes.
+
+## How to Port an Existing Benchmark
+
+Similar to writing a benchmark, above guidelines also applies to porting an
+existing benchmark. Besides, developers should also notice:
+1. Licenses:
+ Make sure the benchmark has appropriate license for us to integrate it
+ freely into our test framework. Apache-v2.0, BSD, MIT licenses are well-
+ known and preferred. Check with the gatekeepers for other licenses.
+ The original license header in the ported benchmark MUST be *preserved* and
+ *unmodified*.
+
+2. Porting a benchmark should be done in two commits:
+ (1) Add *untouched* original file *with* its license and copyright header.
+ (2) Modify the benchmark as necessary.
+ This allows easily showing (`git diff <first commit> <second commit>`)
+ what modifications have been made to the original benchmarks.
+
+3. Keep the original code as it is:
+ This includes indents, spaces, tabs, etc. Only make changes to original code
+ when you have to (e.g. fit into our framework), but keep the changes as
+ minimal as possible. When we have to investigate why we're getting different
+ results than other projects or developers using the same benchmark, a 'diff'
+ should show as few changes as possible. If the original code has some coding
+ style which cannot pass our 'checkstyle' script, use 'CHECKSTYLE.OFF' to
+ bypass.
+
+4. Header comment:
+ When you have modified the code, make sure you comply with the license terms.
+ Provide a full copy of the license (Apache2, BSD, MIT, etc.) and notices
+ stating that you changed the files (required by GPLv2 etc) in the header
+ comment. Also, please put description in the header: where did you find the
+ benchmark source code and a link to original source.
+
### Rules
1. Test method names start with "time" -- Test launcher will find all timeXXX()