Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ➜ hello-rxkotlin cat src/main/kotlin/Main.kt
- import kotlinx.coroutines.experimental.*
- fun main(args: Array<String>) = runBlocking {
- launch { doWorld() }
- println("Hello,")
- }
- // this is your first suspending function
- suspend fun doWorld() {
- delay(1000L)
- println("World!")
- }
- ➜ hello-rxkotlin /usr/bin/time -l java -cp build/libs/hello-rxkotlin-1.0-SNAPSHOT.jar:/Users/tair/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.2.70/b5b9449f73ce7bf312e89a7560cb3c209a0fa13e/kotlin-stdlib-1.2.70.jar:/Users/tair/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-common/0.30.2/18564dd930965938ee1da5e46f2ab4819490cac5/kotlinx-coroutines-core-common-0.30.2.jar:/Users/tair/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core/0.30.2/42b5b8c47b1f21c2435be73b50734338b10079e5/kotlinx-coroutines-core-0.30.2.jar MainKt
- Hello,
- World!
- 1.19 real 2.65 user 0.20 sys
- 137756672 maximum resident set size
- 0 average shared memory size
- 0 average unshared data size
- 0 average unshared stack size
- 33731 page reclaims
- 199 page faults
- 0 swaps
- 0 block input operations
- 0 block output operations
- 0 messages sent
- 0 messages received
- 1 signals received
- 10 voluntary context switches
- 3482 involuntary context switches
- ➜ hello-rxkotlin native-image -cp build/libs/hello-rxkotlin-1.0-SNAPSHOT.jar:/Users/tair/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.2.70/b5b9449f73ce7bf312e89a7560cb3c209a0fa13e/kotlin-stdlib-1.2.70.jar:/Users/tair/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-common/0.30.2/18564dd930965938ee1da5e46f2ab4819490cac5/kotlinx-coroutines-core-common-0.30.2.jar:/Users/tair/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core/0.30.2/42b5b8c47b1f21c2435be73b50734338b10079e5/kotlinx-coroutines-core-0.30.2.jar MainKt
- Build on Server(pid: 50285, port: 51572)
- [mainkt:50285] classlist: 567.41 ms
- [mainkt:50285] (cap): 1,752.20 ms
- [mainkt:50285] setup: 2,164.57 ms
- warning: unknown locality of class Lkotlin/coroutines/experimental/CoroutineContext$plus$1;, assuming class is not local. To remove the warning report an issue to the library or language author. The issue is caused by Lkotlin/coroutines/experimental/CoroutineContext$plus$1; which is not following the naming convention.
- [mainkt:50285] (typeflow): 3,774.95 ms
- [mainkt:50285] (objects): 1,759.03 ms
- [mainkt:50285] (features): 63.64 ms
- [mainkt:50285] analysis: 5,681.65 ms
- [mainkt:50285] universe: 553.23 ms
- [mainkt:50285] (parse): 465.36 ms
- [mainkt:50285] (inline): 550.72 ms
- [mainkt:50285] (compile): 2,787.71 ms
- [mainkt:50285] compile: 4,169.04 ms
- [mainkt:50285] image: 813.90 ms
- [mainkt:50285] write: 458.65 ms
- [mainkt:50285] [total]: 14,438.86 ms
- ➜ hello-rxkotlin /usr/bin/time -l ./mainkt
- Hello,
- World!
- 1.01 real 0.00 user 0.00 sys
- 4308992 maximum resident set size
- 0 average shared memory size
- 0 average unshared data size
- 0 average unshared stack size
- 1074 page reclaims
- 0 page faults
- 0 swaps
- 0 block input operations
- 0 block output operations
- 0 messages sent
- 0 messages received
- 0 signals received
- 0 voluntary context switches
- 18 involuntary context switches
Advertisement
Add Comment
Please, Sign In to add comment