While running sysbench as explained here with a database that is cached by RocksDB from flamegraphs I see that ha_statistic_increment accounts for about 5% of the samples on the scan microbenchmark on a small server with 1 client connection and a large server with 24 client connections. After editing the function to make it cheaper I get between 5% and 10% more throughput.
The upstream version is here and just increments a per-handler counter.
The MyRocks version is here and does a bit more. The call to check_yield is the most expensive addition. The next most expensive change is the call to update_sql_stats_periodic.
A flamegraph from the small server
