[유치수] [NOBTS] classify Arcus and Memcached

git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@922 84d0f5b1-2673-498c-a247-62c4ff18d310
This commit is contained in:
Chisu Yu
2012-11-27 04:21:50 +00:00
parent 92fdb28e82
commit 586af87761
4 changed files with 10 additions and 10 deletions
@@ -40,7 +40,5 @@ public class AddOpInterceptor implements StaticBeforeInterceptor {
}
setServiceCode.invoke(op, serviceCode);
System.out.println("[HIPPO-ADD_OP_FUNC] INJECT SERVICE_CODE INTO OP=" + serviceCode);
}
}
@@ -60,13 +60,19 @@ public class BaseOperationTransitionStateInterceptor implements StaticBeforeInte
asyncTrace.recordEndPoint("ARCUS:" + address.getHostName() + ":" + address.getPort());
}
String serviceName = (String) getServiceCode.invoke(target);
String serviceCode = (String) getServiceCode.invoke(target);
if (serviceName == null) {
serviceName = "UNKNOWN";
if (serviceCode == null) {
serviceCode = "UNKNOWN";
}
asyncTrace.recordRpcName(ServiceType.ARCUS, serviceName, baseOperation.getClass().getSimpleName());
ServiceType svcType = ServiceType.ARCUS;
if(serviceCode.equals(ServiceType.MEMCACHED.getDesc())) {
svcType = ServiceType.MEMCACHED;
}
asyncTrace.recordRpcName(svcType, serviceCode, baseOperation.getClass().getSimpleName());
String cmd = getCommand(baseOperation);
asyncTrace.recordAttibute("arcus.command", cmd);
@@ -24,8 +24,6 @@ public class CacheManagerConstructInterceptor implements StaticAfterInterceptor
logger.info("after " + StringUtils.toString(target) + " " + className + "." + methodName + parameterDescription + " args:" + Arrays.toString(args) + " result:" + result);
}
System.out.println("[HIPPO-CACHE_MAN_CTOR] SET SERVICE_CODE=" + args[1]);
setServiceCode.invoke(target, (String) args[1]);
}
}
@@ -32,8 +32,6 @@ public class SetCacheManagerInterceptor implements StaticBeforeInterceptor {
CacheManager cm = (CacheManager) args[0];
String serviceCode = getServiceCode.invoke(cm);
System.out.println("[HIPPO-SET_CACHE_MAN_FUNC] GET SERVICE_CODE FROM CM=" + serviceCode);
setServiceCode.invoke((MemcachedClient) target, serviceCode);
}
}