Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
ghx-label-6
Description
metrics.h and other metric headers are included a lot of places and there is a lot of code in the header that has very few callers. It appears to be pulled into several hundred compilation units, increasing the compile time of each of those and forcing recompilation when the headers are changed.
Some ideas:
- Move function implementations to .cc files. E.g. ToJson() and ToPrometheus() don't need to be inlined.
- Move MetricGroup to its own file
- Try to see if we can use forward declarations in more places to avoid including it.