提交 1a684c81 编写于 作者: Y youyong205

Merge branch 'master' of code.dianpingoa.com:arch/cat

......@@ -147,7 +147,7 @@ public class StorageAnalyzer extends AbstractMessageAnalyzer<StorageReport> impl
StorageUpdateParam param = new StorageUpdateParam();
param.setId(id).setDomain(domain).setIp(ip).setMethod(method).setTransaction(t)
.setThreshold(LONG_SQL_THRESHOLD).setSqlName(sqlName).setSqlStatement(sqlStatement);
.setThreshold(LONG_SQL_THRESHOLD);// .setSqlName(sqlName).setSqlStatement(sqlStatement);
m_updater.updateStorageReport(report, param);
}
}
......
......@@ -50,7 +50,7 @@ public class StorageReportUpdater {
operation.incError();
segment.incError();
} else {
updateSqlInfo(param, d);
// updateSqlInfo(param, d);
}
if (duration > param.getThreshold()) {
operation.incLongCount();
......@@ -59,15 +59,19 @@ public class StorageReportUpdater {
}
private void updateSqlInfo(StorageUpdateParam param, Domain d) {
Sql sql = d.findOrCreateSql(param.getSqlName());
String sqlName = param.getSqlName();
if (StringUtils.isEmpty(sql.getStatement())) {
String sqlStatement = param.getSqlStatement();
sqlStatement = sqlStatement.replaceAll("<", "&lt;").replaceAll(">", "&gt;");
if (StringUtils.isNotEmpty(sqlName)) {
Sql sql = d.findOrCreateSql(sqlName);
String sqlStatement = sql.getStatement();
sql.setStatement(sqlStatement);
if (StringUtils.isEmpty(sqlStatement)) {
sqlStatement = sqlStatement.replaceAll("<", "&lt;").replaceAll(">", "&gt;");
sql.setStatement(sqlStatement);
}
sql.incCount();
}
sql.incCount();
}
public static class StorageUpdateParam {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册