How to measure the specific data content (number of rows or columns) processed in rocksdb by the processing logic obtained by a tikv from tidb?

Regardless of the distributed scenario, if you want to profile the IO specific data of a TiKV processing logic in a single machine, what do I need to do, or what are the references? Furthermore, I want to link the execution of SQL with the IO execution performance of TiKV processing logic. How should I do this?
Going a step further, I want to link a certain SQL statement, TiKV processing logic, and the specific amount of data processed by RocksDB, the number of rows or the number of columns, what do I need to do?

In TiDB v5.1.0, there is RocksDB_xxxxx fields in the statement summary table, which might be helpful for you.