2 Copyright (C) 2000-2005 SKYRIX Software AG
4 This file is part of SOPE.
6 SOPE is free software; you can redistribute it and/or modify it under
7 the terms of the GNU Lesser General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
11 SOPE is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14 License for more details.
16 You should have received a copy of the GNU Lesser General Public
17 License along with SOPE; see the file COPYING. If not, write to the
18 Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
22 #ifndef __NGObjWeb_WOStatisticsStore_H__
23 #define __NGObjWeb_WOStatisticsStore_H__
25 #import <Foundation/NSObject.h>
26 #import <Foundation/NSLock.h>
27 #import <Foundation/NSDate.h>
29 @class NSString, NSDictionary, NSMutableDictionary;
30 @class WOResponse, WOContext;
32 @interface WOStatisticsStore : NSObject < NSLocking >
34 id<NSLocking,NSObject> lock;
37 NSMutableDictionary *pageStatistics;
38 unsigned totalResponseCount;
39 unsigned pageResponseCount;
40 unsigned totalResponseSize;
41 unsigned zippedResponsesCount;
42 unsigned totalZippedSize;
43 int smallestResponseSize;
44 unsigned largestResponseSize;
45 NSTimeInterval minimumDuration;
46 NSTimeInterval maximumDuration;
47 NSTimeInterval totalDuration;
52 - (NSDictionary *)statistics;
56 - (void)recordStatisticsForResponse:(WOResponse *)_response
57 inContext:(WOContext *)_context;
59 - (NSString *)descriptionForResponse:(WOResponse *)_response
60 inContext:(WOContext *)_context;
64 - (NSString *)formatDescription:(NSString *)_description
65 forResponse:(WOResponse *)_response
66 inContext:(WOContext *)_context;
75 #endif /* __NGObjWeb_WOStatisticsStore_H__ */