@Test @Features("issues/292") public void testGlobalSqlStatsDisabled() throws Exception { int topSqlCapacity = SniffyConfiguration.INSTANCE.getTopSqlCapacity(); try { Sniffy.getGlobalSqlStats().clear(); SniffyConfiguration.INSTANCE.setTopSqlCapacity(0); executeStatements(3); assertTrue(Sniffy.getGlobalSqlStats().isEmpty()); } finally { SniffyConfiguration.INSTANCE.setTopSqlCapacity(topSqlCapacity); } }
public static ConcurrentMap<String, Timer> getGlobalSqlStats() { return globalSqlStats; }
Sniffy { public static ConcurrentMap<String, Timer> getGlobalSqlStats() { return globalSqlStats; } }
Sniffy { public static ConcurrentMap<String, Timer> getGlobalSqlStats() { return globalSqlStats; } protected  Sniffy(); }
Sniffy { public static ConcurrentMap<String, Timer> getGlobalSqlStats() { return globalSqlStats; } protected  Sniffy(); static void initialize(); static void logSqlTime(String sql, long elapsedTime); static ConcurrentMap<String, Timer> getGlobalSqlStats(); static boolean hasSpies(); static SniffyMode getSniffyMode(); static void logSocket(int connectionId, InetSocketAddress address, long elapsedTime, int bytesDown, int bytesUp); static void logSocket(int connectionId, InetSocketAddress address, long elapsedTime, int bytesDown, int bytesUp, boolean captureStackTraces); static void enterJdbcMethod(); static void exitJdbcMethod(Method method, long elapsedTime); static void exitJdbcMethod(Method method, long elapsedTime, Method implMethod); static void readDatabaseRow(Method method, long elapsedTime, StatementMetaData statementMetaData); static StatementMetaData executeStatement(String sql, long elapsedTime, String stackTrace); static StatementMetaData executeStatement(String sql, long elapsedTime, String stackTrace, int rowsUpdated); static Spy<? extends Spy<T>> spy(); static CurrentThreadSpy spyCurrentThread(); static CurrentThreadSpy spyCurrentThread(boolean captureStackTraces); static Spy expect(Spy.Expectation expectation); static Spy execute(Executable executable); static Spy run(Runnable runnable); @SuppressWarnings("unchecked") static Spy.SpyWithValue<V> call(Callable<V> callable); }
Sniffy { public static ConcurrentMap<String, Timer> getGlobalSqlStats() { return globalSqlStats; } protected  Sniffy(); static void initialize(); static void logSqlTime(String sql, long elapsedTime); static ConcurrentMap<String, Timer> getGlobalSqlStats(); static boolean hasSpies(); static SniffyMode getSniffyMode(); static void logSocket(int connectionId, InetSocketAddress address, long elapsedTime, int bytesDown, int bytesUp); static void logSocket(int connectionId, InetSocketAddress address, long elapsedTime, int bytesDown, int bytesUp, boolean captureStackTraces); static void enterJdbcMethod(); static void exitJdbcMethod(Method method, long elapsedTime); static void exitJdbcMethod(Method method, long elapsedTime, Method implMethod); static void readDatabaseRow(Method method, long elapsedTime, StatementMetaData statementMetaData); static StatementMetaData executeStatement(String sql, long elapsedTime, String stackTrace); static StatementMetaData executeStatement(String sql, long elapsedTime, String stackTrace, int rowsUpdated); static Spy<? extends Spy<T>> spy(); static CurrentThreadSpy spyCurrentThread(); static CurrentThreadSpy spyCurrentThread(boolean captureStackTraces); static Spy expect(Spy.Expectation expectation); static Spy execute(Executable executable); static Spy run(Runnable runnable); @SuppressWarnings("unchecked") static Spy.SpyWithValue<V> call(Callable<V> callable); static final int TOP_SQL_CAPACITY; }