server: improve the addMetrics method performance (#12454)
server: improve the addMetrics method performance (#12454)

Signed-off-by: Lonng <8ed72e0d00108201f79dd2bb5270f106b3e5c19c@lonng.org>
ming-relax/tidb,kyle-wang/tidb,ngaut/tidb,XuHuaiyu/tidb,ngaut/tidb,kyle-wang/tidb,pingcap/tidb,c4pt0r/tidb,c4pt0r/tidb,XuHuaiyu/tidb,kyle-wang/tidb,coocood/tidb,kyle-wang/tidb,coocood/tidb,Cofyc/tidb,c4pt0r/tidb,c4pt0r/tidb,ngaut/tidb,ngaut/tidb,EvilMcJerkface/tidb,ngaut/tidb,EvilMcJerkface/tidb,pingcap/tidb,c4pt0r/tidb,ming-relax/tidb,pingcap/tidb,pingcap/tidb,c4pt0r/tidb,kyle-wang/tidb,Cofyc/tidb,qiuyesuifeng/tidb,pingcap/tidb,qiuyesuifeng/tidb,ngaut/tidb,kyle-wang/tidb,pingcap/tidb