After reading a number of questions and resources on bandwidth measurements and life cycle of tor relays:
can anyone tell me about the bandwidth weights?
https://blog.torproject.org/blog/lifecycle-of-a-new-relay
http://fscked.org/talks/TorFlow-HotPETS-final.pdf
and the bandwidth weight specification:
https://gitweb.torproject.org/torspec.git/tree/dir-spec.txt#2454
I am still not sure how bandwidth measurement is performed (from an implementation standpoint) by the bandwidth authorities. I have also found a library, stem, that queries authorities and retrieves their measurement results.
Where should I look in the sources to find the code responsible for bandwidth measurement?
I am using version 0.2.8.0-alpha-dev (git-d015c70a118e4357). Grepping around the code for strings such as bandwidth, measurement, bw does not seem very lucrative(all results rely on handling consenus information).