TraceContext#newTimer: Separate message from arguments
We plan to add a new extension point that allows to write recorded times into a dedicated performance log. To be able to aggregate data in the performance log by message, the message string should be constant (without parameters which differ for each invocation). Meta data that is specific to one invocation should be recorded in a separate field in the performance log. Signed-off-by: Edwin Kempin <ekempin@google.com> Change-Id: I6417d8ddc4755cc7bfb60f3e57f050c262c28f17
This commit is contained in:
@@ -237,7 +237,7 @@ public class H2CacheImpl<K, V> extends AbstractLoadingCache<K, V> implements Per
|
||||
|
||||
@Override
|
||||
public ValueHolder<V> load(K key) throws Exception {
|
||||
try (TraceTimer timer = TraceContext.newTimer("Loading value for %s from cache", key)) {
|
||||
try (TraceTimer timer = TraceContext.newTimer("Loading value from cache", "key", key)) {
|
||||
if (store.mightContain(key)) {
|
||||
ValueHolder<V> h = store.getIfPresent(key);
|
||||
if (h != null) {
|
||||
|
||||
Reference in New Issue
Block a user