From 55339ee15268b3c54ba4584dd8cb8d4f47dc6d3c Mon Sep 17 00:00:00 2001 From: Doug Schaefer Date: Wed, 5 Apr 2006 14:02:07 +0000 Subject: [PATCH] Added better timing stats for the Fast indexer. --- .../core/pdom/indexer/fast/PDOMFastHandleDelta.java | 2 +- .../internal/core/pdom/indexer/fast/PDOMFastReindex.java | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/fast/PDOMFastHandleDelta.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/fast/PDOMFastHandleDelta.java index 8c075dcc393..01dcfa6a7ea 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/fast/PDOMFastHandleDelta.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/fast/PDOMFastHandleDelta.java @@ -100,7 +100,7 @@ class PDOMFastHandleDelta extends Job { if (showTimings != null) if (showTimings.equalsIgnoreCase("true")) //$NON-NLS-1$ System.out - .println("Updator Time: " + (System.currentTimeMillis() - start)); //$NON-NLS-1$ + .println("PDOM Update Time: " + (System.currentTimeMillis() - start)); //$NON-NLS-1$ return Status.OK_STATUS; } catch (CoreException e) { diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/fast/PDOMFastReindex.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/fast/PDOMFastReindex.java index b69f9128480..2889e6310e8 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/fast/PDOMFastReindex.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/pdom/indexer/fast/PDOMFastReindex.java @@ -48,6 +48,7 @@ public class PDOMFastReindex extends Job { protected IStatus run(IProgressMonitor monitor) { try { + long start = System.currentTimeMillis(); final List addedTUs = new ArrayList(); // First clear out the DB @@ -78,6 +79,11 @@ public class PDOMFastReindex extends Job { for (Iterator i = addedTUs.iterator(); i.hasNext();) addTU((ITranslationUnit)i.next()); + String showTimings = Platform.getDebugOption(CCorePlugin.PLUGIN_ID + + "/debug/pdomtimings"); //$NON-NLS-1$ + if (showTimings != null && showTimings.equalsIgnoreCase("true")) //$NON-NLS-1$ + System.out.println("PDOM Reindex Time: " + (System.currentTimeMillis() - start)); //$NON-NLS-1$ + monitor.done(); return Status.OK_STATUS; } catch (CoreException e) {