Subject Re: [Firebird-Java] Jaybird 3 and Excelsior Jet
Author Mark Rotteveel
On 15-5-2017 16:27, hugo.larson@... [Firebird-Java] wrote:
>
>
> Hi,
>
> 18 ms.
> Maybe the delayed is not related to charset? I assumed it because of the
> strange messages on the console.

What happens with:

import java.lang.reflect.Method;
import java.util.concurrent.TimeUnit;
import java.util.logging.Logger;

public class CharsetLoading3 {

private static final Logger LOG =
Logger.getLogger(CharsetLoading3.class.getName());

public static void main(String[] args) throws Exception {
LOG.info("start");
long start = System.nanoTime();
Class<?> encodingSetClass =
Class.forName("org.firebirdsql.encodings.DefaultEncodingSet");
Object encodingSet = encodingSetClass.newInstance();
Method getEncodings = encodingSetClass.getMethod("getEncodings");
Object encodings = getEncodings.invoke(encodingSet);
long end = System.nanoTime();
LOG.info("end");

LOG.info(encodings.toString());

long duration = end - start;
LOG.info("Took " + duration + " ns (" +
TimeUnit.NANOSECONDS.toMillis(duration) + " ms)");
}
}

--
Mark Rotteveel