ZeroPad
com.netflix.atlas.core.util.ZeroPad
class ZeroPad
Check use of String.format
against just padding with our custom Strings.zeroPad
.
> jmh:run -prof gc -wi 10 -i 10 -f1 -t1 .*ZeroPad.*
Throughput
Benchmark Mode Cnt Score Error Units
hashArrayPad thrpt 10 4721308.898 ± 151781.009 ops/s
hashBigIntPad thrpt 10 867143.537 ± 19475.920 ops/s
hashFormat thrpt 10 519479.340 ± 36074.274 ops/s
oneArrayPad thrpt 10 7666430.180 ± 727283.845 ops/s
oneBigIntPad thrpt 10 3212304.227 ± 235176.496 ops/s
oneFormat thrpt 10 964090.075 ± 39087.882 ops/s
Allocations
hashArrayPad gc.alloc.rate.norm 10 240.000 ± 0.001 B/op
hashBigIntPad gc.alloc.rate.norm 10 1824.000 ± 0.001 B/op
hashFormat gc.alloc.rate.norm 10 3344.000 ± 0.001 B/op
oneArrayPad gc.alloc.rate.norm 10 240.000 ± 0.001 B/op
oneBigIntPad gc.alloc.rate.norm 10 664.000 ± 0.001 B/op
oneFormat gc.alloc.rate.norm 10 2176.000 ± 0.001 B/op
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
In this article