more efficient handling of metrics parsing