|
@@ -94,7 +94,7 @@ public class RecommendService {
|
|
|
@Autowired
|
|
|
private ABTestRemoteService abTestRemoteService;
|
|
|
|
|
|
- private ThreadLocal<Map<String, Long>> timerLogMapTL = ThreadLocal.withInitial(HashMap::new);
|
|
|
+ private ThreadLocal<Map<String, Object>> timerLogMapTL = ThreadLocal.withInitial(HashMap::new);
|
|
|
|
|
|
@PostConstruct
|
|
|
public void init() {
|
|
@@ -111,11 +111,13 @@ public class RecommendService {
|
|
|
public RecommendResponse recommend(RecommendRequest request, int recommendType) {
|
|
|
try {
|
|
|
if (request == null) {
|
|
|
+ timerLogMapTL.get().put("traceId", TraceUtils.currentTraceId());
|
|
|
return RecommendResponse.newBuilder()
|
|
|
.setResult(Result.newBuilder().setCode(1).setMessage("success"))
|
|
|
.build();
|
|
|
}
|
|
|
if (request.getVersionAuditStatus() == 1) {
|
|
|
+ timerLogMapTL.get().put("special", true);
|
|
|
return specialMidRecommend(request);
|
|
|
}
|
|
|
Stopwatch stopwatch = Stopwatch.createStarted();
|
|
@@ -124,7 +126,6 @@ public class RecommendService {
|
|
|
return specialMidRecommend(request);
|
|
|
}
|
|
|
stopwatch.reset().start();
|
|
|
-
|
|
|
RecommendParam param = genRecommendParam(request, recommendType);
|
|
|
long genRecommendParamTime = stopwatch.stop().elapsed(TimeUnit.MILLISECONDS);
|
|
|
timerLogMapTL.get().put("genRecommendParamTime", genRecommendParamTime);
|