Closed danieldiazastudillo closed 3 months ago
Thank you for using node-oracledb.
There are two ways to log the pool statistics.
One is by using the poolStatistics
object, which we have shown here and the other is to use the pool
object.
The poolStatistics object is different from the pool object and it can be used to log the pool statistics.
We have also mentioned in the very next line in connection pool monitoring user guide about how to log statistics using the pool object.
Both pool.logStatistics()
and poolstatistics.logStatistics()
are identical with same result and can use either of them.
You have to use poolStatistics class object to access single attribute data.
What is the link to the documentation section that needs improving? https://node-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html#connection-pool-monitoring
Describe the confusion The code snippet provided to explain logging it's calling from
poolStatistics
when it should be calling from thepool
variableconsole.log(poolstatistics.currentQueueLength); // print one attribute poolstatistics.logStatistics(); // print all statistics to the console. (WRONG!)