mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-15 13:05:22 +02:00
Add tracing for SSH downloads/uploads/streams
This commit is contained in:
parent
11d34bf0e6
commit
3eae75442c
1 changed files with 12 additions and 0 deletions
|
@ -677,8 +677,12 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
||||||
//String desc = ((op==SftpProgressMonitor.PUT)?
|
//String desc = ((op==SftpProgressMonitor.PUT)?
|
||||||
// "Uploading " : "Downloading ")+srcFile;
|
// "Uploading " : "Downloading ")+srcFile;
|
||||||
String desc = srcFile;
|
String desc = srcFile;
|
||||||
|
if (Activator.isTracingOn()) {
|
||||||
|
Activator.trace("Sftp-monitor: "+max+", "+desc); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
|
}
|
||||||
//TODO avoid cast from long to int
|
//TODO avoid cast from long to int
|
||||||
fMonitor.beginTask(desc, (int)max);
|
fMonitor.beginTask(desc, (int)max);
|
||||||
|
|
||||||
}
|
}
|
||||||
public boolean count(long count){
|
public boolean count(long count){
|
||||||
fWorkToDate += count;
|
fWorkToDate += count;
|
||||||
|
@ -690,11 +694,19 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
||||||
workToDateKB, fMaxWorkKB, workPercent
|
workToDateKB, fMaxWorkKB, workPercent
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (Activator.isTracingOn()) {
|
||||||
|
System.out.print('#');
|
||||||
|
}
|
||||||
fMonitor.subTask(subDesc);
|
fMonitor.subTask(subDesc);
|
||||||
fMonitor.worked((int)count);
|
fMonitor.worked((int)count);
|
||||||
return !(fMonitor.isCanceled());
|
return !(fMonitor.isCanceled());
|
||||||
}
|
}
|
||||||
public void end(){
|
public void end(){
|
||||||
|
if (Activator.isTracingOn()) {
|
||||||
|
System.out.println();
|
||||||
|
System.out.println("Sftp-monitor <--"); //$NON-NLS-1$
|
||||||
|
System.out.flush();
|
||||||
|
}
|
||||||
fMonitor.done();
|
fMonitor.done();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue