com.netflix.atlas.core.model
Members list
Type members
Classlikes
Check performance of TaggedItem.computeId. It is in the hot path when processing new metrics that come in via publish.
Check performance of TaggedItem.computeId. It is in the hot path when processing new metrics that come in via publish.
> jmh:run -prof gc -prof stack -wi 5 -i 5 -f1 -t1 .*ComputeId.*
...
Benchmark Mode Cnt Score Error Units
computeIdNaive thrpt 5 326439.391 ± 30418.108 ops/s
computeIdSmallTagMap thrpt 5 512260.825 ± 36192.269 ops/s
computeIdSortedTagMap thrpt 5 578262.359 ± 70766.713 ops/s
computeIdTagMap thrpt 5 519393.255 ± 16961.856 ops/s
Benchmark Mode Cnt Score Error Units
computeIdNaive alloc 5 8408.000 ± 0.001 B/op
computeIdSmallTagMap alloc 5 64.000 ± 0.001 B/op
computeIdSortedTagMap alloc 5 64.000 ± 0.001 B/op
computeIdTagMap alloc 5 80.000 ± 0.001 B/op
Note, the naive method is mostly problematic in terms of allocated data, not throughput. For this benchmark it allocates over 25GB for the top 5 objects compared to 5GB to 6GB when using computeId.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
> jmh:run -prof gc -prof stack -wi 5 -i 10 -f1 -t1 .*ItemIdToString.*
...
Benchmark Mode Cnt Score Error Units
runToString thrpt 10 6502790.539 ± 84203.781 ops/s
runToString:·gc.alloc.rate thrpt 10 1275.402 ± 16.731 MB/sec
runToString:·gc.alloc.rate.norm thrpt 10 216.000 ± 0.001 B/op
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Check performance of special case in KeyValueQuery to use SmallHashMap.getOrNull when possible instead of Map.get. This avoids an allocation for the Option and a little bit of overhead for the lambda invocation. For tight loops such as checking the query for a high volume streaming path it provides a noticeable benefit.
Check performance of special case in KeyValueQuery to use SmallHashMap.getOrNull when possible instead of Map.get. This avoids an allocation for the Option and a little bit of overhead for the lambda invocation. For tight loops such as checking the query for a high volume streaming path it provides a noticeable benefit.
> jmh:run -prof gc -wi 10 -i 10 -f1 -t1 .*KeyValueQuery.*
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any