private String createLineProtocol(MethodMetrics methodMetrics, long startNanos, StringBuilder sb) {
int suitSize = getSuitSize(methodMetrics);
if (suitSize > MAX_LENGTH) {
sb = new StringBuilder(suitSize);
}
MethodTag methodTag = methodMetrics.getMethodTag();
String methodDesc = LineProtocolUtils.processTagOrField(methodTag.getSimpleDesc());
sb.append("method_metrics")
.append(",AppName=").append(ProfilingConfig.getInstance().getAppName())
.append(",ClassName=").append(methodTag.getClassName())
.append(",Method=").append(methodDesc)
.append(" RPS=").append(methodMetrics.getRPS()).append("i")
.append(",Avg=").append(NumFormatUtils.getFormatStr(methodMetrics.getAvgTime()))
.append(",Min=").append(methodMetrics.getMinTime()).append("i")
.append(",Max=").append(methodMetrics.getMaxTime()).append("i")
.append(",StdDev=").append(NumFormatUtils.getFormatStr(methodMetrics.getStdDev()))
.append(",Count=").append(methodMetrics.getTotalCount()).append("i")
.append(",TP50=").append(methodMetrics.getTP50()).append("i")
.append(",TP90=").append(methodMetrics.getTP90()).append("i")
.append(",TP95=").append(methodMetrics.getTP95()).append("i")
.append(",TP99=").append(methodMetrics.getTP99()).append("i")
.append(",TP999=").append(methodMetrics.getTP999()).append("i")
.append(",TP9999=").append(methodMetrics.getTP9999()).append("i")
.append(",TP99999=").append(methodMetrics.getTP99999()).append("i")
.append(",TP100=").append(methodMetrics.getTP100()).append("i")
.append(" ").append(startNanos);
return sb.toString();
}