Author: rfm
Date: Sat Jun 21 08:57:17 2014
New Revision: 37961
URL: http://svn.gna.org/viewcvs/gnustep?rev=37961&view=rev
Log:
Add pool stats
Modified:
libs/sqlclient/trunk/SQLClient.h
libs/sqlclient/trunk/testPostgres.m
Modified: libs/sqlclient/trunk/SQLClient.h
URL:
http://svn.gna.org/viewcvs/gnustep/libs/sqlclient/trunk/SQLClient.h?rev=37961&r1=37960&r2=37961&view=diff
==============================================================================
--- libs/sqlclient/trunk/SQLClient.h (original)
+++ libs/sqlclient/trunk/SQLClient.h Sat Jun 21 08:57:17 2014
@@ -1414,6 +1414,12 @@
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 */
}
/**
@@ -1463,6 +1469,10 @@
/** Set the duration logging threshold for all clients in the pool.
*/
- (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
Modified: libs/sqlclient/trunk/testPostgres.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/sqlclient/trunk/testPostgres.m?rev=37961&r1=37960&r2=37961&view=diff
==============================================================================
--- libs/sqlclient/trunk/testPostgres.m (original)
+++ libs/sqlclient/trunk/testPostgres.m Sat Jun 21 08:57:17 2014
@@ -336,6 +336,8 @@
NSLog(@"Records - %@", [GSCache class]);
}
+ NSLog(@"Pool stats:\n%@", [sp statistics]);
+
[pool release];
return 0;
}
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs