diff --git a/HACKING.md b/HACKING.md index 4e23c54a8c6..61a3c278498 100644 --- a/HACKING.md +++ b/HACKING.md @@ -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 \ No newline at end of file + ./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//benchmarksAnalyzerReleaseExecutable/ + ./benchmarksAnalyzer.kexe + + 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::: + + Example + + bintray:1.2-dev-7942:Windows10:nativeReport.json + + File description stored on TeamCity + + teamcity:: + + Example + + teamcity:id:42491947:nativeReport.json + + Pay attention, user and password information(with flag `-u :`) should be provided to get data from TeamCity. + \ No newline at end of file diff --git a/tools/benchmarksAnalyzer/src/main/kotlin/main.kt b/tools/benchmarksAnalyzer/src/main/kotlin/main.kt index 62775608e4a..9e4e7b10e56 100644 --- a/tools/benchmarksAnalyzer/src/main/kotlin/main.kt +++ b/tools/benchmarksAnalyzer/src/main/kotlin/main.kt @@ -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"