Skip to content

Instantly share code, notes, and snippets.

@sijie
Last active April 3, 2018 02:22
Show Gist options
  • Save sijie/93e944b6beffc0aff59f0a0c751ee0b1 to your computer and use it in GitHub Desktop.
Save sijie/93e944b6beffc0aff59f0a0c751ee0b1 to your computer and use it in GitHub Desktop.
protobuf encoding/decoding

Highlights

Throughput

Alloc (bytes/op)

Details

Size: 1000

Benchmark                                                              (endecoderType)  (size)   Mode  Cnt     Score     Error   Units
ProtocolBenchmark.testDecodeResponse                                                V3    1000  thrpt   25  1284.188 ±  62.175  ops/ms
ProtocolBenchmark.testDecodeResponse:·gc.alloc.rate                                 V3    1000  thrpt   25  4595.044 ± 222.292  MB/sec
ProtocolBenchmark.testDecodeResponse:·gc.alloc.rate.norm                            V3    1000  thrpt   25  5632.000 ±   0.001    B/op
ProtocolBenchmark.testDecodeResponse:·gc.churn.G1_Eden_Space                        V3    1000  thrpt   25  4608.814 ± 259.672  MB/sec
ProtocolBenchmark.testDecodeResponse:·gc.churn.G1_Eden_Space.norm                   V3    1000  thrpt   25  5648.950 ± 166.044    B/op
ProtocolBenchmark.testDecodeResponse:·gc.churn.G1_Old_Gen                           V3    1000  thrpt   25     0.032 ±   0.029  MB/sec
ProtocolBenchmark.testDecodeResponse:·gc.churn.G1_Old_Gen.norm                      V3    1000  thrpt   25     0.041 ±   0.040    B/op
ProtocolBenchmark.testDecodeResponse:·gc.count                                      V3    1000  thrpt   25   283.000            counts
ProtocolBenchmark.testDecodeResponse:·gc.time                                       V3    1000  thrpt   25  1518.000                ms
ProtocolBenchmark.testDecodeResponse:·stack                                         V3    1000  thrpt            NaN               ---
ProtocolBenchmark.testDecodeResponse                                         V3_UNSAFE    1000  thrpt   25  1293.830 ±  38.612  ops/ms
ProtocolBenchmark.testDecodeResponse:·gc.alloc.rate                          V3_UNSAFE    1000  thrpt   25  4627.155 ± 138.438  MB/sec
ProtocolBenchmark.testDecodeResponse:·gc.alloc.rate.norm                     V3_UNSAFE    1000  thrpt   25  5632.000 ±   0.001    B/op
ProtocolBenchmark.testDecodeResponse:·gc.churn.G1_Eden_Space                 V3_UNSAFE    1000  thrpt   25  4608.809 ± 169.839  MB/sec
ProtocolBenchmark.testDecodeResponse:·gc.churn.G1_Eden_Space.norm            V3_UNSAFE    1000  thrpt   25  5612.942 ± 187.098    B/op
ProtocolBenchmark.testDecodeResponse:·gc.churn.G1_Old_Gen                    V3_UNSAFE    1000  thrpt   25     0.020 ±   0.016  MB/sec
ProtocolBenchmark.testDecodeResponse:·gc.churn.G1_Old_Gen.norm               V3_UNSAFE    1000  thrpt   25     0.024 ±   0.019    B/op
ProtocolBenchmark.testDecodeResponse:·gc.count                               V3_UNSAFE    1000  thrpt   25   283.000            counts
ProtocolBenchmark.testDecodeResponse:·gc.time                                V3_UNSAFE    1000  thrpt   25  1464.000                ms
ProtocolBenchmark.testDecodeResponse:·stack                                  V3_UNSAFE    1000  thrpt            NaN               ---
ProtocolBenchmark.testDecodeResponse                                            V3_NEW    1000  thrpt   25  3945.240 ±  67.769  ops/ms
ProtocolBenchmark.testDecodeResponse:·gc.alloc.rate                             V3_NEW    1000  thrpt   25  1022.025 ±  17.596  MB/sec
ProtocolBenchmark.testDecodeResponse:·gc.alloc.rate.norm                        V3_NEW    1000  thrpt   25   408.000 ±   0.001    B/op
ProtocolBenchmark.testDecodeResponse:·gc.churn.G1_Eden_Space                    V3_NEW    1000  thrpt   25  1007.947 ± 155.304  MB/sec
ProtocolBenchmark.testDecodeResponse:·gc.churn.G1_Eden_Space.norm               V3_NEW    1000  thrpt   25   402.717 ±  62.954    B/op
ProtocolBenchmark.testDecodeResponse:·gc.churn.G1_Old_Gen                       V3_NEW    1000  thrpt   25     0.001 ±   0.003  MB/sec
ProtocolBenchmark.testDecodeResponse:·gc.churn.G1_Old_Gen.norm                  V3_NEW    1000  thrpt   25    ≈ 10⁻³              B/op
ProtocolBenchmark.testDecodeResponse:·gc.churn.G1_Survivor_Space                V3_NEW    1000  thrpt   25     0.266 ±   0.406  MB/sec
ProtocolBenchmark.testDecodeResponse:·gc.churn.G1_Survivor_Space.norm           V3_NEW    1000  thrpt   25     0.106 ±   0.161    B/op
ProtocolBenchmark.testDecodeResponse:·gc.count                                  V3_NEW    1000  thrpt   25    62.000            counts
ProtocolBenchmark.testDecodeResponse:·gc.time                                   V3_NEW    1000  thrpt   25   400.000                ms
ProtocolBenchmark.testDecodeResponse:·stack                                     V3_NEW    1000  thrpt            NaN               ---
ProtocolBenchmark.testEncodeResponse                                                V3    1000  thrpt   25  2476.385 ±  87.692  ops/ms
ProtocolBenchmark.testEncodeResponse:·gc.alloc.rate                                 V3    1000  thrpt   25  2166.933 ±  75.815  MB/sec
ProtocolBenchmark.testEncodeResponse:·gc.alloc.rate.norm                            V3    1000  thrpt   25  1377.629 ±   0.010    B/op
ProtocolBenchmark.testEncodeResponse:·gc.churn.G1_Eden_Space                        V3    1000  thrpt   25  2165.691 ± 145.130  MB/sec
ProtocolBenchmark.testEncodeResponse:·gc.churn.G1_Eden_Space.norm                   V3    1000  thrpt   25  1377.390 ±  82.440    B/op
ProtocolBenchmark.testEncodeResponse:·gc.churn.G1_Old_Gen                           V3    1000  thrpt   25     0.011 ±   0.014  MB/sec
ProtocolBenchmark.testEncodeResponse:·gc.churn.G1_Old_Gen.norm                      V3    1000  thrpt   25     0.007 ±   0.009    B/op
ProtocolBenchmark.testEncodeResponse:·gc.count                                      V3    1000  thrpt   25   133.000            counts
ProtocolBenchmark.testEncodeResponse:·gc.time                                       V3    1000  thrpt   25   710.000                ms
ProtocolBenchmark.testEncodeResponse:·stack                                         V3    1000  thrpt            NaN               ---
ProtocolBenchmark.testEncodeResponse                                         V3_UNSAFE    1000  thrpt   25  3065.456 ±  85.954  ops/ms
ProtocolBenchmark.testEncodeResponse:·gc.alloc.rate                          V3_UNSAFE    1000  thrpt   25   752.213 ±  64.690  MB/sec
ProtocolBenchmark.testEncodeResponse:·gc.alloc.rate.norm                     V3_UNSAFE    1000  thrpt   25   387.227 ±  39.144    B/op
ProtocolBenchmark.testEncodeResponse:·gc.churn.G1_Eden_Space                 V3_UNSAFE    1000  thrpt   25   747.096 ± 143.852  MB/sec
ProtocolBenchmark.testEncodeResponse:·gc.churn.G1_Eden_Space.norm            V3_UNSAFE    1000  thrpt   25   385.130 ±  77.839    B/op
ProtocolBenchmark.testEncodeResponse:·gc.churn.G1_Old_Gen                    V3_UNSAFE    1000  thrpt   25     0.009 ±   0.010  MB/sec
ProtocolBenchmark.testEncodeResponse:·gc.churn.G1_Old_Gen.norm               V3_UNSAFE    1000  thrpt   25     0.005 ±   0.005    B/op
ProtocolBenchmark.testEncodeResponse:·gc.churn.G1_Survivor_Space             V3_UNSAFE    1000  thrpt   25     0.159 ±   0.330  MB/sec
ProtocolBenchmark.testEncodeResponse:·gc.churn.G1_Survivor_Space.norm        V3_UNSAFE    1000  thrpt   25     0.082 ±   0.170    B/op
ProtocolBenchmark.testEncodeResponse:·gc.count                               V3_UNSAFE    1000  thrpt   25    46.000            counts
ProtocolBenchmark.testEncodeResponse:·gc.time                                V3_UNSAFE    1000  thrpt   25   322.000                ms
ProtocolBenchmark.testEncodeResponse:·stack                                  V3_UNSAFE    1000  thrpt            NaN               ---
ProtocolBenchmark.testEncodeResponse                                            V3_NEW    1000  thrpt   25  1396.892 ±  52.325  ops/ms
ProtocolBenchmark.testEncodeResponse:·gc.alloc.rate                             V3_NEW    1000  thrpt   25   444.297 ±  28.506  MB/sec
ProtocolBenchmark.testEncodeResponse:·gc.alloc.rate.norm                        V3_NEW    1000  thrpt   25   502.451 ±  41.588    B/op
ProtocolBenchmark.testEncodeResponse:·gc.churn.G1_Eden_Space                    V3_NEW    1000  thrpt   25   422.140 ±  60.687  MB/sec
ProtocolBenchmark.testEncodeResponse:·gc.churn.G1_Eden_Space.norm               V3_NEW    1000  thrpt   25   477.355 ±  73.146    B/op
ProtocolBenchmark.testEncodeResponse:·gc.count                                  V3_NEW    1000  thrpt   25    26.000            counts
ProtocolBenchmark.testEncodeResponse:·gc.time                                   V3_NEW    1000  thrpt   25   203.000                ms
ProtocolBenchmark.testEncodeResponse:·stack                                     V3_NEW    1000  thrpt            NaN               ---

Size: 100000

Benchmark                                                              (endecoderType)  (size)   Mode  Cnt       Score      Error   Units
ProtocolBenchmark.testDecodeResponse                                                V3  100000  thrpt   25      72.261 ±    4.214  ops/ms
ProtocolBenchmark.testDecodeResponse:·gc.alloc.rate                                 V3  100000  thrpt   25    4802.107 ±  280.016  MB/sec
ProtocolBenchmark.testDecodeResponse:·gc.alloc.rate.norm                            V3  100000  thrpt   25  104632.006 ±    0.001    B/op
ProtocolBenchmark.testDecodeResponse:·gc.churn.G1_Eden_Space                        V3  100000  thrpt   25    4836.850 ±  282.672  MB/sec
ProtocolBenchmark.testDecodeResponse:·gc.churn.G1_Eden_Space.norm                   V3  100000  thrpt   25  105466.930 ± 2928.617    B/op
ProtocolBenchmark.testDecodeResponse:·gc.churn.G1_Old_Gen                           V3  100000  thrpt   25       0.046 ±    0.038  MB/sec
ProtocolBenchmark.testDecodeResponse:·gc.churn.G1_Old_Gen.norm                      V3  100000  thrpt   25       1.065 ±    0.949    B/op
ProtocolBenchmark.testDecodeResponse:·gc.count                                      V3  100000  thrpt   25     297.000             counts
ProtocolBenchmark.testDecodeResponse:·gc.time                                       V3  100000  thrpt   25    1817.000                 ms
ProtocolBenchmark.testDecodeResponse:·stack                                         V3  100000  thrpt              NaN                ---
ProtocolBenchmark.testDecodeResponse                                         V3_UNSAFE  100000  thrpt   25      73.870 ±    3.149  ops/ms
ProtocolBenchmark.testDecodeResponse:·gc.alloc.rate                          V3_UNSAFE  100000  thrpt   25    4907.644 ±  209.115  MB/sec
ProtocolBenchmark.testDecodeResponse:·gc.alloc.rate.norm                     V3_UNSAFE  100000  thrpt   25  104632.006 ±    0.001    B/op
ProtocolBenchmark.testDecodeResponse:·gc.churn.G1_Eden_Space                 V3_UNSAFE  100000  thrpt   25    4914.376 ±  247.347  MB/sec
ProtocolBenchmark.testDecodeResponse:·gc.churn.G1_Eden_Space.norm            V3_UNSAFE  100000  thrpt   25  104751.037 ± 2293.346    B/op
ProtocolBenchmark.testDecodeResponse:·gc.churn.G1_Old_Gen                    V3_UNSAFE  100000  thrpt   25       0.035 ±    0.023  MB/sec
ProtocolBenchmark.testDecodeResponse:·gc.churn.G1_Old_Gen.norm               V3_UNSAFE  100000  thrpt   25       0.756 ±    0.501    B/op
ProtocolBenchmark.testDecodeResponse:·gc.count                               V3_UNSAFE  100000  thrpt   25     302.000             counts
ProtocolBenchmark.testDecodeResponse:·gc.time                                V3_UNSAFE  100000  thrpt   25    1659.000                 ms
ProtocolBenchmark.testDecodeResponse:·stack                                  V3_UNSAFE  100000  thrpt              NaN                ---
ProtocolBenchmark.testDecodeResponse                                            V3_NEW  100000  thrpt   25    3943.436 ±   71.150  ops/ms
ProtocolBenchmark.testDecodeResponse:·gc.alloc.rate                             V3_NEW  100000  thrpt   25    1022.096 ±   18.612  MB/sec
ProtocolBenchmark.testDecodeResponse:·gc.alloc.rate.norm                        V3_NEW  100000  thrpt   25     408.000 ±    0.001    B/op
ProtocolBenchmark.testDecodeResponse:·gc.churn.G1_Eden_Space                    V3_NEW  100000  thrpt   25    1024.042 ±  154.991  MB/sec
ProtocolBenchmark.testDecodeResponse:·gc.churn.G1_Eden_Space.norm               V3_NEW  100000  thrpt   25     408.842 ±   61.720    B/op
ProtocolBenchmark.testDecodeResponse:·gc.churn.G1_Old_Gen                       V3_NEW  100000  thrpt   25       0.004 ±    0.008  MB/sec
ProtocolBenchmark.testDecodeResponse:·gc.churn.G1_Old_Gen.norm                  V3_NEW  100000  thrpt   25       0.002 ±    0.003    B/op
ProtocolBenchmark.testDecodeResponse:·gc.churn.G1_Survivor_Space                V3_NEW  100000  thrpt   25       0.266 ±    0.406  MB/sec
ProtocolBenchmark.testDecodeResponse:·gc.churn.G1_Survivor_Space.norm           V3_NEW  100000  thrpt   25       0.107 ±    0.163    B/op
ProtocolBenchmark.testDecodeResponse:·gc.count                                  V3_NEW  100000  thrpt   25      63.000             counts
ProtocolBenchmark.testDecodeResponse:·gc.time                                   V3_NEW  100000  thrpt   25     415.000                 ms
ProtocolBenchmark.testDecodeResponse:·stack                                     V3_NEW  100000  thrpt              NaN                ---
ProtocolBenchmark.testEncodeResponse                                                V3  100000  thrpt   25      56.727 ±    2.651  ops/ms
ProtocolBenchmark.testEncodeResponse:·gc.alloc.rate                                 V3  100000  thrpt   25    3616.028 ±  169.744  MB/sec
ProtocolBenchmark.testEncodeResponse:·gc.alloc.rate.norm                            V3  100000  thrpt   25  100377.642 ±    0.049    B/op
ProtocolBenchmark.testEncodeResponse:·gc.churn.G1_Eden_Space                        V3  100000  thrpt   25    3795.022 ±  209.988  MB/sec
ProtocolBenchmark.testEncodeResponse:·gc.churn.G1_Eden_Space.norm                   V3  100000  thrpt   25  105428.131 ± 4422.618    B/op
ProtocolBenchmark.testEncodeResponse:·gc.churn.G1_Old_Gen                           V3  100000  thrpt   25       0.032 ±    0.025  MB/sec
ProtocolBenchmark.testEncodeResponse:·gc.churn.G1_Old_Gen.norm                      V3  100000  thrpt   25       0.931 ±    0.759    B/op
ProtocolBenchmark.testEncodeResponse:·gc.count                                      V3  100000  thrpt   25     233.000             counts
ProtocolBenchmark.testEncodeResponse:·gc.time                                       V3  100000  thrpt   25    1411.000                 ms
ProtocolBenchmark.testEncodeResponse:·stack                                         V3  100000  thrpt              NaN                ---
ProtocolBenchmark.testEncodeResponse                                         V3_UNSAFE  100000  thrpt   25     201.949 ±    8.161  ops/ms
ProtocolBenchmark.testEncodeResponse:·gc.alloc.rate                          V3_UNSAFE  100000  thrpt   25      46.394 ±    1.874  MB/sec
ProtocolBenchmark.testEncodeResponse:·gc.alloc.rate.norm                     V3_UNSAFE  100000  thrpt   25     361.618 ±    0.025    B/op
ProtocolBenchmark.testEncodeResponse:·gc.churn.G1_Eden_Space                 V3_UNSAFE  100000  thrpt   25      26.184 ±   40.042  MB/sec
ProtocolBenchmark.testEncodeResponse:·gc.churn.G1_Eden_Space.norm            V3_UNSAFE  100000  thrpt   25     196.905 ±  301.570    B/op
ProtocolBenchmark.testEncodeResponse:·gc.churn.G1_Old_Gen                    V3_UNSAFE  100000  thrpt   25       0.018 ±    0.034  MB/sec
ProtocolBenchmark.testEncodeResponse:·gc.churn.G1_Old_Gen.norm               V3_UNSAFE  100000  thrpt   25       0.137 ±    0.259    B/op
ProtocolBenchmark.testEncodeResponse:·gc.count                               V3_UNSAFE  100000  thrpt   25       5.000             counts
ProtocolBenchmark.testEncodeResponse:·gc.time                                V3_UNSAFE  100000  thrpt   25      37.000                 ms
ProtocolBenchmark.testEncodeResponse:·stack                                  V3_UNSAFE  100000  thrpt              NaN                ---
ProtocolBenchmark.testEncodeResponse                                            V3_NEW  100000  thrpt   25    1416.098 ±   23.779  ops/ms
ProtocolBenchmark.testEncodeResponse:·gc.alloc.rate                             V3_NEW  100000  thrpt   25     434.701 ±    7.240  MB/sec
ProtocolBenchmark.testEncodeResponse:·gc.alloc.rate.norm                        V3_NEW  100000  thrpt   25     483.250 ±    0.020    B/op
ProtocolBenchmark.testEncodeResponse:·gc.churn.G1_Eden_Space                    V3_NEW  100000  thrpt   25     405.955 ±    0.475  MB/sec
ProtocolBenchmark.testEncodeResponse:·gc.churn.G1_Eden_Space.norm               V3_NEW  100000  thrpt   25     451.511 ±    7.699    B/op
ProtocolBenchmark.testEncodeResponse:·gc.count                                  V3_NEW  100000  thrpt   25      25.000             counts
ProtocolBenchmark.testEncodeResponse:·gc.time                                   V3_NEW  100000  thrpt   25     177.000                 ms
ProtocolBenchmark.testEncodeResponse:·stack                                     V3_NEW  100000  thrpt              NaN                ---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment