|
@@ -151,7 +151,8 @@ public class BaseRecaller<Video> {
|
|
|
* @return
|
|
|
*/
|
|
|
public List<RankItem> recalling(final RecommendRequest requestData, final User user, int requestIndex, List<Candidate> recallCandidates) {
|
|
|
-
|
|
|
+ Stopwatch stopwatch = Stopwatch.createStarted();
|
|
|
+ stopwatch.start();
|
|
|
// load from redis
|
|
|
List<Callable<Map<Candidate, Queue<Video>>>> fetchQueueCalls = Lists.newArrayList();
|
|
|
fetchQueueCalls.add(() -> {
|
|
@@ -190,11 +191,10 @@ public class BaseRecaller<Video> {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- LOGGER.info("traceId: [{}], recall candidateQueueMap: [{}]", requestData.getRequestId(),
|
|
|
- JSONObject.toJSONString(candidateQueueMap));
|
|
|
+ LOGGER.info("traceId: [{}], cost = {}, recall candidateQueueMap: [{}]", requestData.getRequestId(),
|
|
|
+ stopwatch.elapsed().toMillis(), JSONObject.toJSONString(candidateQueueMap));
|
|
|
|
|
|
- Stopwatch stopwatch = Stopwatch.createStarted();
|
|
|
- stopwatch.start();
|
|
|
+ stopwatch.reset().start();
|
|
|
List<RankItem> result = convertToRankItem(candidateQueueMap, requestData, user);
|
|
|
|
|
|
LOGGER.info("traceId: [{}], cost = {}, convertToRankItem result: [{}]", requestData.getRequestId(),
|