Преглед изворни кода

HPCC-15656: Add the ability to log Response Time
- add ResponseTime in ms to logging

Signed-off-by: Jiafu Gao <Jiafu.Gao@lexisnexis.com>

Jiafu Gao пре 8 година
родитељ
комит
9e6fa8a11c
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      esp/logging/loggingmanager/loggingmanager.cpp

+ 1 - 0
esp/logging/loggingmanager/loggingmanager.cpp

@@ -123,6 +123,7 @@ bool CLoggingManager::updateLog(const char* option, IEspContext& espContext, IPr
         const char* userId = espContext.queryUserId();
         if (userId && *userId)
             espContextTree->addProp("UserName", userId);
+        espContextTree->addPropInt64("ResponseTime", (__int64)(msTick()-espContext.queryCreationTime())/1000);
 
         Owned<IEspUpdateLogRequestWrap> req =  new CUpdateLogRequestWrap(NULL, option, espContextTree.getClear(), LINK(userContext), LINK(userRequest),
             backEndResp, userResp, logDatasets);