Guest User

Untitled

a guest
Oct 23rd, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.60 KB | None | 0 0
  1. ➜  hello-rxkotlin cat src/main/kotlin/Main.kt
  2. import kotlinx.coroutines.experimental.*
  3.  
  4. fun main(args: Array<String>) = runBlocking {
  5.     launch { doWorld() }
  6.     println("Hello,")
  7. }
  8.  
  9. // this is your first suspending function
  10. suspend fun doWorld() {
  11.     delay(1000L)
  12.     println("World!")
  13. }
  14. ➜  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
  15. Hello,
  16. World!
  17.         1.19 real         2.65 user         0.20 sys
  18.  137756672  maximum resident set size
  19.          0  average shared memory size
  20.          0  average unshared data size
  21.          0  average unshared stack size
  22.      33731  page reclaims
  23.        199  page faults
  24.          0  swaps
  25.          0  block input operations
  26.          0  block output operations
  27.          0  messages sent
  28.          0  messages received
  29.          1  signals received
  30.         10  voluntary context switches
  31.       3482  involuntary context switches
  32. ➜  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
  33. Build on Server(pid: 50285, port: 51572)
  34. [mainkt:50285]    classlist:     567.41 ms
  35. [mainkt:50285]        (cap):   1,752.20 ms
  36. [mainkt:50285]        setup:   2,164.57 ms
  37. 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.
  38. [mainkt:50285]   (typeflow):   3,774.95 ms
  39. [mainkt:50285]    (objects):   1,759.03 ms
  40. [mainkt:50285]   (features):      63.64 ms
  41. [mainkt:50285]     analysis:   5,681.65 ms
  42. [mainkt:50285]     universe:     553.23 ms
  43. [mainkt:50285]      (parse):     465.36 ms
  44. [mainkt:50285]     (inline):     550.72 ms
  45. [mainkt:50285]    (compile):   2,787.71 ms
  46. [mainkt:50285]      compile:   4,169.04 ms
  47. [mainkt:50285]        image:     813.90 ms
  48. [mainkt:50285]        write:     458.65 ms
  49. [mainkt:50285]      [total]:  14,438.86 ms
  50. ➜  hello-rxkotlin /usr/bin/time -l ./mainkt
  51. Hello,
  52. World!
  53.         1.01 real         0.00 user         0.00 sys
  54.    4308992  maximum resident set size
  55.          0  average shared memory size
  56.          0  average unshared data size
  57.          0  average unshared stack size
  58.       1074  page reclaims
  59.          0  page faults
  60.          0  swaps
  61.          0  block input operations
  62.          0  block output operations
  63.          0  messages sent
  64.          0  messages received
  65.          0  signals received
  66.          0  voluntary context switches
  67.         18  involuntary context switches
Advertisement
Add Comment
Please, Sign In to add comment