Monotone-Parent: 2b073c86000b676cc91d3818d5d6c6db3446f2e2

Monotone-Revision: 6eba62f428795a0fa79c3f6fa089c1f0bdb79224

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-05-18T17:57:58
Monotone-Branch: ca.inverse.sogo
Wolfgang Sourdeau 2010-05-18 17:57:58 +00:00
parent 4c399caaa7
commit d5a03c0d25
2 changed files with 14 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2010-05-18 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* Main/SOGo.m (-dispatchRequest:): send a "SOGoRequestDuration"
header back to the client with the time delta as value when
SOGoDebugRequests is set to YES.
2010-05-17 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/WebServerResources/UIxAttendeesEditor.js

View File

@ -388,7 +388,8 @@ static BOOL debugLeaks;
static NSArray *runLoopModes = nil;
static BOOL debugOn = NO;
WOResponse *resp;
NSDate *startDate, *endDate;
NSDate *startDate;
NSTimeInterval timeDelta;
if (debugRequests)
{
@ -416,9 +417,12 @@ static BOOL debugLeaks;
if (debugRequests)
{
endDate = [NSDate date];
[self logWithFormat: @"request took %f seconds to execute",
[endDate timeIntervalSinceDate: startDate]];
timeDelta = [[NSDate date] timeIntervalSinceDate: startDate];
[self logWithFormat: [NSString stringWithFormat:
@"request took %f seconds to execute",
timeDelta]];
[resp setHeader: [NSString stringWithFormat: @"%f", timeDelta]
forKey: @"SOGoRequestDuration"];
}
if (![self isTerminating])