コード例 #1
0
ファイル: QueryService.java プロジェクト: GerritBoers/exist
 @Override
 public synchronized String toString() {
   return STAND_ALONE_ENTRY_FORMAT.format(
       new Object[] {
         query == null ? "TOTALS" : query,
         numQueries,
         (queriesPrepared - queriesCompiled) / (double) queriesPrepared,
         queryTime,
         queryCompilationTime,
         queryPreparationTime,
         queryRunTime,
         queryTime * 1000 / numQueries,
         queriesCompiled == 0 ? 0 : queryCompilationTime * 1000 / queriesCompiled,
         queriesPrepared == 0 ? 0 : queryPreparationTime * 1000 / queriesPrepared,
         queriesRun == 0 ? 0 : queryRunTime * 1000 / queriesRun
       });
 }
コード例 #2
0
ファイル: QueryService.java プロジェクト: GerritBoers/exist
 public synchronized String toString(int maxCountLength, double totalDuration) {
   String formattedCount =
       String.format("%" + maxCountLength + "s", COUNT_FORMAT.format(numQueries));
   return FULL_ENTRY_FORMAT.format(
       new Object[] {
         query == null ? "TOTALS" : query,
         formattedCount,
         (queriesPrepared - queriesCompiled) / (double) queriesPrepared,
         queryTime,
         queryCompilationTime,
         queryPreparationTime,
         queryRunTime,
         queryTime * 1000 / numQueries,
         queriesCompiled == 0 ? 0 : queryCompilationTime * 1000 / queriesCompiled,
         queriesPrepared == 0 ? 0 : queryPreparationTime * 1000 / queriesPrepared,
         queriesRun == 0 ? 0 : queryRunTime * 1000 / queriesRun,
         queryTime / totalDuration
       });
 }