support logStats

This commit is contained in:
wenshao
2013-05-19 17:13:45 +08:00
parent e21b08262b
commit 9a892241ea
9 changed files with 203 additions and 61 deletions
@@ -16,6 +16,7 @@
package com.alibaba.druid.util;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.Map;
import com.alibaba.druid.stat.JdbcSqlStat;
@@ -41,4 +42,19 @@ public class JdbcSqlStatUtils {
return null;
}
}
public static long[] rtrim(long[] array) {
int notZeroLen = array.length;
for (int i = array.length - 1; i >= 0; --i, notZeroLen--) {
if (array[i] != 0) {
break;
}
}
if (notZeroLen != array.length) {
array = Arrays.copyOf(array, notZeroLen);
}
return array;
}
}