hibernate-reactive
hibernate-reactive copied to clipboard
statistics for interaction with Vert.x client
We now have a Statistics
interface but we don't record any information about statements and connections.
And when we activate the statistics we see logs mentioning JDBC:
INFO StatisticalLoggingSessionEventListener [vert.x-eventloop-thread-0] Session Metrics {
0 nanoseconds spent acquiring 0 JDBC connections;
0 nanoseconds spent releasing 0 JDBC connections;
0 nanoseconds spent preparing 0 JDBC statements;
0 nanoseconds spent executing 0 JDBC statements;
0 nanoseconds spent executing 0 JDBC batches;
0 nanoseconds spent performing 0 L2C puts;
0 nanoseconds spent performing 0 L2C hits;
0 nanoseconds spent performing 0 L2C misses;
10408842 nanoseconds spent executing 1 flushes (flushing a total of 3 entities and 0 collections);
0 nanoseconds spent executing 0 partial-flushes (flushing a total of 0 entities and 0 collections)
}
So I worked on this yesterday, and it's turning out to be waaay harder than it sounds.
To do this properly, I need access to the SessionEventListenerManager
that is created in the constructor of AbstractSharedSessionContract
from the getConnection()
methods of SqlClientPool
.
The problem is that currently we call getConnection()
before instantiating the ReactiveSessionImpl
or ReactiveStatelessSessionImpl
, so the SessionEventListenerManager
has not yet been built at that point.
I'm not sure what the right solution is. I don't want to move the call to getConnection()
into the constructor of ReactiveSessionImpl
. Perhaps I could add a setListener()
method to ReactiveConnection
, but I hate giving it mutable state.
Perhaps I could add a
setListener()
method toReactiveConnection
, but I hate giving it mutable state.
Also: this is easy, but it doesn't fully solve the problem, because I can't properly log connection acquisition.
Hello Is hibernate reactive 2.0 changing something in that problem?
Hello @gavinking @DavideD is this topic abandoned for now? Sorry for pushing, just a feature that I miss the most.
Not completely abandoned, but nobody is working on it at the moment
@DavideD thx for information. Thank you for your effort.
Hello @DavideD Is there maybe some place where I can check status of this task, to not bother each few months :)
Hello, this is the place for status updates. If you don't see any, and the issue is unassigned, it means that nobody is working on it.
You can still ask if you want to double check, or you can try to solve it and send a contribution (I haven't looked into it, so I'm not sure how hard this is to solve).
@DavideD Thx. All clear now.