private String formatElapsedTime(SQLExecutionInfo exInfo) { final NumberFormat nbrFmt = NumberFormat.getNumberInstance(); double executionLength = exInfo.getSQLExecutionElapsedMillis() / 1000.0; double outputLength = exInfo.getResultsProcessingElapsedMillis() / 1000.0; String totalTime = nbrFmt.format(executionLength + outputLength); String queryTime = nbrFmt.format(executionLength); String outputTime = nbrFmt.format(outputLength); // i18n[ResultTab.elapsedTime=Total: {0}, SQL query: {1}, Building output: {2}] String elapsedTime = s_stringMgr.getString( "ResultTab.elapsedTime", new String[] {totalTime, queryTime, outputTime}); return elapsedTime; }
@Override public void sqlExecutionComplete( SQLExecutionInfo exInfo, int processedStatementCount, int statementCount) { double executionLength = ((double) exInfo.getSQLExecutionElapsedMillis()) / 1000; double outputLength = ((double) exInfo.getResultsProcessingElapsedMillis()) / 1000; double totalLength = executionLength + outputLength; final NumberFormat numberFormat = NumberFormat.getNumberInstance(); Object[] args = new Object[] { processedStatementCount, statementCount, numberFormat.format(totalLength), numberFormat.format(executionLength), numberFormat.format(outputLength) }; _session.showMessage(s_stringMgr.getString("ExplainExecuterPanel.queryStatistics", args)); }