From cf3152e2ce604b6f6087a095ddfab8b54ce4b9b1 Mon Sep 17 00:00:00 2001 From: ray Date: Fri, 24 Jun 2005 20:41:45 +0000 Subject: [PATCH] Do one compare in the common case, united nearly identical log lines. git-svn-id: https://samskivert.googlecode.com/svn/trunk@1665 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../src/java/com/samskivert/util/Invoker.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/projects/samskivert/src/java/com/samskivert/util/Invoker.java b/projects/samskivert/src/java/com/samskivert/util/Invoker.java index 21283a19..f86d29f2 100644 --- a/projects/samskivert/src/java/com/samskivert/util/Invoker.java +++ b/projects/samskivert/src/java/com/samskivert/util/Invoker.java @@ -183,12 +183,10 @@ public class Invoker extends LoopingThread recordMetrics(key, duration); // report long runners - if (duration > 5000L) { - Log.warning("Really long invoker unit [unit=" + unit + - " (" + key + "), time=" + duration + "ms]."); - } else if (duration > 500L) { - Log.info("Long invoker unit [unit=" + unit + - " (" + key + "), time=" + duration + "ms]."); + if (duration > 500L) { + Log.warning(((duration >= 5000L) ? "Really long" : "Long") + + " invoker unit [unit=" + unit + + " (" + key + "), time=" + duration + "ms]."); } } }