As a result, I get a very low fraction of Directory traffic compared to OR traffic. I wonder why that is the case.

In the attachment you can find a histogram of 10-second intervals and the sum of read and written bytes in KiB/s. There are only very few Directory connections with very little bandwidth consumption in that histogram. This is a 500 KiB/s middle node running for 24 hours.

I moved my patch before the connection-is-rate-limited check for another 24-hour test. I'll have a look for a better place when implementing these stats in Tor, rather than testing whether the results might be useful.