Summary:
This diff unifies the stats collection within sptp by using pre-defined counters instead of a map with free form counters. Why?
Better consistency. GM metrics already have predefined counters. Other counters plugged as a map next to it. This diff even removes a need for separate routine started in main.go. Same "style" is also used in ntpresponder and ptp4u.
Be explicit - random counters don't appear out because of a random string introduced without tests.
Easier to manage - accessing/modifying from any place in the code without specifying full counter path. No typos, no long strings.
Summary: This diff unifies the stats collection within
sptp
by using pre-defined counters instead of a map with free form counters. Why?main.go
. Same "style" is also used inntpresponder
andptp4u
.Reviewed By: abulimov
Differential Revision: D56754543