BUILDTIMEOUT_SET totals are still off
While testing and examining onion service timeout rates and trying to verify them from a controller script, I realized that our timeout rates are still off in the BUILDTIMEOUT_SET event.
The reason for the discrepancy is that we're double-counting circuits that transition into MEASUREMENT_EXPIRED. Every circuit that transitions into MEASUREMENT_EXPIRED is first counted as a timeout in circuit_build_times_mark_circ_as_measurement_only(). Of those that do not complete within the measurement window, we again count as a "closed" circuit in circuit_build_times_count_close(). If a measurement circuit succeeds, we do not count it as a success (see circuit_build_times_handle_completed_hop()).
This means that the total_circuits value in cbt_control_event_buildtimeout_set() should be timeouts+succeeded, and not timeouts+succeeded+closed. (Again, counting closed in the total there double-counts "closed" MEASUREMENT circuits, which were also counted as timeout circuits earlier).
Since this is just a control port stats change, it would be nice to get it into 0.3.4 (and maybe 0.3.3) so it is easier to get more accurate data about how the circuit build timeout is interacting with vanguards there.