|
@@ -135,8 +135,14 @@ CalloutManager::callCallouts(int hook_index, CalloutHandle& callout_handle) {
|
|
// change and potentially affect the iteration through that vector.
|
|
// change and potentially affect the iteration through that vector.
|
|
CalloutVector callouts(hook_vector_[hook_index]);
|
|
CalloutVector callouts(hook_vector_[hook_index]);
|
|
|
|
|
|
|
|
+ // This object will be used to measure execution time of each callout
|
|
|
|
+ // and the total time spent in callouts for this hook point.
|
|
util::Stopwatch stopwatch;
|
|
util::Stopwatch stopwatch;
|
|
|
|
|
|
|
|
+ // Mark that the callouts begin for the hook.
|
|
|
|
+ LOG_DEBUG(hooks_logger, HOOKS_DBG_CALLS, HOOKS_CALLOUTS_BEGIN)
|
|
|
|
+ .arg(server_hooks_.getName(current_hook_));
|
|
|
|
+
|
|
// Call all the callouts.
|
|
// Call all the callouts.
|
|
for (CalloutVector::const_iterator i = callouts.begin();
|
|
for (CalloutVector::const_iterator i = callouts.begin();
|
|
i != callouts.end(); ++i) {
|
|
i != callouts.end(); ++i) {
|
|
@@ -175,6 +181,12 @@ CalloutManager::callCallouts(int hook_index, CalloutHandle& callout_handle) {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // Mark end of callout execution. Include the total execution
|
|
|
|
+ // time for callouts.
|
|
|
|
+ LOG_DEBUG(hooks_logger, HOOKS_DBG_CALLS, HOOKS_CALLOUTS_COMPLETE)
|
|
|
|
+ .arg(server_hooks_.getName(current_hook_))
|
|
|
|
+ .arg(stopwatch.logFormatTotalDuration());
|
|
|
|
+
|
|
// Reset the current hook and library indexs to an invalid value to
|
|
// Reset the current hook and library indexs to an invalid value to
|
|
// catch any programming errors.
|
|
// catch any programming errors.
|
|
current_hook_ = -1;
|
|
current_hook_ = -1;
|