Authored by hugufei

优化

... ... @@ -13,7 +13,6 @@ import org.springframework.web.servlet.ModelAndView;
import com.yoho.core.common.monitor.ThreadProfile;
import com.yoho.core.common.utils.HttpRequestUtils;
import com.yoho.search.base.monitor.PerformanceMonitor;
import com.yoho.search.common.utils.HttpServletRequestUtils;
/**
* 耗时拦截器
... ... @@ -67,9 +66,9 @@ public class ControllerCostInterceptor implements HandlerInterceptor {
if (cost <= 500) {
return;
}
// 5、打印响应超过500ms的请求与参数
CONTROLLER_COST.info("run more than 500ms ,cost [{}] ms, RequestURL: {}", cost, HttpServletRequestUtils.getRequestUrl(request));
// // 5、打印响应超过500ms的请求与参数
// CONTROLLER_COST.info("run more than 500ms ,cost [{}] ms, RequestURL: {}", cost, HttpServletRequestUtils.getRequestUrl(request));
} catch (Exception e) {
// TODO: handle exception
... ...
... ... @@ -9,6 +9,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.yoho.search.base.utils.DateUtil;
import com.yoho.search.common.cache.CacheType;
import com.yoho.search.common.cache.aop.SearchCacheAble;
import com.yoho.search.core.personalized.BigDataRedisService;
import com.yoho.search.core.personalized.PersonalizedSearch;
import com.yoho.search.service.base.SearchDynamicConfigService;
... ... @@ -27,6 +29,7 @@ public class PersonalVectorFeatureSearch {
@Autowired
private BigDataRedisService bigDataRedisService;
@SearchCacheAble(cacheInMinute = 10, cacheName = "PERSIONAL_VECTOR", cacheType = CacheType.EHCACHE)
public PersonalizedSearch getPersonalizedSearch(Map<String, String> paramMap) {
// 1、参数校验
String uid = paramMap.get("uid");
... ... @@ -45,7 +48,7 @@ public class PersonalVectorFeatureSearch {
}
return new PersonalizedSearch(uid, vectorFeatureVersion, userVectorFeature);
}
/**
* 根据UID和SKN列表获取特征相关性评分,该方法用于测试和问题定位
*
... ...