Added documentation about performance measurement (#2719)

This commit is contained in:
LepilkinaElena
2019-02-27 15:01:00 +03:00
committed by GitHub
parent 61055e2082
commit 8cc6e67cee
2 changed files with 58 additions and 2 deletions
+57 -1
View File
@@ -92,4 +92,60 @@ To update the blackbox compiler tests set TeamCity build number in `gradle.prope
* **-Ptest_verbose** enables printing compiler args and other helpful information during a test execution.
./gradlew -Ptest_verbose :backend.native:tests:mpp_optional_expectation
./gradlew -Ptest_verbose :backend.native:tests:mpp_optional_expectation
## Performance measurement
Firstly, it's necessary to build analyzer tool to have opportunity to compare different performance results:
cd tools/benchmarksAnalyzer
../../gradlew build
To measure performance of Kotlin/Native compiler on existing benchmarks:
cd performance
../gradlew konanRun
**konanRun** task can be run separately for one/several benchmark applications:
../gradlew :cinterop:konanRun
**konanRun** task has parameter `filter` which allows to run only some subset of benchmarks :
../gradlew :cinterop:konanRun --filter=struct,macros
There are also tasks for running benchmarks on JVM (pay attention, some benchmarks e.g. cinterop benchmarks can't be run on JVM)
../gradlew jvmRun
Files with results of benchmarks run are saved in `performance/build`. **nativeReport.json** - for konanRun and **jvmReport.json** for jvmRun.
To compare different results run benchmarksAnalyzer tool:
cd tools/benchmarksAnalyzer/build/bin/<target>/benchmarksAnalyzerReleaseExecutable/
./benchmarksAnalyzer.kexe <file1> <file2>
Tool has several renders which allow produce output report in different forms (text, html, etc.). To set up render use flag `-render/-r`.
Output can be redirected to file with flag `-output/-o`.
To get detailed information about supported options, please use `-help/-h`.
Analyzer tool can compare both local files and files placed on Bintray/TeamCity.
File description stored on Bintray
bintray:<build number>:<target (Linux|Windows10|MacOSX)>:<filename>
Example
bintray:1.2-dev-7942:Windows10:nativeReport.json
File description stored on TeamCity
teamcity:<build locator>:<filename>
Example
teamcity:id:42491947:nativeReport.json
Pay attention, user and password information(with flag `-u <username>:<password>`) should be provided to get data from TeamCity.
@@ -59,7 +59,7 @@ object TeamCityConnector: Connector() {
val fileName = fileDescription.substringAfterLast(':')
if (fileDescription == fileLocation ||
fileDescription == buildLocator || fileName == fileDescription) {
error("To get file from bintray, please, specify, build number from TeamCity and target" +
error("To get file from TeamCity, please, specify, build locator and filename on TeamCity" +
" in format teamcity:build_locator:filename")
}
val accessFileUrl = "$teamCityUrl/app/rest/builds/$buildLocator/artifacts/content/$fileName"