Transaction statistics?

I’m trying to debug high CPU usage in the FDB C binding, and I suspect it’s because I’m reading way more data than necessary and I should create some form of secondary indexes.

How can I validate this theory? Are there any per-transaction client-side stats that I can access, such as number of keys scanned and bytes read/written?