New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make caches in 'ExtractAPI' use 'perRunCaches' #324 #347

Merged
merged 2 commits into from Jul 10, 2017

Conversation

Projects
None yet
4 participants
@gheine

gheine commented Jul 7, 2017

No description provided.

@lightbend-cla-validator

This comment has been minimized.

Show comment
Hide comment
@lightbend-cla-validator

lightbend-cla-validator Jul 7, 2017

Hi @gheine,

Thank you for your contribution! We really value the time you've taken to put this together.

Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement:

http://www.lightbend.com/contribute/cla

lightbend-cla-validator commented Jul 7, 2017

Hi @gheine,

Thank you for your contribution! We really value the time you've taken to put this together.

Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement:

http://www.lightbend.com/contribute/cla

@jvican

jvican approved these changes Jul 7, 2017

Yay! CI is passing, so my proposal was possible. Thanks for contributing this @gheine, really appreciate it 😄.

LGTM!

@jvican

This comment has been minimized.

Show comment
Hide comment
@jvican

jvican Jul 7, 2017

Member

I'll run the benchmarks for this, to see if it brings any improvements. 😄

Member

jvican commented Jul 7, 2017

I'll run the benchmarks for this, to see if it brings any improvements. 😄

@jvican jvican added the spree label Jul 7, 2017

@jvican

This comment has been minimized.

Show comment
Hide comment
@jvican

jvican Jul 10, 2017

Member

It seems that there's no runtime improvement after this change, all the results (even for percentiles) fail in the error rate. Benchmark results are here:

AFTER
======

[info] Benchmark                                                            (_tempDir)    Mode  Cnt           Score           Error   Units
[info] HotScalacBenchmark.compile                                    /tmp/sbt_1df17d55  sample   18       25883.516 ±       312.883   ms/op
[info] HotScalacBenchmark.compile:compile·p0.00                      /tmp/sbt_1df17d55  sample            24998.052                   ms/op
[info] HotScalacBenchmark.compile:compile·p0.50                      /tmp/sbt_1df17d55  sample            25920.799                   ms/op
[info] HotScalacBenchmark.compile:compile·p0.90                      /tmp/sbt_1df17d55  sample            26249.632                   ms/op
[info] HotScalacBenchmark.compile:compile·p0.95                      /tmp/sbt_1df17d55  sample            26340.229                   ms/op
[info] HotScalacBenchmark.compile:compile·p0.99                      /tmp/sbt_1df17d55  sample            26340.229                   ms/op
[info] HotScalacBenchmark.compile:compile·p0.999                     /tmp/sbt_1df17d55  sample            26340.229                   ms/op
[info] HotScalacBenchmark.compile:compile·p0.9999                    /tmp/sbt_1df17d55  sample            26340.229                   ms/op
[info] HotScalacBenchmark.compile:compile·p1.00                      /tmp/sbt_1df17d55  sample            26340.229                   ms/op
[info] HotScalacBenchmark.compile:·gc.alloc.rate                     /tmp/sbt_1df17d55  sample   18         226.076 ±         2.729  MB/sec
[info] HotScalacBenchmark.compile:·gc.alloc.rate.norm                /tmp/sbt_1df17d55  sample   18  6258629189.778 ±  40003311.136    B/op
[info] HotScalacBenchmark.compile:·gc.churn.PS_Eden_Space            /tmp/sbt_1df17d55  sample   18         226.257 ±         2.858  MB/sec
[info] HotScalacBenchmark.compile:·gc.churn.PS_Eden_Space.norm       /tmp/sbt_1df17d55  sample   18  6263987897.778 ±  77757457.834    B/op
[info] HotScalacBenchmark.compile:·gc.churn.PS_Old_Gen               /tmp/sbt_1df17d55  sample   18          16.861 ±         0.211  MB/sec
[info] HotScalacBenchmark.compile:·gc.churn.PS_Old_Gen.norm          /tmp/sbt_1df17d55  sample   18   466770760.889 ±   3196979.186    B/op
[info] HotScalacBenchmark.compile:·gc.churn.PS_Survivor_Space        /tmp/sbt_1df17d55  sample   18           4.331 ±         0.297  MB/sec
[info] HotScalacBenchmark.compile:·gc.churn.PS_Survivor_Space.norm   /tmp/sbt_1df17d55  sample   18   119857739.556 ±   7476705.523    B/op
[info] HotScalacBenchmark.compile:·gc.count                          /tmp/sbt_1df17d55  sample   18         458.000                  counts
[info] HotScalacBenchmark.compile:·gc.time                           /tmp/sbt_1df17d55  sample   18       37893.000                      ms
[info] WarmScalacBenchmark.compile                                   /tmp/sbt_1df17d55  sample    3       66236.449 ±     17008.735   ms/op
[info] WarmScalacBenchmark.compile:compile·p0.00                     /tmp/sbt_1df17d55  sample            65162.707                   ms/op
[info] WarmScalacBenchmark.compile:compile·p0.50                     /tmp/sbt_1df17d55  sample            66706.211                   ms/op
[info] WarmScalacBenchmark.compile:compile·p0.90                     /tmp/sbt_1df17d55  sample            66840.429                   ms/op
[info] WarmScalacBenchmark.compile:compile·p0.95                     /tmp/sbt_1df17d55  sample            66840.429                   ms/op
[info] WarmScalacBenchmark.compile:compile·p0.99                     /tmp/sbt_1df17d55  sample            66840.429                   ms/op
[info] WarmScalacBenchmark.compile:compile·p0.999                    /tmp/sbt_1df17d55  sample            66840.429                   ms/op
[info] WarmScalacBenchmark.compile:compile·p0.9999                   /tmp/sbt_1df17d55  sample            66840.429                   ms/op
[info] WarmScalacBenchmark.compile:compile·p1.00                     /tmp/sbt_1df17d55  sample            66840.429                   ms/op
[info] WarmScalacBenchmark.compile:·gc.alloc.rate                    /tmp/sbt_1df17d55  sample    3          95.585 ±        25.996  MB/sec
[info] WarmScalacBenchmark.compile:·gc.alloc.rate.norm               /tmp/sbt_1df17d55  sample    3  6747534005.333 ± 180272066.756    B/op
[info] WarmScalacBenchmark.compile:·gc.churn.PS_Eden_Space           /tmp/sbt_1df17d55  sample    3          95.218 ±        17.341  MB/sec
[info] WarmScalacBenchmark.compile:·gc.churn.PS_Eden_Space.norm      /tmp/sbt_1df17d55  sample    3  6721905562.667 ± 623508238.345    B/op
[info] WarmScalacBenchmark.compile:·gc.churn.PS_Old_Gen              /tmp/sbt_1df17d55  sample    3           0.534 ±         0.303  MB/sec
[info] WarmScalacBenchmark.compile:·gc.churn.PS_Old_Gen.norm         /tmp/sbt_1df17d55  sample    3    37704480.000 ±  19056072.979    B/op
[info] WarmScalacBenchmark.compile:·gc.churn.PS_Survivor_Space       /tmp/sbt_1df17d55  sample    3           3.560 ±         2.849  MB/sec
[info] WarmScalacBenchmark.compile:·gc.churn.PS_Survivor_Space.norm  /tmp/sbt_1df17d55  sample    3   251446581.333 ± 255790978.730    B/op
[info] WarmScalacBenchmark.compile:·gc.count                         /tmp/sbt_1df17d55  sample    3         140.000                  counts
[info] WarmScalacBenchmark.compile:·gc.time                          /tmp/sbt_1df17d55  sample    3       13566.000                      ms
[info] ColdScalacBenchmark.compile                                   /tmp/sbt_1df17d55      ss   10       54766.246 ±      1482.003   ms/op
[info] ColdScalacBenchmark.compile:·gc.alloc.rate                    /tmp/sbt_1df17d55      ss   10         118.760 ±         3.094  MB/sec
[info] ColdScalacBenchmark.compile:·gc.alloc.rate.norm               /tmp/sbt_1df17d55      ss   10  6946205188.000 ±  51437932.375    B/op
[info] ColdScalacBenchmark.compile:·gc.churn.PS_Eden_Space           /tmp/sbt_1df17d55      ss   10         112.037 ±         5.371  MB/sec
[info] ColdScalacBenchmark.compile:·gc.churn.PS_Eden_Space.norm      /tmp/sbt_1df17d55      ss   10  6553552502.400 ± 300748850.547    B/op
[info] ColdScalacBenchmark.compile:·gc.churn.PS_Survivor_Space       /tmp/sbt_1df17d55      ss   10           2.358 ±         0.278  MB/sec
[info] ColdScalacBenchmark.compile:·gc.churn.PS_Survivor_Space.norm  /tmp/sbt_1df17d55      ss   10   137995185.600 ±  17575087.046    B/op
[info] ColdScalacBenchmark.compile:·gc.count                         /tmp/sbt_1df17d55      ss   10         249.000                  counts
[info] ColdScalacBenchmark.compile:·gc.time                          /tmp/sbt_1df17d55      ss   10       34976.000                      ms

BEFORE
======
[info] Benchmark                                                            (_tempDir)    Mode  Cnt           Score           Error   Units
[info] HotScalacBenchmark.compile                                    /tmp/sbt_b7aa119c  sample   18       25751.162 ±       455.489   ms/op
[info] HotScalacBenchmark.compile:compile·p0.00                      /tmp/sbt_b7aa119c  sample            25065.161                   ms/op
[info] HotScalacBenchmark.compile:compile·p0.50                      /tmp/sbt_b7aa119c  sample            25702.695                   ms/op
[info] HotScalacBenchmark.compile:compile·p0.90                      /tmp/sbt_b7aa119c  sample            26528.134                   ms/op
[info] HotScalacBenchmark.compile:compile·p0.95                      /tmp/sbt_b7aa119c  sample            26709.328                   ms/op
[info] HotScalacBenchmark.compile:compile·p0.99                      /tmp/sbt_b7aa119c  sample            26709.328                   ms/op
[info] HotScalacBenchmark.compile:compile·p0.999                     /tmp/sbt_b7aa119c  sample            26709.328                   ms/op
[info] HotScalacBenchmark.compile:compile·p0.9999                    /tmp/sbt_b7aa119c  sample            26709.328                   ms/op
[info] HotScalacBenchmark.compile:compile·p1.00                      /tmp/sbt_b7aa119c  sample            26709.328                   ms/op
[info] HotScalacBenchmark.compile:·gc.alloc.rate                     /tmp/sbt_b7aa119c  sample   18         226.480 ±         4.153  MB/sec
[info] HotScalacBenchmark.compile:·gc.alloc.rate.norm                /tmp/sbt_b7aa119c  sample   18  6237364887.111 ±   8021961.234    B/op
[info] HotScalacBenchmark.compile:·gc.churn.PS_Eden_Space            /tmp/sbt_b7aa119c  sample   18         226.541 ±         5.326  MB/sec
[info] HotScalacBenchmark.compile:·gc.churn.PS_Eden_Space.norm       /tmp/sbt_b7aa119c  sample   18  6238820484.000 ±  79594589.473    B/op
[info] HotScalacBenchmark.compile:·gc.churn.PS_Old_Gen               /tmp/sbt_b7aa119c  sample   18          17.003 ±         0.414  MB/sec
[info] HotScalacBenchmark.compile:·gc.churn.PS_Old_Gen.norm          /tmp/sbt_b7aa119c  sample   18   468227830.667 ±   4790839.419    B/op
[info] HotScalacBenchmark.compile:·gc.churn.PS_Survivor_Space        /tmp/sbt_b7aa119c  sample   18           4.393 ±         0.426  MB/sec
[info] HotScalacBenchmark.compile:·gc.churn.PS_Survivor_Space.norm   /tmp/sbt_b7aa119c  sample   18   120945354.222 ±  11158447.829    B/op
[info] HotScalacBenchmark.compile:·gc.count                          /tmp/sbt_b7aa119c  sample   18         475.000                  counts
[info] HotScalacBenchmark.compile:·gc.time                           /tmp/sbt_b7aa119c  sample   18       38297.000                      ms
[info] WarmScalacBenchmark.compile                                   /tmp/sbt_b7aa119c  sample    3       64066.595 ±     33086.735   ms/op
[info] WarmScalacBenchmark.compile:compile·p0.00                     /tmp/sbt_b7aa119c  sample            62209.917                   ms/op
[info] WarmScalacBenchmark.compile:compile·p0.50                     /tmp/sbt_b7aa119c  sample            64156.074                   ms/op
[info] WarmScalacBenchmark.compile:compile·p0.90                     /tmp/sbt_b7aa119c  sample            65833.796                   ms/op
[info] WarmScalacBenchmark.compile:compile·p0.95                     /tmp/sbt_b7aa119c  sample            65833.796                   ms/op
[info] WarmScalacBenchmark.compile:compile·p0.99                     /tmp/sbt_b7aa119c  sample            65833.796                   ms/op
[info] WarmScalacBenchmark.compile:compile·p0.999                    /tmp/sbt_b7aa119c  sample            65833.796                   ms/op
[info] WarmScalacBenchmark.compile:compile·p0.9999                   /tmp/sbt_b7aa119c  sample            65833.796                   ms/op
[info] WarmScalacBenchmark.compile:compile·p1.00                     /tmp/sbt_b7aa119c  sample            65833.796                   ms/op
[info] WarmScalacBenchmark.compile:·gc.alloc.rate                    /tmp/sbt_b7aa119c  sample    3          99.015 ±        47.307  MB/sec
[info] WarmScalacBenchmark.compile:·gc.alloc.rate.norm               /tmp/sbt_b7aa119c  sample    3  6763195288.000 ± 261506247.231    B/op
[info] WarmScalacBenchmark.compile:·gc.churn.PS_Eden_Space           /tmp/sbt_b7aa119c  sample    3          99.357 ±        45.438  MB/sec
[info] WarmScalacBenchmark.compile:·gc.churn.PS_Eden_Space.norm      /tmp/sbt_b7aa119c  sample    3  6786708917.333 ± 445871972.008    B/op
[info] WarmScalacBenchmark.compile:·gc.churn.PS_Old_Gen              /tmp/sbt_b7aa119c  sample    3           0.521 ±         0.468  MB/sec
[info] WarmScalacBenchmark.compile:·gc.churn.PS_Old_Gen.norm         /tmp/sbt_b7aa119c  sample    3    35551512.000 ±  20627202.202    B/op
[info] WarmScalacBenchmark.compile:·gc.churn.PS_Survivor_Space       /tmp/sbt_b7aa119c  sample    3           3.703 ±         2.098  MB/sec
[info] WarmScalacBenchmark.compile:·gc.churn.PS_Survivor_Space.norm  /tmp/sbt_b7aa119c  sample    3   252915925.333 ±  86273902.721    B/op
[info] WarmScalacBenchmark.compile:·gc.count                         /tmp/sbt_b7aa119c  sample    3         136.000                  counts
[info] WarmScalacBenchmark.compile:·gc.time                          /tmp/sbt_b7aa119c  sample    3       12998.000                      ms
[info] ColdScalacBenchmark.compile                                   /tmp/sbt_b7aa119c      ss   10       55051.741 ±      1504.925   ms/op
[info] ColdScalacBenchmark.compile:·gc.alloc.rate                    /tmp/sbt_b7aa119c      ss   10         117.655 ±         3.163  MB/sec
[info] ColdScalacBenchmark.compile:·gc.alloc.rate.norm               /tmp/sbt_b7aa119c      ss   10  6916963551.200 ±  89432423.495    B/op
[info] ColdScalacBenchmark.compile:·gc.churn.PS_Eden_Space           /tmp/sbt_b7aa119c      ss   10         109.503 ±         6.447  MB/sec
[info] ColdScalacBenchmark.compile:·gc.churn.PS_Eden_Space.norm      /tmp/sbt_b7aa119c      ss   10  6437335380.000 ± 326084755.897    B/op
[info] ColdScalacBenchmark.compile:·gc.churn.PS_Survivor_Space       /tmp/sbt_b7aa119c      ss   10           2.429 ±         0.343  MB/sec
[info] ColdScalacBenchmark.compile:·gc.churn.PS_Survivor_Space.norm  /tmp/sbt_b7aa119c      ss   10   142817865.600 ±  20757559.752    B/op
[info] ColdScalacBenchmark.compile:·gc.count                         /tmp/sbt_b7aa119c      ss   10         248.000                  counts
[info] ColdScalacBenchmark.compile:·gc.time                          /tmp/sbt_b7aa119c      ss   10       35908.000                      ms
[success] Total time: 1892 s, completed Jul 10, 2017 5:06:16 PM

One of the reasons why the change doesn't have a performance impact is because ExtractAPI clears up the most populated caches structureCache and pending.

However, I will still like to see this change in because:

  1. It's a convention to use perRunCaches within the compiler. These data structures should behave in the same way.
  2. If the rest of the caches grow, perRunCaches can help us avoid a performance penalty in the future.

Hence, I still LGTM this change!

Member

jvican commented Jul 10, 2017

It seems that there's no runtime improvement after this change, all the results (even for percentiles) fail in the error rate. Benchmark results are here:

AFTER
======

[info] Benchmark                                                            (_tempDir)    Mode  Cnt           Score           Error   Units
[info] HotScalacBenchmark.compile                                    /tmp/sbt_1df17d55  sample   18       25883.516 ±       312.883   ms/op
[info] HotScalacBenchmark.compile:compile·p0.00                      /tmp/sbt_1df17d55  sample            24998.052                   ms/op
[info] HotScalacBenchmark.compile:compile·p0.50                      /tmp/sbt_1df17d55  sample            25920.799                   ms/op
[info] HotScalacBenchmark.compile:compile·p0.90                      /tmp/sbt_1df17d55  sample            26249.632                   ms/op
[info] HotScalacBenchmark.compile:compile·p0.95                      /tmp/sbt_1df17d55  sample            26340.229                   ms/op
[info] HotScalacBenchmark.compile:compile·p0.99                      /tmp/sbt_1df17d55  sample            26340.229                   ms/op
[info] HotScalacBenchmark.compile:compile·p0.999                     /tmp/sbt_1df17d55  sample            26340.229                   ms/op
[info] HotScalacBenchmark.compile:compile·p0.9999                    /tmp/sbt_1df17d55  sample            26340.229                   ms/op
[info] HotScalacBenchmark.compile:compile·p1.00                      /tmp/sbt_1df17d55  sample            26340.229                   ms/op
[info] HotScalacBenchmark.compile:·gc.alloc.rate                     /tmp/sbt_1df17d55  sample   18         226.076 ±         2.729  MB/sec
[info] HotScalacBenchmark.compile:·gc.alloc.rate.norm                /tmp/sbt_1df17d55  sample   18  6258629189.778 ±  40003311.136    B/op
[info] HotScalacBenchmark.compile:·gc.churn.PS_Eden_Space            /tmp/sbt_1df17d55  sample   18         226.257 ±         2.858  MB/sec
[info] HotScalacBenchmark.compile:·gc.churn.PS_Eden_Space.norm       /tmp/sbt_1df17d55  sample   18  6263987897.778 ±  77757457.834    B/op
[info] HotScalacBenchmark.compile:·gc.churn.PS_Old_Gen               /tmp/sbt_1df17d55  sample   18          16.861 ±         0.211  MB/sec
[info] HotScalacBenchmark.compile:·gc.churn.PS_Old_Gen.norm          /tmp/sbt_1df17d55  sample   18   466770760.889 ±   3196979.186    B/op
[info] HotScalacBenchmark.compile:·gc.churn.PS_Survivor_Space        /tmp/sbt_1df17d55  sample   18           4.331 ±         0.297  MB/sec
[info] HotScalacBenchmark.compile:·gc.churn.PS_Survivor_Space.norm   /tmp/sbt_1df17d55  sample   18   119857739.556 ±   7476705.523    B/op
[info] HotScalacBenchmark.compile:·gc.count                          /tmp/sbt_1df17d55  sample   18         458.000                  counts
[info] HotScalacBenchmark.compile:·gc.time                           /tmp/sbt_1df17d55  sample   18       37893.000                      ms
[info] WarmScalacBenchmark.compile                                   /tmp/sbt_1df17d55  sample    3       66236.449 ±     17008.735   ms/op
[info] WarmScalacBenchmark.compile:compile·p0.00                     /tmp/sbt_1df17d55  sample            65162.707                   ms/op
[info] WarmScalacBenchmark.compile:compile·p0.50                     /tmp/sbt_1df17d55  sample            66706.211                   ms/op
[info] WarmScalacBenchmark.compile:compile·p0.90                     /tmp/sbt_1df17d55  sample            66840.429                   ms/op
[info] WarmScalacBenchmark.compile:compile·p0.95                     /tmp/sbt_1df17d55  sample            66840.429                   ms/op
[info] WarmScalacBenchmark.compile:compile·p0.99                     /tmp/sbt_1df17d55  sample            66840.429                   ms/op
[info] WarmScalacBenchmark.compile:compile·p0.999                    /tmp/sbt_1df17d55  sample            66840.429                   ms/op
[info] WarmScalacBenchmark.compile:compile·p0.9999                   /tmp/sbt_1df17d55  sample            66840.429                   ms/op
[info] WarmScalacBenchmark.compile:compile·p1.00                     /tmp/sbt_1df17d55  sample            66840.429                   ms/op
[info] WarmScalacBenchmark.compile:·gc.alloc.rate                    /tmp/sbt_1df17d55  sample    3          95.585 ±        25.996  MB/sec
[info] WarmScalacBenchmark.compile:·gc.alloc.rate.norm               /tmp/sbt_1df17d55  sample    3  6747534005.333 ± 180272066.756    B/op
[info] WarmScalacBenchmark.compile:·gc.churn.PS_Eden_Space           /tmp/sbt_1df17d55  sample    3          95.218 ±        17.341  MB/sec
[info] WarmScalacBenchmark.compile:·gc.churn.PS_Eden_Space.norm      /tmp/sbt_1df17d55  sample    3  6721905562.667 ± 623508238.345    B/op
[info] WarmScalacBenchmark.compile:·gc.churn.PS_Old_Gen              /tmp/sbt_1df17d55  sample    3           0.534 ±         0.303  MB/sec
[info] WarmScalacBenchmark.compile:·gc.churn.PS_Old_Gen.norm         /tmp/sbt_1df17d55  sample    3    37704480.000 ±  19056072.979    B/op
[info] WarmScalacBenchmark.compile:·gc.churn.PS_Survivor_Space       /tmp/sbt_1df17d55  sample    3           3.560 ±         2.849  MB/sec
[info] WarmScalacBenchmark.compile:·gc.churn.PS_Survivor_Space.norm  /tmp/sbt_1df17d55  sample    3   251446581.333 ± 255790978.730    B/op
[info] WarmScalacBenchmark.compile:·gc.count                         /tmp/sbt_1df17d55  sample    3         140.000                  counts
[info] WarmScalacBenchmark.compile:·gc.time                          /tmp/sbt_1df17d55  sample    3       13566.000                      ms
[info] ColdScalacBenchmark.compile                                   /tmp/sbt_1df17d55      ss   10       54766.246 ±      1482.003   ms/op
[info] ColdScalacBenchmark.compile:·gc.alloc.rate                    /tmp/sbt_1df17d55      ss   10         118.760 ±         3.094  MB/sec
[info] ColdScalacBenchmark.compile:·gc.alloc.rate.norm               /tmp/sbt_1df17d55      ss   10  6946205188.000 ±  51437932.375    B/op
[info] ColdScalacBenchmark.compile:·gc.churn.PS_Eden_Space           /tmp/sbt_1df17d55      ss   10         112.037 ±         5.371  MB/sec
[info] ColdScalacBenchmark.compile:·gc.churn.PS_Eden_Space.norm      /tmp/sbt_1df17d55      ss   10  6553552502.400 ± 300748850.547    B/op
[info] ColdScalacBenchmark.compile:·gc.churn.PS_Survivor_Space       /tmp/sbt_1df17d55      ss   10           2.358 ±         0.278  MB/sec
[info] ColdScalacBenchmark.compile:·gc.churn.PS_Survivor_Space.norm  /tmp/sbt_1df17d55      ss   10   137995185.600 ±  17575087.046    B/op
[info] ColdScalacBenchmark.compile:·gc.count                         /tmp/sbt_1df17d55      ss   10         249.000                  counts
[info] ColdScalacBenchmark.compile:·gc.time                          /tmp/sbt_1df17d55      ss   10       34976.000                      ms

BEFORE
======
[info] Benchmark                                                            (_tempDir)    Mode  Cnt           Score           Error   Units
[info] HotScalacBenchmark.compile                                    /tmp/sbt_b7aa119c  sample   18       25751.162 ±       455.489   ms/op
[info] HotScalacBenchmark.compile:compile·p0.00                      /tmp/sbt_b7aa119c  sample            25065.161                   ms/op
[info] HotScalacBenchmark.compile:compile·p0.50                      /tmp/sbt_b7aa119c  sample            25702.695                   ms/op
[info] HotScalacBenchmark.compile:compile·p0.90                      /tmp/sbt_b7aa119c  sample            26528.134                   ms/op
[info] HotScalacBenchmark.compile:compile·p0.95                      /tmp/sbt_b7aa119c  sample            26709.328                   ms/op
[info] HotScalacBenchmark.compile:compile·p0.99                      /tmp/sbt_b7aa119c  sample            26709.328                   ms/op
[info] HotScalacBenchmark.compile:compile·p0.999                     /tmp/sbt_b7aa119c  sample            26709.328                   ms/op
[info] HotScalacBenchmark.compile:compile·p0.9999                    /tmp/sbt_b7aa119c  sample            26709.328                   ms/op
[info] HotScalacBenchmark.compile:compile·p1.00                      /tmp/sbt_b7aa119c  sample            26709.328                   ms/op
[info] HotScalacBenchmark.compile:·gc.alloc.rate                     /tmp/sbt_b7aa119c  sample   18         226.480 ±         4.153  MB/sec
[info] HotScalacBenchmark.compile:·gc.alloc.rate.norm                /tmp/sbt_b7aa119c  sample   18  6237364887.111 ±   8021961.234    B/op
[info] HotScalacBenchmark.compile:·gc.churn.PS_Eden_Space            /tmp/sbt_b7aa119c  sample   18         226.541 ±         5.326  MB/sec
[info] HotScalacBenchmark.compile:·gc.churn.PS_Eden_Space.norm       /tmp/sbt_b7aa119c  sample   18  6238820484.000 ±  79594589.473    B/op
[info] HotScalacBenchmark.compile:·gc.churn.PS_Old_Gen               /tmp/sbt_b7aa119c  sample   18          17.003 ±         0.414  MB/sec
[info] HotScalacBenchmark.compile:·gc.churn.PS_Old_Gen.norm          /tmp/sbt_b7aa119c  sample   18   468227830.667 ±   4790839.419    B/op
[info] HotScalacBenchmark.compile:·gc.churn.PS_Survivor_Space        /tmp/sbt_b7aa119c  sample   18           4.393 ±         0.426  MB/sec
[info] HotScalacBenchmark.compile:·gc.churn.PS_Survivor_Space.norm   /tmp/sbt_b7aa119c  sample   18   120945354.222 ±  11158447.829    B/op
[info] HotScalacBenchmark.compile:·gc.count                          /tmp/sbt_b7aa119c  sample   18         475.000                  counts
[info] HotScalacBenchmark.compile:·gc.time                           /tmp/sbt_b7aa119c  sample   18       38297.000                      ms
[info] WarmScalacBenchmark.compile                                   /tmp/sbt_b7aa119c  sample    3       64066.595 ±     33086.735   ms/op
[info] WarmScalacBenchmark.compile:compile·p0.00                     /tmp/sbt_b7aa119c  sample            62209.917                   ms/op
[info] WarmScalacBenchmark.compile:compile·p0.50                     /tmp/sbt_b7aa119c  sample            64156.074                   ms/op
[info] WarmScalacBenchmark.compile:compile·p0.90                     /tmp/sbt_b7aa119c  sample            65833.796                   ms/op
[info] WarmScalacBenchmark.compile:compile·p0.95                     /tmp/sbt_b7aa119c  sample            65833.796                   ms/op
[info] WarmScalacBenchmark.compile:compile·p0.99                     /tmp/sbt_b7aa119c  sample            65833.796                   ms/op
[info] WarmScalacBenchmark.compile:compile·p0.999                    /tmp/sbt_b7aa119c  sample            65833.796                   ms/op
[info] WarmScalacBenchmark.compile:compile·p0.9999                   /tmp/sbt_b7aa119c  sample            65833.796                   ms/op
[info] WarmScalacBenchmark.compile:compile·p1.00                     /tmp/sbt_b7aa119c  sample            65833.796                   ms/op
[info] WarmScalacBenchmark.compile:·gc.alloc.rate                    /tmp/sbt_b7aa119c  sample    3          99.015 ±        47.307  MB/sec
[info] WarmScalacBenchmark.compile:·gc.alloc.rate.norm               /tmp/sbt_b7aa119c  sample    3  6763195288.000 ± 261506247.231    B/op
[info] WarmScalacBenchmark.compile:·gc.churn.PS_Eden_Space           /tmp/sbt_b7aa119c  sample    3          99.357 ±        45.438  MB/sec
[info] WarmScalacBenchmark.compile:·gc.churn.PS_Eden_Space.norm      /tmp/sbt_b7aa119c  sample    3  6786708917.333 ± 445871972.008    B/op
[info] WarmScalacBenchmark.compile:·gc.churn.PS_Old_Gen              /tmp/sbt_b7aa119c  sample    3           0.521 ±         0.468  MB/sec
[info] WarmScalacBenchmark.compile:·gc.churn.PS_Old_Gen.norm         /tmp/sbt_b7aa119c  sample    3    35551512.000 ±  20627202.202    B/op
[info] WarmScalacBenchmark.compile:·gc.churn.PS_Survivor_Space       /tmp/sbt_b7aa119c  sample    3           3.703 ±         2.098  MB/sec
[info] WarmScalacBenchmark.compile:·gc.churn.PS_Survivor_Space.norm  /tmp/sbt_b7aa119c  sample    3   252915925.333 ±  86273902.721    B/op
[info] WarmScalacBenchmark.compile:·gc.count                         /tmp/sbt_b7aa119c  sample    3         136.000                  counts
[info] WarmScalacBenchmark.compile:·gc.time                          /tmp/sbt_b7aa119c  sample    3       12998.000                      ms
[info] ColdScalacBenchmark.compile                                   /tmp/sbt_b7aa119c      ss   10       55051.741 ±      1504.925   ms/op
[info] ColdScalacBenchmark.compile:·gc.alloc.rate                    /tmp/sbt_b7aa119c      ss   10         117.655 ±         3.163  MB/sec
[info] ColdScalacBenchmark.compile:·gc.alloc.rate.norm               /tmp/sbt_b7aa119c      ss   10  6916963551.200 ±  89432423.495    B/op
[info] ColdScalacBenchmark.compile:·gc.churn.PS_Eden_Space           /tmp/sbt_b7aa119c      ss   10         109.503 ±         6.447  MB/sec
[info] ColdScalacBenchmark.compile:·gc.churn.PS_Eden_Space.norm      /tmp/sbt_b7aa119c      ss   10  6437335380.000 ± 326084755.897    B/op
[info] ColdScalacBenchmark.compile:·gc.churn.PS_Survivor_Space       /tmp/sbt_b7aa119c      ss   10           2.429 ±         0.343  MB/sec
[info] ColdScalacBenchmark.compile:·gc.churn.PS_Survivor_Space.norm  /tmp/sbt_b7aa119c      ss   10   142817865.600 ±  20757559.752    B/op
[info] ColdScalacBenchmark.compile:·gc.count                         /tmp/sbt_b7aa119c      ss   10         248.000                  counts
[info] ColdScalacBenchmark.compile:·gc.time                          /tmp/sbt_b7aa119c      ss   10       35908.000                      ms
[success] Total time: 1892 s, completed Jul 10, 2017 5:06:16 PM

One of the reasons why the change doesn't have a performance impact is because ExtractAPI clears up the most populated caches structureCache and pending.

However, I will still like to see this change in because:

  1. It's a convention to use perRunCaches within the compiler. These data structures should behave in the same way.
  2. If the rest of the caches grow, perRunCaches can help us avoid a performance penalty in the future.

Hence, I still LGTM this change!

@jvican jvican requested a review from Duhemm Jul 10, 2017

@Duhemm Duhemm merged commit 1e68936 into sbt:1.0 Jul 10, 2017

1 check passed

continuous-integration/drone/pr the build was successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment