mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-26 02:15:31 +02:00
Fix computation of time for parser without resolution and index update
This commit is contained in:
parent
dabcfe8c2b
commit
e36cb0d76f
1 changed files with 58 additions and 55 deletions
|
@ -338,7 +338,7 @@ public abstract class PDOMIndexerTask implements IPDOMIndexerTask {
|
|||
|
||||
protected void addSymbols(IASTTranslationUnit ast, IProgressMonitor pm) throws InterruptedException, CoreException {
|
||||
final Map symbolMap= new HashMap();
|
||||
|
||||
try {
|
||||
String[] orderedPaths= extractSymbols(ast, symbolMap);
|
||||
for (int i=0; i<orderedPaths.length; i++) {
|
||||
if (pm.isCanceled()) {
|
||||
|
@ -397,8 +397,11 @@ public abstract class PDOMIndexerTask implements IPDOMIndexerTask {
|
|||
index.releaseWriteLock(getReadlockCount());
|
||||
}
|
||||
fAddToIndexTime+= System.currentTimeMillis()-start;
|
||||
}
|
||||
finally {
|
||||
fCompletedSources++;
|
||||
}
|
||||
}
|
||||
|
||||
private String[] extractSymbols(IASTTranslationUnit ast, final Map symbolMap) throws CoreException {
|
||||
LinkedHashSet orderedIncludes= new LinkedHashSet();
|
||||
|
@ -514,7 +517,7 @@ public abstract class PDOMIndexerTask implements IPDOMIndexerTask {
|
|||
|
||||
System.out.println(name + " Timings: " //$NON-NLS-1$
|
||||
+ (System.currentTimeMillis() - start) + " total, " //$NON-NLS-1$
|
||||
+ fParsingTime + " parser, " //$NON-NLS-1$
|
||||
+ (fParsingTime-fResolutionTime-fAddToIndexTime) + " parser, " //$NON-NLS-1$
|
||||
+ fResolutionTime + " resolution, " //$NON-NLS-1$
|
||||
+ fAddToIndexTime + " index update."); //$NON-NLS-1$
|
||||
System.out.println(name + " Result: " //$NON-NLS-1$
|
||||
|
|
Loading…
Add table
Reference in a new issue