IDEMPIERE-1044 Load testing. Make it easier to monitor connection pool status.

This commit is contained in:
Heng Sin Low 2013-06-18 18:10:02 +08:00
parent 6e6d59d04f
commit 187eef6af2
2 changed files with 13 additions and 3 deletions

View File

@ -635,13 +635,19 @@ public class CLogMgt
ctx = Env.getCtx();
// Envoronment
CConnection cc = CConnection.get();
sb.append(NL)
.append("=== Environment === ")
sb.append(NL).append(NL)
.append("=== Environment === ").append(NL)
.append(Adempiere.getCheckSum()).append(NL)
.append(Adempiere.getSummaryAscii()).append(NL)
.append(getLocalHost()).append(NL)
.append(cc.getName() + " " + cc.getDbUid() + "@" + cc.getConnectionURL()).append(NL)
.append(cc.getInfo()).append(NL);
//connection pool
sb.append(NL)
.append("=== DB Connection Pool === ").append(NL)
.append(cc.getDatabase().getStatus().replace(" , ", NL)).append(NL);
// Context
sb.append(NL)
.append("=== Context ===").append(NL);
@ -660,6 +666,7 @@ public class CLogMgt
String value = System.getProperty(key);
sb.append(key).append("=").append(value).append(NL);
}
return sb;
} // getInfoDetail

View File

@ -879,7 +879,10 @@ public class AdempiereMonitor extends HttpServlet
info = db.getDescription();
line.addElement(new th().addElement(info));
line.addElement(new td().addElement(cc.getConnectionURL()));
// line.addElement(new td().addElement(system.getDBInstance()));
table.addElement(line);
line = new tr();
line.addElement(new th().addElement("DB Connection Pool"));
line.addElement(new td().addElement(cc.getDatabase().getStatus()));
table.addElement(line);
// Processors/Support
line = new tr();