mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
support logStats
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user