JMH中的分配率是什么意思

Tri*_*yen 5 java garbage-collection microbenchmark jmh

我正在尝试测量运行基准测试时消耗的内存。我在互联网上发现我可以使用GC分析器来测量它。我试过了,但我不明白答案以及看到消耗的内存量。谁能解释一下结果?谢谢。

MyBenchmark.testMethod_width_2_attribute_text                                     ss   60        32.345 ±       1.759   ms/op
MyBenchmark.testMethod_width_2_attribute_text:·gc.alloc.rate                      ss   60        26.904 ±       0.217  MB/sec
MyBenchmark.testMethod_width_2_attribute_text:·gc.alloc.rate.norm                 ss   60  14999630.400 ±      12.578    B/op
MyBenchmark.testMethod_width_2_attribute_text:·gc.churn.PS_Eden_Space             ss   60        28.282 ±      15.342  MB/sec
MyBenchmark.testMethod_width_2_attribute_text:·gc.churn.PS_Eden_Space.norm        ss   60  15903402.667 ± 8631257.013    B/op
MyBenchmark.testMethod_width_2_attribute_text:·gc.churn.PS_Survivor_Space         ss   60         0.654 ±       0.754  MB/sec
MyBenchmark.testMethod_width_2_attribute_text:·gc.churn.PS_Survivor_Space.norm    ss   60    368914.667 ±  425374.152    B/op
MyBenchmark.testMethod_width_2_attribute_text:·gc.count                           ss   60        26.000                counts
MyBenchmark.testMethod_width_2_attribute_text:·gc.time                            ss   60       105.000                    ms
Run Code Online (Sandbox Code Playgroud)

Eug*_*ene 3

jmh 在幕后使用,ThreadMXBean因此这看起来像一份报告,说明每个操作分配了多少字节以及MB/sec每个 GC 空间中有多少字节(例如Eden/Survivor

.norm代表标准化。