Revise extra::metrics module to be non-allocating, static-friendly.