mirror of
https://github.com/gnustep/libs-sqlclient.git
synced 2025-02-21 02:41:07 +00:00
Add pool stats
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/sqlclient/trunk@37961 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2245edfae4
commit
d6174817bb
2 changed files with 12 additions and 0 deletions
10
SQLClient.h
10
SQLClient.h
|
@ -1414,6 +1414,12 @@ SQLCLIENT_PRIVATE
|
|||
int min; /** Minimum connection count */
|
||||
NSTimeInterval _duration; /** Duration logging threshold */
|
||||
unsigned int _debugging; /** The current debugging level */
|
||||
uint64_t _immediate; /** Immediate client provisions */
|
||||
uint64_t _delayed; /** Count of delayed provisions */
|
||||
uint64_t _failed; /** Count of timed out provisions */
|
||||
NSTimeInterval _longest; /** Count of longest delay */
|
||||
NSTimeInterval _delayWaits; /** Time waiting for provisions */
|
||||
NSTimeInterval _failWaits; /** Time waiting for timewouts */
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1464,6 +1470,10 @@ SQLCLIENT_PRIVATE
|
|||
*/
|
||||
- (void) setDurationLogging: (NSTimeInterval)threshold;
|
||||
|
||||
/** Returns a string describing the usage of the pool.
|
||||
*/
|
||||
- (NSString*) statistics;
|
||||
|
||||
/** Puts the client back in the pool. This happens automatically
|
||||
* when a client from a pool would normally be deallocated so you don't
|
||||
* generally need to do it.<br />
|
||||
|
|
|
@ -336,6 +336,8 @@ main()
|
|||
NSLog(@"Records - %@", [GSCache class]);
|
||||
}
|
||||
|
||||
NSLog(@"Pool stats:\n%@", [sp statistics]);
|
||||
|
||||
[pool release];
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue