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:
rfm 2014-06-21 06:57:17 +00:00
parent 2245edfae4
commit d6174817bb
2 changed files with 12 additions and 0 deletions

View file

@ -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 />

View file

@ -336,6 +336,8 @@ main()
NSLog(@"Records - %@", [GSCache class]);
}
NSLog(@"Pool stats:\n%@", [sp statistics]);
[pool release];
return 0;
}