Oracle provides dynamic performance stats in the form of so-called V$ views, but I think the trace files are more detailed.
Another common technique is to record timestamps
- client log - issuing query
- server log - receiving query
- server log - returning data
- client log - receiving data
- client log - sending out data to requester, which could be in the same or another process.
Latency is additive. Find the largest component.