You can use the PerformanceCounter class in the System.Diagnostics namespace to have your app consume the counters info directly. This is generic to all performance counters,
ok, as the Oracle client is writing optionally into performance counters, I can setup the oracle client to write those and then read afterwards. However, it would be nice, if I could read the values directly from the client within my application as this would be more easy and stable. Performance counters needs to be created first and then application users must be setup to be able to access those.
It's not clear why an ODP.NET custom implementation would be easier and more stable. The ADO.NET PerformanceCounter class is well-known and stable. Maybe there are ways to make it easier to use. However, there would be a learning curve. All .NET developers that work programmatically with performance counters are familiar with using the PerformanceCounter class. Developers would find it easier to repurpose existing code that pulled performance counters from another source that to develop all new ODP.NET-specific performance counter code. Plus, they wouldn't be able to use these ODP.NET APIs with all the Windows and third-party tools that already plug into the PerformanceCounter class.
I was thinking of a CurrentConnectionPool that is just exposing the current data as read properties so its accessible like below in addition to the already existing way with performance counters. This change would be transparent to users already making use of Performace Counters.
var connection = new OracleConnection();
connection.ConnectionString = "Data Source=Oracle";