### Question:
LoggingFunctions { public static String getStackTraceString(final Throwable throwable) { final StringWriter sink = new StringWriter(); throwable.printStackTrace(new PrintWriter(sink, true)); return sink.toString(); } private  LoggingFunctions(); static String getSimpleDate(final long date); static String getShortDate(final long date); static String getStackTraceString(final Throwable throwable); static void startLogging(final Logger logger, final Level level); static void startLogging(final Level level); static void startLogging(); static void startDebugLogging();  }### Answer:
@Test public void testGetStackTraceStringPerformance() { LOG.log(Level.SEVERE, this.getClass().getName() + " スタックトレースの生成テスト"); final int loop = 1_000; final int depth = 10; long sum = 0; final long start = System.nanoTime(); for (int i = 0; i < loop; i++) { Exception ex = new RuntimeException(Integer.toString(i)); for (int j = 0; j < depth; j++) { ex = new RuntimeException(ex); } sum += LoggingFunctions.getStackTraceString(ex).hashCode(); } final long end = System.nanoTime(); LOG.log(Level.SEVERE, this.getClass().getName() + " 繰り返し:" + loop + " スタックの深さ:" + depth + " 秒数:" + ((end - start) / 1_000_000_000.0) + " チェックサム:" + sum); }