增强监控

git-svn-id: http://code.alibabatech.com/svn/druid/trunk@333 b9813039-fb51-4c41-a8b9-e21c2acb5095
This commit is contained in:
wenshao
2011-06-30 14:38:59 +00:00
parent c84a036722
commit 89c94b795d
6 changed files with 195 additions and 131 deletions
@@ -24,10 +24,10 @@ public class StatisticTest extends TestCase {
public void test_stat() throws Exception {
JdbcConnectionStat stat = new JdbcConnectionStat();
Assert.assertEquals(null, stat.getLastConnectTime());
stat.setConcurrentCount(1);
Assert.assertEquals(1, stat.getConcurrentMax());
stat.setConcurrentCount(2);
Assert.assertEquals(2, stat.getConcurrentMax());
Assert.assertEquals(null, stat.getConnectLastTime());
stat.setActiveCount(1);
Assert.assertEquals(1, stat.getConnectingMax());
stat.setActiveCount(2);
Assert.assertEquals(2, stat.getConnectingMax());
}
}