コード例 #1
0
 /** INTERNAL: Monitoring is done on the endOperation only. */
 public Object profileExecutionOfQuery(DatabaseQuery query, Record row, AbstractSession session) {
   if (this.profileWeight < SessionProfiler.HEAVY) {
     return session.internalExecuteQuery(query, (AbstractRecord) row);
   }
   startOperationProfile(TIMER + query.getMonitorName());
   startOperationProfile(TIMER + query.getClass().getSimpleName());
   occurred(COUNTER + query.getClass().getSimpleName());
   occurred(COUNTER + query.getMonitorName());
   try {
     return session.internalExecuteQuery(query, (AbstractRecord) row);
   } finally {
     endOperationProfile(TIMER + query.getMonitorName());
     endOperationProfile(TIMER + query.getClass().getSimpleName());
     checkDumpTime();
   }
 }
コード例 #2
0
 public void occurred(String operationName, DatabaseQuery query) {
   if (this.profileWeight < SessionProfiler.NORMAL) {
     return;
   }
   occurred(operationName);
   occurred(
       COUNTER
           + query.getMonitorName()
           + ":"
           + operationName.substring(COUNTER.length(), operationName.length()));
 }
コード例 #3
0
 /** INTERNAL: Start the operation timing. */
 public void startOperationProfile(String operationName, DatabaseQuery query, int weight) {
   if (this.profileWeight < weight) {
     return;
   }
   startOperationProfile(operationName);
   startOperationProfile(
       TIMER
           + query.getMonitorName()
           + ":"
           + operationName.substring(TIMER.length(), operationName.length()));
 }